33 #ifndef __ROCCOM_BASIC_H__
34 #define __ROCCOM_BASIC_H__
41 #define COM_BEGIN_NAME_SPACE namespace COM {
43 #define COM_END_NAME_SPACE }
45 #define USE_COM_NAME_SPACE using namespace COM;
49 COM_Object() : _cookie( COM_COOKIE) {}
50 COM_Object(
const COM_Object &m) : _cookie( &m? m._cookie : COM_COOKIE) {}
51 virtual ~COM_Object() {}
57 int validate_object(
void *obj=0)
const {
59 if ( obj && obj!=
this) ierr+=1;
60 if ( _cookie != COM_COOKIE) ierr += 2;
65 enum { COM_COOKIE = 762266 };
70 typedef void (COM_Object::*Member_func_ptr)();
71 typedef void (COM_Object::*COM_Member_func_ptr)();
77 #ifndef DOXYGEN_SHOULD_SKIP_THIS
78 #ifdef COM_APPEND_TWOUNDERSCORE
79 # define COM_F_FUNC(x) x ## __
80 #elif defined(COM_APPEND_UNDERSCORE)
81 # define COM_F_FUNC(x) x ## _
83 # define COM_F_FUNC(x) x
87 #define COM_F_FUNC2( lowcase, uppercase ) FC_GLOBAL(lowcase, uppercase)
98 # define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName,windowString) \
99 { MPI_Comm comm = COM_get_default_communicator(); \
100 COM_set_default_communicator(MPI_COMM_SELF); \
101 moduleName##_load_module(windowString); \
102 COM_set_default_communicator(comm); \
104 # define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName,windowString) \
105 moduleName##_unload_module(windowString);
107 # define COM_EXTERN_MODULE( moduleName) \
108 extern "C" void moduleName##_load_module( const char *); \
109 extern "C" void moduleName##_unload_module( const char *)
111 # define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName,windowString) \
112 COM_load_module(#moduleName,windowString)
113 # define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName,windowString) \
114 COM_unload_module(#moduleName,windowString)
116 # define COM_EXTERN_MODULE( moduleName)
120 #define MAX_NAMELEN 128
int COM_Type
Indices for derived data types.
void(* Func_ptr)()
Pointer of functions.