📄 ospmsgdesc.h
字号:
/**########################################################################*########################################################################*########################################################################* * COPYRIGHT (c) 1998, 1999 by TransNexus, LLC * * This software contains proprietary and confidential information * of TransNexus, LLC. Except as may be set forth in the license * agreement under which this software is supplied, use, disclosure, * or reproduction is prohibited without the prior, express, written* consent of TransNexus, LLC. * *******#########################################################################*#########################################################################*#########################################################################*//* * ospmsgdesc.h - Structures and prototypes for generic XML message * descriptors. */#ifndef OSPMSGDESC_H#define OSPMSGDESC_H#include "osp.h"#include "ospmsgpart.h"/* * The OSPPMsgDescGetName includes two different implementations: the * first is safer and the second has higher performance. The safer option * does an exhaustive search through the descriptors array. The second * simply uses the part ID as an index into that array. The risk with the * second approach is that it requires that the array be built correctly, * with elements in the precise, right order. If you enable the second * approach, it is essential to test the array ordering using the the code * in the included main() procedures in the individual components. */#define OSPC_FASTMSG_DESC/* * An OPSMsgDesc structure is used to associate a part (for an attribute * or an element) with a name. */typedef struct{ OSPTMSGPART ospmMsgDescPart; const char *ospmMsgDescName;}OSPTMSGDESC;/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*/#ifndef OSPC_DEBUG/* * Note: all macros are also implemented as functions in ospmsgdesc.c. * For implementation details, see the comments in that file. To replace * a macro with a true function, simply comment out the macro definition * below. */#define OSPPMsgDescGetName(ospvPart, ospvDescs, ospvNumDesc) \ (((ospvPart) < (ospvNumDesc)) ? \ (ospvDescs)[(int)(ospvPart)].ospmMsgDescName : OSPC_OSNULL )#endif /* OSPC_DEBUG *//**//*-----------------------------------------------------------------------* * function prototypes *-----------------------------------------------------------------------*/OSPTMSGPART OSPPMsgDescGetPart(const char *, const OSPTMSGDESC *, unsigned);#ifdef OSPC_DEBUGconst char *OSPPMsgDescGetName(OSPTMSGPART, const OSPTMSGDESC *, unsigned);#endif /* OSPC_DEBUG */#endif /* OSPMSGDESC_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -