00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_TYPESUPPORTIMPL_H 00009 #define OPENDDS_DCPS_TYPESUPPORTIMPL_H 00010 00011 #include "dcps_export.h" 00012 #include "dds/DCPS/Definitions.h" 00013 #include "dds/DdsDcpsTypeSupportExtC.h" 00014 #include "LocalObject.h" 00015 00016 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00017 #pragma once 00018 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00019 00020 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00021 00022 namespace OpenDDS { 00023 namespace DCPS { 00024 00025 class MetaStruct; 00026 00027 template <typename Message> struct DDSTraits; 00028 00029 template <typename Message> struct MarshalTraits; 00030 00031 class OpenDDS_Dcps_Export TypeSupportImpl 00032 : public virtual LocalObject<TypeSupport> { 00033 public: 00034 TypeSupportImpl() {} 00035 00036 virtual ~TypeSupportImpl(); 00037 00038 #ifndef OPENDDS_NO_CONTENT_SUBSCRIPTION_PROFILE 00039 virtual const MetaStruct& getMetaStructForType() = 0; 00040 #endif 00041 00042 virtual DDS::ReturnCode_t register_type(DDS::DomainParticipant_ptr participant, 00043 const char* type_name); 00044 00045 virtual DDS::ReturnCode_t unregister_type(DDS::DomainParticipant_ptr participant, 00046 const char* type_name); 00047 00048 virtual char* get_type_name(); 00049 00050 private: 00051 virtual const char* default_type_name() const = 0; 00052 00053 OPENDDS_DELETED_COPY_MOVE_CTOR_ASSIGN(TypeSupportImpl) 00054 }; 00055 00056 } 00057 } 00058 00059 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00060 00061 #endif