45 #ifndef reda_circularlist_h
46 #include "reda/reda_circularlist.h"
50 #include "db/db_api.h"
58 #define NULL ((void*)0)
62 #define RT_CPP_SUPPORT_METHODS_BASIC(T) \
68 T& operator=(const T& from);\
69 bool operator==(const T& other);\
70 bool operator!=(const T& other);
72 #define RT_CPP_SUPPORT_METHODS_BASIC(T)
88 #define RT_MKINTERFACEID(class_,instance_) \
89 ((((class_)<<16)&0xffff0000) | (instance_))
98 #define RT_INTERFACE_CLASS(id_) ((id_) >> 16)
107 #define RT_INTERFACE_INSTANCE(id_) ((id_) & 0xffff)
113 #define RT_COMPONENT_CLASS_UNKNOWN (0x0000)
118 #define RT_COMPONENT_CLASS_DISCOVERY (0x0001)
123 #define RT_COMPONENT_CLASS_WHISTORY (0x0002)
128 #define RT_COMPONENT_CLASS_RHISTORY (0x0003)
133 #define RT_COMPONENT_CLASS_NETIO (0x0004)
140 #define RT_COMPONENT_INSTANCE_DISCOVERY_DPDE (1)
145 #define RT_COMPONENT_INSTANCE_DISCOVERY_DPSE (2)
150 #define RT_COMPONENT_INSTANCE_WHISTORY_SM (1)
155 #define RT_COMPONENT_INSTANCE_RHISTORY_SM (1)
160 #define RT_COMPONENT_INSTANCE_UDP (1)
165 #define RT_COMPONENT_INSTANCE_RTPS (2)
170 #define RT_COMPONENT_INSTANCE_INTRA (3)
175 #define RT_COMPONENT_INSTANCE_DDSWI (4)
180 #define RT_COMPONENT_INSTANCE_DDSRI (5)
185 #define RT_RESOURCE_TABLES_PER_INSTANCE (1)
190 typedef RTI_UINT32 RT_ComponentInterfaceId_t;
200 typedef struct RT_Component RT_Component_T;
209 struct RT_ComponentListener
220 #define RT_ComponentListener_INITIALIZER \
228 struct RT_ComponentProperty
241 #define RT_ComponentProperty_INITIALIZER \
267 struct RT_ComponentI *_intf;
293 RT_Component_initialize(RT_Component_T *c,
294 struct RT_ComponentI *intf,
296 const struct RT_ComponentProperty *
const property,
297 const struct RT_ComponentListener *
const listener);
313 RT_Component_finalize(RT_Component_T *c);
316 #define RT_COMPONENTI_BASE {0}
321 struct RT_ComponentFactory;
326 struct RT_ComponentFactoryProperty
337 #define RT_ComponentFactoryProperty_INITIALIZER \
346 struct RT_ComponentFactoryListener
354 #define RT_ComponentFactoryListener_INITIALIZER \
368 FUNCTION_MUST_TYPEDEF(
369 struct RT_ComponentFactory*
370 (*RT_ComponentFactory_initializeFactoryFunc)(
371 struct RT_ComponentFactoryProperty *property,
372 struct RT_ComponentFactoryListener *listener)
384 (*RT_ComponentFactory_finalizeFactoryFunc)(
struct RT_ComponentFactory *factory,
385 struct RT_ComponentFactoryProperty **property,
386 struct RT_ComponentFactoryListener **listener);
398 FUNCTION_MUST_TYPEDEF(
400 (*RT_ComponentFactory_createFunc)(
struct RT_ComponentFactory *factory,
401 struct RT_ComponentProperty *property,
402 struct RT_ComponentListener *listener)
415 (*RT_ComponentFactory_deleteFunc)(
struct RT_ComponentFactory *factory,
416 RT_Component_T* component);
426 FUNCTION_MUST_TYPEDEF(
427 struct RT_ComponentI*
428 (*RT_ComponentFactory_get_ifFunc)(
struct RT_ComponentFactory *factory)
434 #define RT_COMPONENT_FACTORY_ID_DEFAULT (0)
439 struct RT_ComponentFactoryI
449 RT_ComponentFactory_initializeFactoryFunc initialize;
454 RT_ComponentFactory_finalizeFactoryFunc finalize;
459 RT_ComponentFactory_createFunc create_component;
464 RT_ComponentFactory_deleteFunc delete_component;
469 RT_ComponentFactory_get_ifFunc get_if;
476 #define RT_MAX_FACTORY_NAME 7
482 union DDSCPPDllExport RT_ComponentFactoryId
486 char _name[RT_MAX_FACTORY_NAME+1];
495 RT_CPP_SUPPORT_METHODS_BASIC(RT_ComponentFactoryId)
499 bool set_name(
const char *
const name);
506 typedef union RT_ComponentFactoryId RT_ComponentFactoryId_T;
508 #define RT_ComponentFactoryId_INITIALIZER \
519 RT_ComponentFactoryId_clear(
union RT_ComponentFactoryId *
id);
525 struct RT_ComponentFactory
530 struct RT_ComponentFactoryI *intf;
535 struct RT_ComponentFactory *_factory;
540 union RT_ComponentFactoryId _id;
546 #define RT_ComponentFactory_INITIALIZER \
556 typedef struct RT_ComponentFactory RT_ComponentFactory_T;
561 struct RT_RegistryProperty
566 RTI_SIZE_T max_factories;
577 #define RT_RegistryProperty_INITIALIZER \
586 extern RTDllVariable
struct RT_RegistryProperty
587 RTCOMPONENTFACTORY_REGISTRY_PROPERTY_DEFAULT;
595 typedef struct RT_Registry RT_Registry_T;
608 SHOULD_CHECK_RETURN RTDllExport RT_Registry_T*
609 RT_Registry_get_instance(
void);
625 SHOULD_CHECK_RETURN RTDllExport
RTI_BOOL
626 RT_Registry_finalize(RT_Registry_T*);
631 MUST_CHECK_RETURN RTDllExport
RTI_BOOL
634 struct RT_ComponentFactoryI *intf,
635 struct RT_ComponentFactoryProperty *property,
636 struct RT_ComponentFactoryListener *listener);
640 SHOULD_CHECK_RETURN RTDllExport
RTI_BOOL
643 struct RT_ComponentFactoryProperty **property,
644 struct RT_ComponentFactoryListener **listener);
660 MUST_CHECK_RETURN RTDllExport
struct RT_ComponentFactory*
661 RT_Registry_lookup(RT_Registry_T *registry,
const char *name);
680 MUST_CHECK_RETURN RTDllExport
struct RT_ComponentFactory*
681 RT_Registry_lookup_cid(RT_Registry_T *registry,
const char *name,RTI_INT32 cid);
697 MUST_CHECK_RETURN RTDllExport
RTI_BOOL
698 RT_Registry_get_property(RT_Registry_T *registry,
699 struct RT_RegistryProperty *property);
716 MUST_CHECK_RETURN RTDllExport
RTI_BOOL
717 RT_Registry_set_property(RT_Registry_T *registry,
718 struct RT_RegistryProperty *property);
731 RTDllExport RTI_INT32
732 RT_ComponentFactory_get_id(
struct RT_ComponentFactory *factory);
747 MUST_CHECK_RETURN RTDllExport
RTI_BOOL
749 const char *
const name);
762 MUST_CHECK_RETURN RTDllExport
const char*
763 RT_ComponentFactoryId_get_name(
const RT_ComponentFactoryId_T *
const id);
777 MUST_CHECK_RETURN RTDllExport
RTI_BOOL
778 RT_ComponentFactoryId_equals(RT_ComponentFactoryId_T *
id,
779 const char *
const name);
795 MUST_CHECK_RETURN RTDllExport RTI_INT32
796 RT_ComponentFactoryId_compare(
const RT_ComponentFactoryId_T *id1,
797 const RT_ComponentFactoryId_T *id2);