TypeSupportImpl.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
00009 
00010 #include "TypeSupportImpl.h"
00011 
00012 #include "Registered_Data_Types.h"
00013 
00014 namespace OpenDDS {
00015 namespace DCPS {
00016 
00017 TypeSupportImpl::~TypeSupportImpl()
00018 {}
00019 
00020 DDS::ReturnCode_t
00021 TypeSupportImpl::register_type(DDS::DomainParticipant_ptr participant,
00022                                const char* type_name)
00023 {
00024   if (type_name == 0 || type_name[0] == '\0') {
00025     this->type_name_ = this->get_type_name();
00026   } else {
00027     this->type_name_ = type_name;
00028   }
00029 
00030   return Registered_Data_Types->register_type(participant,
00031                                               this->type_name_.in(), this);
00032 }
00033 
00034 char*
00035 TypeSupportImpl::get_type_name()
00036 {
00037   if (type_name_.in() == 0) {
00038     return CORBA::string_dup(default_type_name());
00039   } else {
00040     return CORBA::string_dup(type_name_.in());
00041   }
00042 }
00043 
00044 }
00045 }

Generated on Fri Feb 12 20:05:28 2016 for OpenDDS by  doxygen 1.4.7