RTI Connext .Net APIs  Version 6.0.1
HelloWorld.cpp

Programming Language Type Description

The following programming language specific type representation is generated by rtiddsgen for use in application code, where:

The following files are always generated in the C++/CLI language, even when code is generated with the -language C# option, because they depend on unmanaged code that ships with RTI Connext. Once compiled, the code can be used from either C++/CLI or C# code; see the C# publisher and subscriber example code.

HelloWorld.h

/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from HelloWorld.idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Connext distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Connext manual.
*/
#pragma once
struct DDS_TypeCode;
using namespace System;
using namespace DDS;
public ref struct HelloWorld
: public DDS::ICopyable<HelloWorld^> {
// --- Declared members: -------------------------------------------------
public:
System::String^ msg;
// --- Static constants: -------------------------------------
public:
// --- Constructors and destructors: -------------------------------------
public:
HelloWorld();
// --- Utility methods: --------------------------------------------------
public:
virtual void clear() ;
virtual System::Boolean copy_from(HelloWorld^ src);
virtual System::Boolean Equals(System::Object^ other) override;
#ifndef NDDS_STANDALONE_TYPE
static DDS::TypeCode^ get_typecode();
private:
static DDS::TypeCode^ _typecode;
#endif
}; // class HelloWorld
public ref class HelloWorldSeq sealed
: public DDS::UserRefSequence<HelloWorld^> {
public:
HelloWorldSeq() :
DDS::UserRefSequence<HelloWorld^>() {
// empty
}
HelloWorldSeq(System::Int32 max) :
DDS::UserRefSequence<HelloWorld^>(max) {
// empty
}
HelloWorldSeq(HelloWorldSeq^ src) :
DDS::UserRefSequence<HelloWorld^>(src) {
// empty
}
};
#ifndef NDDS_STANDALONE_TYPE
#define NDDSUSERDllExport
NDDSUSERDllExport DDS_TypeCode* HelloWorld_get_typecode();
#endif

HelloWorld.cpp

/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from HelloWorld.idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Connext distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Connext manual.
*/
#pragma unmanaged
#include "ndds/ndds_cpp.h"
#pragma managed
using namespace System;
using namespace System::Collections;
using namespace DDS;
#include "HelloWorld.h"
/* ========================================================================= */
HelloWorld::HelloWorld() {
msg = "";
}
void HelloWorld::clear(){
msg = "";
}
System::Boolean HelloWorld::copy_from(HelloWorld^ src) {
HelloWorld^ dst = this;
dst->msg = src->msg;
return true;
}
Boolean HelloWorld::Equals(Object^ other) {
if (other == nullptr) {
return false;
}
if (this == other) {
return true;
}
HelloWorld^ otherObj =
dynamic_cast<HelloWorld^>(other);
if (otherObj == nullptr) {
return false;
}
if (!msg->Equals(otherObj->msg)) {
return false;
}
return true;
}
#ifndef NDDS_STANDALONE_TYPE
DDS::TypeCode^ HelloWorld::get_typecode() {
if (_typecode == nullptr) {
_typecode = gcnew DDS::TypeCode(HelloWorld_get_typecode());
}
return _typecode;
}
#endif
#ifndef NDDS_STANDALONE_TYPE
DDS_TypeCode* HelloWorld_get_typecode()
{
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",/* Member name */
{
0,/* Representation ID */
DDS_BOOLEAN_FALSE,/* Is a pointer? */
-1, /* Bitfield bits */
NULL/* Member type code is assigned later */
},
0, /* Ignored */
0, /* Ignored */
0, /* Ignored */
NULL, /* Ignored */
RTI_CDR_REQUIRED_MEMBER, /* Is a key? */
DDS_PUBLIC_MEMBER,/* Member visibility */
1,
NULL, /* Ignored */
RTICdrTypeCodeAnnotations_INITIALIZER
}
};
static DDS_TypeCode HelloWorld_g_tc =
{{
DDS_TK_STRUCT, /* Kind */
DDS_BOOLEAN_FALSE, /* Ignored */
-1, /*Ignored*/
(char *)"HelloWorld", /* Name */
NULL, /* Ignored */
0, /* Ignored */
0, /* Ignored */
NULL, /* Ignored */
1, /* Number of members */
HelloWorld_g_tc_members, /* Members */
DDS_VM_NONE, /* Ignored */
RTICdrTypeCodeAnnotations_INITIALIZER,
DDS_BOOLEAN_TRUE, /* _isCopyable */
NULL, /* _sampleAccessInfo: assigned later */
NULL /* _typePlugin: assigned later */
}}; /* Type code for HelloWorld*/
if (is_initialized) {
return &HelloWorld_g_tc;
}
HelloWorld_g_tc._data._annotations._allowedDataRepresentationMask = 5;
HelloWorld_g_tc_members[0]._representation._typeCode = (RTICdrTypeCode *)&HelloWorld_g_tc_msg_string;
/* Initialize the values for member annotations. */
HelloWorld_g_tc_members[0]._annotations._defaultValue._d = RTI_XCDR_TK_STRING;
HelloWorld_g_tc_members[0]._annotations._defaultValue._u.string_value = (DDS_Char *) "";
HelloWorld_g_tc._data._sampleAccessInfo = NULL;
is_initialized = RTI_TRUE;
return &HelloWorld_g_tc;
}
#endif

RTI Connext .Net APIs Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc