Programming Language Type Description
The following programming language specific type representation is generated by rtiddsgen for use in application code, where:
HelloWorld.h
[$(NDDSHOME)/example/CPP/helloWorld/HelloWorld.h]
#ifndef HelloWorld_1436885487_h
#define HelloWorld_1436885487_h
#ifndef NDDS_STANDALONE_TYPE
#ifdef __cplusplus
#ifndef ndds_cpp_h
#include "ndds/ndds_cpp.h"
#endif
#else
#ifndef ndds_c_h
#include "ndds/ndds_c.h"
#endif
#endif
#else
#include "ndds_standalone_type.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern const char *HelloWorldTYPENAME;
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
struct HelloWorldSeq;
#ifndef NDDS_STANDALONE_TYPE
class HelloWorldTypeSupport;
class HelloWorldDataWriter;
class HelloWorldDataReader;
#endif
#endif
class HelloWorld
{
public:
#ifdef __cplusplus
typedef struct HelloWorldSeq Seq;
#ifndef NDDS_STANDALONE_TYPE
typedef HelloWorldTypeSupport TypeSupport;
typedef HelloWorldDataWriter DataWriter;
typedef HelloWorldDataReader DataReader;
#endif
#endif
char* msg;
};
#if (defined(RTI_WIN32) || defined (RTI_WINCE)) && defined(NDDS_USER_DLL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport __declspec(dllexport)
#endif
NDDSUSERDllExport
DDS_TypeCode* HelloWorld_get_typecode(
void);
DDS_SEQUENCE(HelloWorldSeq, HelloWorld);
NDDSUSERDllExport
RTIBool HelloWorld_initialize(
HelloWorld* self);
NDDSUSERDllExport
RTIBool HelloWorld_initialize_ex(
HelloWorld* self,RTIBool allocatePointers,RTIBool allocateMemory);
NDDSUSERDllExport
void HelloWorld_finalize(
HelloWorld* self);
NDDSUSERDllExport
void HelloWorld_finalize_ex(
HelloWorld* self,RTIBool deletePointers);
NDDSUSERDllExport
RTIBool HelloWorld_copy(
HelloWorld* dst,
const HelloWorld* src);
#if (defined(RTI_WIN32) || defined (RTI_WINCE)) && defined(NDDS_USER_DLL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport
#endif
#endif
HelloWorld.cxx
[$(NDDSHOME)/example/CPP/helloWorld/HelloWorld.cxx]
#ifndef NDDS_STANDALONE_TYPE
#ifdef __cplusplus
#ifndef ndds_cpp_h
#include "ndds/ndds_cpp.h"
#endif
#ifndef dds_c_log_impl_h
#include "dds_c/dds_c_log_impl.h"
#endif
#else
#ifndef ndds_c_h
#include "ndds/ndds_c.h"
#endif
#endif
#ifndef cdr_type_h
#include "cdr/cdr_type.h"
#endif
#ifndef osapi_heap_h
#include "osapi/osapi_heap.h"
#endif
#else
#include "ndds_standalone_type.h"
#endif
#include "HelloWorld.h"
const char *HelloWorldTYPENAME = "HelloWorld";
{
static RTIBool is_initialized = RTI_FALSE;
static DDS_TypeCode HelloWorld_g_tc_msg_string = DDS_INITIALIZE_STRING_TYPECODE(128);
static DDS_TypeCode_Member HelloWorld_g_tc_members[1]=
{
{
(char *)"msg",
{
0,
-1,
NULL
},
0,
0,
0,
NULL,
0,
NULL
}
};
{{
-1,
(char *)"HelloWorld",
NULL,
0,
0,
NULL,
1,
HelloWorld_g_tc_members,
}};
if (is_initialized) {
return &HelloWorld_g_tc;
}
HelloWorld_g_tc_members[0]._representation._typeCode = (RTICdrTypeCode *)&HelloWorld_g_tc_msg_string;
is_initialized = RTI_TRUE;
return &HelloWorld_g_tc;
}
RTIBool HelloWorld_initialize(
HelloWorld* sample) {
return HelloWorld_initialize_ex(sample,RTI_TRUE,RTI_TRUE);
}
RTIBool HelloWorld_initialize_ex(
HelloWorld* sample,RTIBool allocatePointers,RTIBool allocateMemory)
{
if (allocatePointers) {}
if (allocateMemory) {}
if (allocateMemory) {
if (sample->msg == NULL) {
return RTI_FALSE;
}
} else {
if (sample->msg != NULL) {
sample->msg[0] = '\0';
}
}
return RTI_TRUE;
}
void HelloWorld_finalize(
HelloWorld* sample)
{
HelloWorld_finalize_ex(sample,RTI_TRUE);
}
void HelloWorld_finalize_ex(
HelloWorld* sample,RTIBool deletePointers)
{
if (sample) { }
if (deletePointers) {}
}
RTIBool HelloWorld_copy(
HelloWorld* dst,
const HelloWorld* src)
{
if (!RTICdrType_copyString(
dst->msg, src->msg, (128) + 1)) {
return RTI_FALSE;
}
return RTI_TRUE;
}
#define T HelloWorld
#define TSeq HelloWorldSeq
#define T_initialize_ex HelloWorld_initialize_ex
#define T_finalize_ex HelloWorld_finalize_ex
#define T_copy HelloWorld_copy
#ifndef NDDS_STANDALONE_TYPE
#include "dds_c/generic/dds_c_sequence_TSeq.gen"
#ifdef __cplusplus
#include "dds_cpp/generic/dds_cpp_sequence_TSeq.gen"
#endif
#else
#include "dds_c_sequence_TSeq.gen"
#ifdef __cplusplus
#include "dds_cpp_sequence_TSeq.gen"
#endif
#endif
#undef T_copy
#undef T_finalize_ex
#undef T_initialize_ex
#undef TSeq
#undef T