Line data Source code
1 : /* 2 : * Distributed under the OpenDDS License. 3 : * See: http://www.opendds.org/license.html 4 : */ 5 : 6 : #ifndef OPENDDS_DCPS_XTYPES_DYNAMIC_DATA_FACTORY_H 7 : #define OPENDDS_DCPS_XTYPES_DYNAMIC_DATA_FACTORY_H 8 : 9 : #ifndef OPENDDS_SAFETY_PROFILE 10 : # include <dds/DCPS/LocalObject.h> 11 : 12 : # include <dds/DdsDynamicDataC.h> 13 : 14 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 15 : 16 : namespace DDS { 17 : 18 : class DynamicDataFactory; 19 : typedef DynamicDataFactory* DynamicDataFactory_ptr; 20 : 21 : typedef TAO_Objref_Var_T<DynamicDataFactory> DynamicDataFactory_var; 22 : 23 : class OpenDDS_Dcps_Export DynamicDataFactory 24 : : public OpenDDS::DCPS::LocalObject<DynamicDataFactoryInterf> 25 : { 26 : public: 27 : typedef DynamicDataFactory_ptr _ptr_type; 28 : typedef DynamicDataFactory_var _var_type; 29 : 30 1 : DynamicDataFactory() 31 1 : { 32 1 : } 33 : 34 1 : virtual ~DynamicDataFactory() {} 35 : 36 : static DynamicDataFactory_ptr get_instance(); 37 : 38 : DynamicData_ptr create_data(DynamicType_ptr type); 39 : 40 0 : ReturnCode_t delete_data(DynamicData_ptr /*data*/) 41 : { 42 0 : return RETCODE_OK; 43 : } 44 : 45 0 : CORBA::Boolean _is_a(const char* type_id) 46 : { 47 0 : return DynamicDataFactoryInterf::_is_a(type_id); 48 : } 49 : 50 0 : const char* _interface_repository_id() const 51 : { 52 0 : return DynamicDataFactoryInterf::_interface_repository_id(); 53 : } 54 : 55 0 : CORBA::Boolean marshal(TAO_OutputCDR&) 56 : { 57 0 : return false; 58 : } 59 : 60 : static DynamicDataFactory_ptr _duplicate(DynamicDataFactory_ptr obj); 61 : }; 62 : 63 : } // namespace DDS 64 : 65 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 66 : 67 : # ifndef DDS_DYNAMICDATAFACTORY__TRAITS_ 68 : # define DDS_DYNAMICDATAFACTORY__TRAITS_ 69 : TAO_BEGIN_VERSIONED_NAMESPACE_DECL 70 : namespace TAO { 71 : template<> 72 : struct OpenDDS_Dcps_Export Objref_Traits<DDS::DynamicDataFactory> { 73 : static DDS::DynamicDataFactory_ptr duplicate(DDS::DynamicDataFactory_ptr p); 74 : static void release(DDS::DynamicDataFactory_ptr p); 75 : static DDS::DynamicDataFactory_ptr nil(); 76 : static CORBA::Boolean marshal(const DDS::DynamicDataFactory_ptr p, TAO_OutputCDR & cdr); 77 : }; 78 : } // namespace TAO 79 : TAO_END_VERSIONED_NAMESPACE_DECL 80 : # endif 81 : 82 : #endif // OPENDDS_SAFETY_PROFILE 83 : 84 : #endif // OPENDDS_DCPS_XTYPES_DYNAMIC_TYPE_FACTORY_H