/* * JCG Products Ver 1.00.00 * * Copyright (C) 2000,2001 TRON Association * All rights reserved. * Copyright (C) 2000,2001 Information-technology Promotion Agency, Japan * All rights reserved. * * 上記著作権者は,以下の条件を満たす場合に限り,本ソフトウェア(本ソ * フトウェアを改変したものを含む.以下同じ)を使用・複製・改変・頒布・ * 送信・再許諾・貸与・翻案(以下再頒布という)することを無償で許諾す * る. * (1) 本ソフトウェアをソースコードの形で再頒布する場合には,上記の著 * 作権表示,この再頒布条件および下記の無保証規定が,ソースコード * 中に含まれていること. * (2) 本ソフトウェアをオブジェクトコードの形または機器に組み込んだ形 * で再頒布する場合には,次のいずれかの条件を満たすこと. * ・再頒布に伴うドキュメント(利用者マニュアルなど)に,上記の * 著作権表示,この再頒布条件および下記の無保証規定を掲載する * こと. * ・本ソフトウェアを利用したことによって直接的または間接的に生 * じたいかなる損害からも,上記著作権者を免責すること. * * 本ソフトウェアは,無保証で提供されているものである.上記著作権者は, * 本ソフトウェアに関して,その適用可能性も含めて,いかなる保証も行わ * ない.また,本ソフトウェアを利用したことによって直接的または間接的 * に生じたいかなる損害に関しても,その責任を負わない. * * The Copyrights Holder above agrees that this software (including the * Derivative work of this software. This is applicable hereinafter) is * used, copied, modified, distributed, sent, re-granted, lent or adopted * (hereinafter called "redistribution") for free as long as the * following License Conditions are satisfied. * (1) If this software is to be redistributed in the form of source * codes, Copyright Notice above, this redistribution conditions, * and the following NO WARRANTY Provisions must be included in * the source code. * (2) If this software is to be redistributed in the form of object * codes or integrated into a device, either of the following * conditions must be satisfied. * - Copyright Notice above, this redistribution conditions, and * the following NO WARRANTY Provisions appear in the attached * document (such as users manual). * - Copyrights Holder above is exempted from any direct/indirect * damages caused as a result of using this software. * * This software is provided with NO WARRANTY. Copyrights Holder above * provides NO WARRANTY on this software, including its applicability, * and is not liable for any direct/indirect damages caused as a result * of using this software. * * NOTICE: * Sentences above are translation for reference. For legal purposes, * the original Japanese sentences on top of this file are the official * sentences for License Conditions. */ #ifndef __ECBMRSHL_H__ #define __ECBMRSHL_H__ #define MRSHL_align(index, size) \ ((((CORBA_unsigned_long)index + size - 1) / size) * size) #define MRSHL_index_octet(index) \ (MRSHL_align(index, sizeof(CORBA_octet)) + sizeof(CORBA_octet)) #define MRSHL_index_boolean(index) \ (MRSHL_align(index, sizeof(CORBA_boolean)) + sizeof(CORBA_boolean)) #define MRSHL_index_char(index) \ (MRSHL_align(index, sizeof(CORBA_char)) + sizeof(CORBA_char)) #define MRSHL_index_short(index) \ (MRSHL_align(index, sizeof(CORBA_short)) + sizeof(CORBA_short)) #define MRSHL_index_unsigned_short(index) \ (MRSHL_align(index, sizeof(CORBA_unsigned_short)) + sizeof(CORBA_unsigned_short)) #define MRSHL_index_long(index) \ (MRSHL_align(index, sizeof(CORBA_long)) + sizeof(CORBA_long)) #define MRSHL_index_unsigned_long(index) \ (MRSHL_align(index, sizeof(CORBA_unsigned_long)) + sizeof(CORBA_unsigned_long)) #define MRSHL_index_long_long(index) \ (MRSHL_align(index, sizeof(CORBA_long_long)) + sizeof(CORBA_long_long)) #define MRSHL_index_unsigned_long_long(index) \ (MRSHL_align(index, sizeof(CORBA_unsigned_long_long)) + sizeof(CORBA_unsigned_long_long)) #define MRSHL_index_float(index) \ (MRSHL_align(index, sizeof(CORBA_float)) + sizeof(CORBA_float)) #define MRSHL_index_double(index) \ (MRSHL_align(index, sizeof(CORBA_double)) + sizeof(CORBA_double)) #define MRSHL_put_octet(bufp, data) \ MRSHL_put_char(bufp, (CORBA_char)data) #define MRSHL_put_boolean(bufp, data) \ MRSHL_put_char(bufp, (CORBA_char)data) #define MRSHL_put_unsigned_short(bufp, data) \ MRSHL_put_short(bufp, (CORBA_short)data) #define MRSHL_put_unsigned_long(bufp, data) \ MRSHL_put_long(bufp, (CORBA_unsigned_long)data) #define MRSHL_put_unsigned_long_long(bufp, data) \ MRSHL_put_long_long(bufp, (CORBA_unsigned_long_long)data) #define MRSHL_get_octet(bufp, order) \ (CORBA_octet)MRSHL_get_char(bufp, order) #define MRSHL_get_boolean(bufp, order) \ (CORBA_boolean)MRSHL_get_char(bufp, order) #define MRSHL_get_unsigned_short(bufp, order) \ (CORBA_unsigned_short)MRSHL_get_short(bufp, order) #define MRSHL_get_unsigned_long(bufp, order) \ (CORBA_unsigned_long)MRSHL_get_long(bufp, order) #define MRSHL_get_unsigned_long_long(bufp, order) \ (CORBA_unsigned_long_long)MRSHL_get_long_long(bufp, order); /* * prototype declaration for marshling function */ CORBA_unsigned_long MRSHL_index_string(CORBA_unsigned_long, CORBA_char *); CORBA_unsigned_long MRSHL_index_sequence_octet(CORBA_unsigned_long, CORBA_sequence_octet *); void MRSHL_put_char(CORBA_char **, CORBA_char); void MRSHL_put_short(CORBA_char **, CORBA_short); void MRSHL_put_long(CORBA_char **, CORBA_long); void MRSHL_put_long_long(CORBA_char **, CORBA_long_long); void MRSHL_put_float(CORBA_char **, CORBA_float); void MRSHL_put_double(CORBA_char **, CORBA_double); void MRSHL_bcopy(CORBA_char **, CORBA_char *, CORBA_unsigned_long, CORBA_unsigned_long); void MRSHL_put_string(CORBA_char **, CORBA_char *); void MRSHL_put_sequence_octet(CORBA_char **, CORBA_sequence_octet *); CORBA_char MRSHL_get_char(CORBA_char **, CORBA_boolean); CORBA_short MRSHL_get_short(CORBA_char **, CORBA_boolean); CORBA_long MRSHL_get_long(CORBA_char **, CORBA_boolean); CORBA_long_long MRSHL_get_long_long(CORBA_char **, CORBA_boolean); CORBA_float MRSHL_get_float(CORBA_char **, CORBA_boolean); CORBA_double MRSHL_get_double(CORBA_char **, CORBA_boolean); CORBA_char *MRSHL_get_string(CORBA_char **, CORBA_boolean); CORBA_sequence_octet *MRSHL_get_sequence_octet(CORBA_char **, CORBA_boolean); #endif /* __ECBMRSHL_H__ */