#ifndef HelloWorldPlugin_1436885487_h
#define HelloWorldPlugin_1436885487_h
 
#include "HelloWorld.h"
 
struct RTICdrStream;
 
#ifndef pres_typePlugin_h
#include "pres/pres_typePlugin.h"
#endif
 
#if (defined(RTI_WIN32) || defined (RTI_WINCE) || defined(RTI_INTIME)) && defined(NDDS_USER_DLL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport __declspec(dllexport)
#endif
 
#ifdef __cplusplus
extern "C" {
    #endif
 
    #define HelloWorldPlugin_get_sample PRESTypePluginDefaultEndpointData_getSample 
 
    #define HelloWorldPlugin_get_buffer PRESTypePluginDefaultEndpointData_getBuffer 
    #define HelloWorldPlugin_return_buffer PRESTypePluginDefaultEndpointData_returnBuffer
 
    #define HelloWorldPlugin_create_sample PRESTypePluginDefaultEndpointData_createSample 
    #define HelloWorldPlugin_destroy_sample PRESTypePluginDefaultEndpointData_deleteSample 
 
    
 
    NDDSUSERDllExport extern HelloWorld*
    HelloWorldPluginSupport_create_data_w_params(
 
    NDDSUSERDllExport extern HelloWorld*
    HelloWorldPluginSupport_create_data_ex(RTIBool allocate_pointers);
 
    NDDSUSERDllExport extern HelloWorld*
    HelloWorldPluginSupport_create_data(void);
 
    NDDSUSERDllExport extern RTIBool 
    HelloWorldPluginSupport_copy_data(
        HelloWorld *out,
        const HelloWorld *in);
 
    NDDSUSERDllExport extern void 
    HelloWorldPluginSupport_destroy_data_w_params(
        HelloWorld *sample,
 
    NDDSUSERDllExport extern void 
    HelloWorldPluginSupport_destroy_data_ex(
        HelloWorld *sample,RTIBool deallocate_pointers);
 
    NDDSUSERDllExport extern void 
    HelloWorldPluginSupport_destroy_data(
        HelloWorld *sample);
 
    NDDSUSERDllExport extern void 
    HelloWorldPluginSupport_print_data(
        const HelloWorld *sample,
        const char *desc,
        unsigned int indent);
 
    
 
    NDDSUSERDllExport extern PRESTypePluginParticipantData 
    HelloWorldPlugin_on_participant_attached(
        void *registration_data, 
        const struct PRESTypePluginParticipantInfo *participant_info,
        RTIBool top_level_registration, 
        void *container_plugin_context,
        RTICdrTypeCode *typeCode);
 
    NDDSUSERDllExport extern void 
    HelloWorldPlugin_on_participant_detached(
        PRESTypePluginParticipantData participant_data);
 
    NDDSUSERDllExport extern PRESTypePluginEndpointData 
    HelloWorldPlugin_on_endpoint_attached(
        PRESTypePluginParticipantData participant_data,
        const struct PRESTypePluginEndpointInfo *endpoint_info,
        RTIBool top_level_registration, 
        void *container_plugin_context);
 
    NDDSUSERDllExport extern void 
    HelloWorldPlugin_on_endpoint_detached(
        PRESTypePluginEndpointData endpoint_data);
 
    NDDSUSERDllExport extern void    
    HelloWorldPlugin_return_sample(
        PRESTypePluginEndpointData endpoint_data,
        HelloWorld *sample,
        void *handle);    
 
    NDDSUSERDllExport extern RTIBool 
    HelloWorldPlugin_copy_sample(
        PRESTypePluginEndpointData endpoint_data,
        HelloWorld *out,
        const HelloWorld *in);
 
    
 
    NDDSUSERDllExport extern RTIBool
    HelloWorldPlugin_serialize_to_cdr_buffer(
        char * buffer,
        unsigned int * length,
        const HelloWorld *sample); 
 
    NDDSUSERDllExport extern RTIBool
    HelloWorldPlugin_serialize_to_cdr_buffer_ex(
        char *buffer,
        unsigned int *length,
        const HelloWorld *sample,
 
    NDDSUSERDllExport extern RTIBool
    HelloWorldPlugin_deserialize_from_cdr_buffer(
        HelloWorld *sample,
        const char * buffer,
        unsigned int length);    
    #if !defined (NDDS_STANDALONE_TYPE)
    HelloWorldPlugin_data_to_string(
        const HelloWorld *sample,
        char *str,
    #endif
 
    NDDSUSERDllExport extern unsigned int 
    HelloWorldPlugin_get_serialized_sample_max_size(
        PRESTypePluginEndpointData endpoint_data,
        RTIBool include_encapsulation,
        RTIEncapsulationId encapsulation_id,
        unsigned int current_alignment);
 
    
    NDDSUSERDllExport extern PRESTypePluginKeyKind 
    HelloWorldPlugin_get_key_kind(void);
 
    NDDSUSERDllExport extern unsigned int 
    HelloWorldPlugin_get_serialized_key_max_size(
        PRESTypePluginEndpointData endpoint_data,
        RTIBool include_encapsulation,
        RTIEncapsulationId encapsulation_id,
        unsigned int current_alignment);
 
    NDDSUSERDllExport extern unsigned int 
    HelloWorldPlugin_get_serialized_key_max_size_for_keyhash(
        PRESTypePluginEndpointData endpoint_data,
        RTIEncapsulationId encapsulation_id,
        unsigned int current_alignment);
 
    NDDSUSERDllExport extern RTIBool 
    HelloWorldPlugin_deserialize_key(
        PRESTypePluginEndpointData endpoint_data,
        HelloWorld ** sample,
        RTIBool * drop_sample,
        struct RTICdrStream *cdrStream,
        RTIBool deserialize_encapsulation,
        RTIBool deserialize_key,
        void *endpoint_plugin_qos);
 
    NDDSUSERDllExport extern
    struct RTIXCdrInterpreterPrograms * HelloWorldPlugin_get_programs(void);
 
    
    NDDSUSERDllExport extern struct PRESTypePlugin*
    HelloWorldPlugin_new(void);
 
    NDDSUSERDllExport extern void
    HelloWorldPlugin_delete(struct PRESTypePlugin *);
 
    #ifdef __cplusplus
}
#endif
 
#if (defined(RTI_WIN32) || defined (RTI_WINCE) || defined(RTI_INTIME)) && defined(NDDS_USER_DLL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport
#endif
 
#endif 
RTICdrUnsignedLong DDS_UnsignedLong
Defines an unsigned long integer data type, equivalent to IDL/CDR unsigned long.
Definition: common.ifc:249
 
DDS_Short DDS_DataRepresentationId_t
A two-byte signed integer that identifies a data representation.
Definition: infrastructure.ifc:8981
 
DDS_ReturnCode_t
Type for return codes.
Definition: infrastructure.ifc:1352
 
Configures whether or not to allocate pointer and optional members.
Definition: common.ifc:461
 
Configures whether to release or not pointer and optional members.
Definition: common.ifc:507
 
 
 
 
#include <string.h>
 
#ifndef ndds_c_h
#include "ndds/ndds_c.h"
#endif
 
#ifndef osapi_type_h
#include "osapi/osapi_type.h"
#endif
#ifndef osapi_heap_h
#include "osapi/osapi_heap.h"
#endif
 
#ifndef osapi_utility_h
#include "osapi/osapi_utility.h"
#endif
 
#ifndef cdr_type_h
#include "cdr/cdr_type.h"
#endif
 
#ifndef cdr_type_object_h
#include "cdr/cdr_typeObject.h"
#endif
 
#ifndef cdr_encapsulation_h
#include "cdr/cdr_encapsulation.h"
#endif
 
#ifndef cdr_stream_h
#include "cdr/cdr_stream.h"
#endif
 
#include "xcdr/xcdr_interpreter.h"
#include "xcdr/xcdr_stream.h"
 
#ifndef cdr_log_h
#include "cdr/cdr_log.h"
#endif
 
#ifndef pres_typePlugin_h
#include "pres/pres_typePlugin.h"
#endif
 
#include "dds_c/dds_c_typecode_impl.h"
 
#define RTI_CDR_CURRENT_SUBMODULE RTI_CDR_SUBMODULE_MASK_STREAM
 
#include "HelloWorldPlugin.h"
 
 
 
HelloWorld*
HelloWorldPluginSupport_create_data_w_params(
{
    HelloWorld *sample = NULL;
 
    if (alloc_params == NULL) {
        return NULL;
    } 
else if(!alloc_params->
allocate_memory) {
 
        RTICdrLog_exception(&RTI_CDR_LOG_TYPE_OBJECT_NOT_ASSIGNABLE_ss,
        "alloc_params->allocate_memory","false");
        return NULL;
    }
 
    RTIOsapiHeap_allocateStructure(&(sample),HelloWorld);
    if (sample == NULL) {
        return NULL;
    }
 
    if (!HelloWorld_initialize_w_params(sample,alloc_params)) {
        DDS_TYPE_DEALLOCATION_PARAMS_DEFAULT;
        
        
        
        
        HelloWorld_finalize_w_params(sample, &deallocParams);
        
        
        RTIOsapiHeap_freeStructure(sample);
        sample=NULL;
    }
    return sample;
}
 
HelloWorld *
HelloWorldPluginSupport_create_data_ex(RTIBool allocate_pointers) 
{
    HelloWorld *sample = NULL;
 
    RTIOsapiHeap_allocateStructure(&(sample),HelloWorld);
 
    if(sample == NULL) {
        return NULL;
    }
 
    
    if (!HelloWorld_initialize_ex(sample,allocate_pointers, RTI_TRUE)) {
        
        
        
        
        HelloWorld_finalize_ex(sample, RTI_TRUE);
        
        
        RTIOsapiHeap_freeStructure(sample);
        sample=NULL;
    }
 
    return sample;
}
 
HelloWorld *
HelloWorldPluginSupport_create_data(void)
{
    return HelloWorldPluginSupport_create_data_ex(RTI_TRUE);
}
 
void 
HelloWorldPluginSupport_destroy_data_w_params(
    HelloWorld *sample,
    HelloWorld_finalize_w_params(sample,dealloc_params);
 
    RTIOsapiHeap_freeStructure(sample);
}
 
void 
HelloWorldPluginSupport_destroy_data_ex(
    HelloWorld *sample,RTIBool deallocate_pointers) {
    HelloWorld_finalize_ex(sample,deallocate_pointers);
 
    RTIOsapiHeap_freeStructure(sample);
}
 
void 
HelloWorldPluginSupport_destroy_data(
    HelloWorld *sample) {
 
    HelloWorldPluginSupport_destroy_data_ex(sample,RTI_TRUE);
 
}
 
RTIBool 
HelloWorldPluginSupport_copy_data(
    HelloWorld *dst,
    const HelloWorld *src)
{
    return HelloWorld_copy(dst,(const HelloWorld*) src);
}
 
void 
HelloWorldPluginSupport_print_data(
    const HelloWorld *sample,
    const char *desc,
    unsigned int indent_level)
{
 
    RTICdrType_printIndent(indent_level);
 
    if (desc != NULL) {
        RTILogParamString_printPlain("%s:\n", desc);
    } else {
        RTILogParamString_printPlain("\n");
    }
 
    if (sample == NULL) {
        RTILogParamString_printPlain("NULL\n");
        return;
    }
 
    if (sample->msg==NULL) {
        RTICdrType_printString(
            NULL,
            "msg",
            RTIOsapiUtility_uInt32Plus1(indent_level));
    } else {
        RTICdrType_printString(
            sample->msg,
            "msg",
            RTIOsapiUtility_uInt32Plus1(indent_level));
    }
 
}
 
 
PRESTypePluginParticipantData 
HelloWorldPlugin_on_participant_attached(
    void *registration_data,
    const struct PRESTypePluginParticipantInfo *participant_info,
    RTIBool top_level_registration,
    void *container_plugin_context,
    RTICdrTypeCode *type_code)
{
    struct RTIXCdrInterpreterPrograms *programs = NULL;
    struct RTIXCdrInterpreterProgramsGenProperty programProperty =
    RTIXCdrInterpreterProgramsGenProperty_INITIALIZER;
    struct PRESTypePluginDefaultParticipantData *pd = NULL;
 
    if (registration_data) {} 
    if (participant_info) {} 
    if (top_level_registration) {} 
    if (container_plugin_context) {} 
    if (type_code) {} 
 
    pd = (struct PRESTypePluginDefaultParticipantData *)
    PRESTypePluginDefaultParticipantData_new(participant_info);
 
    programProperty.generateV1Encapsulation = RTI_XCDR_TRUE;
    programProperty.generateV2Encapsulation = RTI_XCDR_TRUE;
    programProperty.resolveAlias = RTI_XCDR_TRUE;
    programProperty.inlineStruct = RTI_XCDR_TRUE;
    programProperty.optimizeEnum = RTI_XCDR_TRUE;
    programProperty.unboundedSize = RTIXCdrLong_MAX;
 
    programs = DDS_TypeCodeFactory_assert_programs_in_global_list(
        HelloWorld_get_typecode(),
        &programProperty,
        RTI_XCDR_PROGRAM_MASK_TYPEPLUGIN);
    if (programs == NULL) {
        PRESTypePluginDefaultParticipantData_delete(
            (PRESTypePluginParticipantData) pd);
        return NULL;
    }
 
    pd->programs = programs;
    return (PRESTypePluginParticipantData)pd;
}
 
void 
HelloWorldPlugin_on_participant_detached(
    PRESTypePluginParticipantData participant_data)
{               
    if (participant_data != NULL) {
        struct PRESTypePluginDefaultParticipantData *pd = 
        (struct PRESTypePluginDefaultParticipantData *)participant_data;
 
        if (pd->programs != NULL) {
            DDS_TypeCodeFactory_remove_programs_from_global_list(
                pd->programs);
            pd->programs = NULL;
        }
        PRESTypePluginDefaultParticipantData_delete(participant_data);
    }
}
 
PRESTypePluginEndpointData
HelloWorldPlugin_on_endpoint_attached(
    PRESTypePluginParticipantData participant_data,
    const struct PRESTypePluginEndpointInfo *endpoint_info,
    RTIBool top_level_registration, 
    void *containerPluginContext)
{
    PRESTypePluginEndpointData epd = NULL;
    unsigned int serializedSampleMaxSize = 0;
 
    if (top_level_registration) {} 
    if (containerPluginContext) {} 
 
    if (participant_data == NULL) {
        return NULL;
    } 
 
    epd = PRESTypePluginDefaultEndpointData_new(
        participant_data,
        endpoint_info,
        (PRESTypePluginDefaultEndpointDataCreateSampleFunction)
        HelloWorldPluginSupport_create_data,
        (PRESTypePluginDefaultEndpointDataDestroySampleFunction)
        HelloWorldPluginSupport_destroy_data,
        NULL , NULL );
 
    if (epd == NULL) {
        return NULL;
    } 
 
    if (endpoint_info->endpointKind == PRES_TYPEPLUGIN_ENDPOINT_WRITER) {
        serializedSampleMaxSize = HelloWorldPlugin_get_serialized_sample_max_size(
            epd,RTI_FALSE,RTI_CDR_ENCAPSULATION_ID_CDR_BE,0);
        PRESTypePluginDefaultEndpointData_setMaxSizeSerializedSample(epd, serializedSampleMaxSize);
 
        if (PRESTypePluginDefaultEndpointData_createWriterPool(
            epd,
            endpoint_info,
            (PRESTypePluginGetSerializedSampleMaxSizeFunction)
            HelloWorldPlugin_get_serialized_sample_max_size, epd,
            (PRESTypePluginGetSerializedSampleSizeFunction)
            PRESTypePlugin_interpretedGetSerializedSampleSize,
            epd) == RTI_FALSE) {
            PRESTypePluginDefaultEndpointData_delete(epd);
            return NULL;
        }
    }
 
    return epd;    
}
 
void 
HelloWorldPlugin_on_endpoint_detached(
    PRESTypePluginEndpointData endpoint_data)
{
    PRESTypePluginDefaultEndpointData_delete(endpoint_data);
}
 
void    
HelloWorldPlugin_return_sample(
    PRESTypePluginEndpointData endpoint_data,
    HelloWorld *sample,
    void *handle)
{
    HelloWorld_finalize_optional_members(sample, RTI_TRUE);
 
    PRESTypePluginDefaultEndpointData_returnSample(
        endpoint_data, sample, handle);
}
 
void HelloWorldPlugin_finalize_optional_members(
    PRESTypePluginEndpointData endpoint_data,
    HelloWorld* sample,
    RTIBool deletePointers)
{
    RTIOsapiUtility_unusedParameter(endpoint_data);
    HelloWorld_finalize_optional_members(
        sample, deletePointers);
}
 
RTIBool 
HelloWorldPlugin_copy_sample(
    PRESTypePluginEndpointData endpoint_data,
    HelloWorld *dst,
    const HelloWorld *src)
{
    if (endpoint_data) {} 
    return HelloWorldPluginSupport_copy_data(dst,src);
}
 
unsigned int 
HelloWorldPlugin_get_serialized_sample_max_size(
    PRESTypePluginEndpointData endpoint_data,
    RTIBool include_encapsulation,
    RTIEncapsulationId encapsulation_id,
    unsigned int current_alignment);
 
RTIBool
HelloWorldPlugin_serialize_to_cdr_buffer_ex(
    char *buffer,
    unsigned int *length,
    const HelloWorld *sample,
{
    RTIEncapsulationId encapsulationId = RTI_CDR_ENCAPSULATION_ID_INVALID;
    struct RTICdrStream cdrStream;
    struct PRESTypePluginDefaultEndpointData epd;
    RTIBool result;
    struct PRESTypePluginDefaultParticipantData pd;
    struct RTIXCdrTypePluginProgramContext defaultProgramContext =
    RTIXCdrTypePluginProgramContext_INTIALIZER;
    struct PRESTypePlugin plugin;
 
    if (length == NULL) {
        return RTI_FALSE;
    }
 
    RTIOsapiMemory_zero(&epd, sizeof(struct PRESTypePluginDefaultEndpointData));
    epd.programContext = defaultProgramContext;
    epd._participantData = &pd;
    epd.typePlugin = &plugin;
    epd.programContext.endpointPluginData = &epd;
    plugin.typeCode = (struct RTICdrTypeCode *)
    HelloWorld_get_typecode();
    pd.programs = HelloWorldPlugin_get_programs();
    if (pd.programs == NULL) {
        return RTI_FALSE;
    }
 
    encapsulationId = DDS_TypeCode_get_native_encapsulation(
        representation);    
    if (encapsulationId == RTI_CDR_ENCAPSULATION_ID_INVALID) {
        return RTI_FALSE;
    }
 
    epd._maxSizeSerializedSample =
    HelloWorldPlugin_get_serialized_sample_max_size(
        (PRESTypePluginEndpointData)&epd, 
        RTI_TRUE, 
        encapsulationId,
        0);
 
    if (buffer == NULL) {
        *length = 
        PRESTypePlugin_interpretedGetSerializedSampleSize(
            (PRESTypePluginEndpointData)&epd,
            RTI_TRUE,
            encapsulationId,
            0,
            sample);
 
        if (*length == 0) {
            return RTI_FALSE;
        }
 
        return RTI_TRUE;
    }    
 
    RTICdrStream_init(&cdrStream);
    RTICdrStream_set(&cdrStream, (char *)buffer, *length);
 
    result = PRESTypePlugin_interpretedSerialize(
        (PRESTypePluginEndpointData)&epd,
        sample,
        &cdrStream,
        RTI_TRUE,
        encapsulationId,
        RTI_TRUE,
        NULL);
 
    *length = (unsigned int) RTICdrStream_getCurrentPositionOffset(&cdrStream);
    return result;
}
 
RTIBool
HelloWorldPlugin_serialize_to_cdr_buffer(
    char *buffer,
    unsigned int *length,
    const HelloWorld *sample)
{
    return HelloWorldPlugin_serialize_to_cdr_buffer_ex(
        buffer,
        length,
        sample,
}
 
RTIBool
HelloWorldPlugin_deserialize_from_cdr_buffer(
    HelloWorld *sample,
    const char * buffer,
    unsigned int length)
{
    struct RTICdrStream cdrStream;
    struct PRESTypePluginDefaultEndpointData epd;
    struct RTIXCdrTypePluginProgramContext defaultProgramContext =
    RTIXCdrTypePluginProgramContext_INTIALIZER;
    struct PRESTypePluginDefaultParticipantData pd;
    struct PRESTypePlugin plugin;
 
    epd.programContext = defaultProgramContext;
    epd._participantData = &pd;
    epd.typePlugin = &plugin;
    epd.programContext.endpointPluginData = &epd;
    plugin.typeCode = (struct RTICdrTypeCode *)
    HelloWorld_get_typecode();
    pd.programs = HelloWorldPlugin_get_programs();
    if (pd.programs == NULL) {
        return RTI_FALSE;
    }
    RTIXCdrSampleAssignabilityProperty_setFromGlobalComplianceMask(
        &epd._assignabilityProperty);
 
    RTICdrStream_init(&cdrStream);
    RTICdrStream_set(&cdrStream, (char *)buffer, length);
 
    HelloWorld_finalize_optional_members(sample, RTI_TRUE);
    return PRESTypePlugin_interpretedDeserialize( 
        (PRESTypePluginEndpointData)&epd, sample,
        &cdrStream, RTI_TRUE, RTI_TRUE,
        NULL);
}
 
#if !defined(NDDS_STANDALONE_TYPE)
HelloWorldPlugin_data_to_string(
    const HelloWorld *sample,
    char *_str,
{
    char *buffer = NULL;
    unsigned int length = 0;
    struct DDS_PrintFormat printFormat;
 
    if (sample == NULL) {
    }
 
    if (str_size == NULL) {
    }
 
    if (property == NULL) {
    }
    if (!HelloWorldPlugin_serialize_to_cdr_buffer(
        NULL, 
        &length, 
        sample)) {
    }
 
    RTIOsapiHeap_allocateBuffer(&buffer, length, RTI_OSAPI_ALIGNMENT_DEFAULT);
    if (buffer == NULL) {
    }
 
    if (!HelloWorldPlugin_serialize_to_cdr_buffer(
        buffer, 
        &length, 
        sample)) {
        RTIOsapiHeap_freeBuffer(buffer);
    }
        HelloWorld_get_typecode(), 
    if (data == NULL) {
        RTIOsapiHeap_freeBuffer(buffer);
    }
 
        RTIOsapiHeap_freeBuffer(buffer);
        return retCode;
    }
 
    retCode = DDS_PrintFormatProperty_to_print_format(
        property, 
        &printFormat);
        RTIOsapiHeap_freeBuffer(buffer);
        return retCode;
    }
 
    retCode = DDS_DynamicDataFormatter_to_string_w_format(
        data, 
        _str,
        str_size, 
        &printFormat);
        RTIOsapiHeap_freeBuffer(buffer);
        return retCode;
    }
 
    RTIOsapiHeap_freeBuffer(buffer);
}
#endif
 
unsigned int 
HelloWorldPlugin_get_serialized_sample_max_size(
    PRESTypePluginEndpointData endpoint_data,
    RTIBool include_encapsulation,
    RTIEncapsulationId encapsulation_id,
    unsigned int current_alignment)
{
    unsigned int size;
    RTIBool overflow = RTI_FALSE;
 
    size = PRESTypePlugin_interpretedGetSerializedSampleMaxSize(
        endpoint_data,&overflow,include_encapsulation,encapsulation_id,current_alignment);
 
    if (overflow) {
        size = RTI_CDR_MAX_SERIALIZED_SIZE;
    }
 
    return size;
}
 
 
PRESTypePluginKeyKind 
HelloWorldPlugin_get_key_kind(void)
{
    return PRES_TYPEPLUGIN_NO_KEY;
}
 
RTIBool HelloWorldPlugin_deserialize_key(
    PRESTypePluginEndpointData endpoint_data,
    HelloWorld **sample, 
    RTIBool * drop_sample,
    struct RTICdrStream *cdrStream,
    RTIBool deserialize_encapsulation,
    RTIBool deserialize_key,
    void *endpoint_plugin_qos)
{
    RTIBool result;
    if (drop_sample) {} 
    
    result= PRESTypePlugin_interpretedDeserializeKey(
        endpoint_data,
        
        (sample != NULL) ? *sample : NULL,
        cdrStream,
        deserialize_encapsulation,
        deserialize_key,
        endpoint_plugin_qos);
    return result;    
 
}
 
unsigned int
HelloWorldPlugin_get_serialized_key_max_size(
    PRESTypePluginEndpointData endpoint_data,
    RTIBool include_encapsulation,
    RTIEncapsulationId encapsulation_id,
    unsigned int current_alignment)
{
    unsigned int size;
    RTIBool overflow = RTI_FALSE;
    size = PRESTypePlugin_interpretedGetSerializedKeyMaxSize(
        endpoint_data,&overflow,include_encapsulation,encapsulation_id,current_alignment);
    if (overflow) {
        size = RTI_CDR_MAX_SERIALIZED_SIZE;
    }
 
    return size;
}
 
unsigned int
HelloWorldPlugin_get_serialized_key_max_size_for_keyhash(
    PRESTypePluginEndpointData endpoint_data,
    RTIEncapsulationId encapsulation_id,
    unsigned int current_alignment)
{
    unsigned int size;
    RTIBool overflow = RTI_FALSE;
    size = PRESTypePlugin_interpretedGetSerializedKeyMaxSizeForKeyhash(
        endpoint_data,
        &overflow,
        encapsulation_id,
        current_alignment);
    if (overflow) {
        size = RTI_CDR_MAX_SERIALIZED_SIZE;
    }
 
    return size;
}
 
struct RTIXCdrInterpreterPrograms * HelloWorldPlugin_get_programs(void)
{
    struct RTIXCdrInterpreterProgramsGenProperty programProperty =
    RTIXCdrInterpreterProgramsGenProperty_INITIALIZER;
    struct RTIXCdrInterpreterPrograms *retPrograms = NULL;
 
    programProperty.generateWithOnlyKeyFields = RTI_XCDR_FALSE;
    programProperty.generateV1Encapsulation = RTI_XCDR_TRUE;
    programProperty.generateV2Encapsulation = RTI_XCDR_TRUE;
    programProperty.resolveAlias = RTI_XCDR_TRUE;
    programProperty.inlineStruct = RTI_XCDR_TRUE;
    programProperty.optimizeEnum = RTI_XCDR_TRUE;
    programProperty.unboundedSize = RTIXCdrLong_MAX;
 
    retPrograms =
    DDS_TypeCodeFactory_assert_programs_in_global_list(
        HelloWorld_get_typecode(),
        &programProperty,
        RTI_XCDR_SER_PROGRAM
        | RTI_XCDR_DESER_PROGRAM
        | RTI_XCDR_GET_MAX_SER_SIZE_PROGRAM
        | RTI_XCDR_GET_SER_SIZE_PROGRAM);
 
    return retPrograms;
}
 
struct PRESTypePlugin *HelloWorldPlugin_new(void) 
{ 
    struct PRESTypePlugin *plugin = NULL;
    const struct PRESTypePluginVersion PLUGIN_VERSION = 
    PRES_TYPE_PLUGIN_VERSION_2_0;
 
    RTIOsapiHeap_allocateStructure(
        &plugin, struct PRESTypePlugin);
 
    if (plugin == NULL) {
        return NULL;
    }
 
    plugin->version = PLUGIN_VERSION;
 
    
    plugin->onParticipantAttached =
    (PRESTypePluginOnParticipantAttachedCallback)
    HelloWorldPlugin_on_participant_attached;
    plugin->onParticipantDetached =
    (PRESTypePluginOnParticipantDetachedCallback)
    HelloWorldPlugin_on_participant_detached;
    plugin->onEndpointAttached =
    (PRESTypePluginOnEndpointAttachedCallback)
    HelloWorldPlugin_on_endpoint_attached;
    plugin->onEndpointDetached =
    (PRESTypePluginOnEndpointDetachedCallback)
    HelloWorldPlugin_on_endpoint_detached;
 
    plugin->copySampleFnc =
    (PRESTypePluginCopySampleFunction)
    HelloWorldPlugin_copy_sample;
    plugin->createSampleFnc =
    (PRESTypePluginCreateSampleFunction)
    HelloWorldPlugin_create_sample;
    plugin->destroySampleFnc =
    (PRESTypePluginDestroySampleFunction)
    HelloWorldPlugin_destroy_sample;
    plugin->finalizeOptionalMembersFnc =
    (PRESTypePluginFinalizeOptionalMembersFunction)
    HelloWorldPlugin_finalize_optional_members;
 
    plugin->serializeFnc = 
    (PRESTypePluginSerializeFunction) PRESTypePlugin_interpretedSerialize;
    plugin->deserializeFnc =
    (PRESTypePluginDeserializeFunction) PRESTypePlugin_interpretedDeserializeWithAlloc;
    plugin->getSerializedSampleMaxSizeFnc =
    (PRESTypePluginGetSerializedSampleMaxSizeFunction)
    HelloWorldPlugin_get_serialized_sample_max_size;
    plugin->getSerializedSampleMinSizeFnc =
    (PRESTypePluginGetSerializedSampleMinSizeFunction)
    PRESTypePlugin_interpretedGetSerializedSampleMinSize;
    plugin->getDeserializedSampleMaxSizeFnc = NULL; 
    plugin->getSampleFnc =
    (PRESTypePluginGetSampleFunction)
    HelloWorldPlugin_get_sample;
    plugin->returnSampleFnc =
    (PRESTypePluginReturnSampleFunction)
    HelloWorldPlugin_return_sample;
    plugin->getKeyKindFnc =
    (PRESTypePluginGetKeyKindFunction)
    HelloWorldPlugin_get_key_kind;
 
    
    plugin->serializeKeyFnc = NULL ;    
    plugin->deserializeKeyFnc = NULL;  
    plugin->getKeyFnc = NULL;
    plugin->returnKeyFnc = NULL;
    plugin->instanceToKeyFnc = NULL;
    plugin->keyToInstanceFnc = NULL;
    plugin->getSerializedKeyMaxSizeFnc = NULL;
    plugin->instanceToKeyHashFnc = NULL;
    plugin->serializedSampleToKeyHashFnc = NULL;
    plugin->serializedKeyToKeyHashFnc = NULL;    
    #ifdef NDDS_STANDALONE_TYPE
    plugin->typeCode = NULL; 
    #else
    plugin->typeCode =  (struct RTICdrTypeCode *)HelloWorld_get_typecode();
    #endif
    plugin->languageKind = PRES_TYPEPLUGIN_DDS_TYPE;
 
    
    plugin->getBuffer = 
    (PRESTypePluginGetBufferFunction)
    HelloWorldPlugin_get_buffer;
    plugin->returnBuffer = 
    (PRESTypePluginReturnBufferFunction)
    HelloWorldPlugin_return_buffer;
    plugin->getBufferWithParams = NULL;
    plugin->returnBufferWithParams = NULL;
    plugin->getSerializedSampleSizeFnc =
    (PRESTypePluginGetSerializedSampleSizeFunction)
    PRESTypePlugin_interpretedGetSerializedSampleSize;
 
    plugin->getWriterLoanedSampleFnc = NULL; 
    plugin->returnWriterLoanedSampleFnc = NULL;
    plugin->returnWriterLoanedSampleFromCookieFnc = NULL;
    plugin->validateWriterLoanedSampleFnc = NULL;
    plugin->setWriterLoanedSampleSerializedStateFnc = NULL;
 
    plugin->endpointTypeName = HelloWorldTYPENAME;
    plugin->isMetpType = RTI_FALSE;
    return plugin;
}
 
void
HelloWorldPlugin_delete(struct PRESTypePlugin *plugin)
{
    RTIOsapiHeap_freeStructure(plugin);
} 
#undef RTI_CDR_CURRENT_SUBMODULE 
const DDS_DataRepresentationId_t DDS_AUTO_DATA_REPRESENTATION
Representation is automatically chosen based on the type.
 
void DDS_DynamicData_delete(DDS_DynamicData *self)
Finalize and deallocate this DDS_DynamicData sample.
 
DDS_ReturnCode_t DDS_DynamicData_from_cdr_buffer(DDS_DynamicData *self, const char *buffer, unsigned int length)
Deserializes a DynamicData object from a buffer of octets.
 
DDS_DynamicData * DDS_DynamicData_new(const DDS_TypeCode *type, const struct DDS_DynamicDataProperty_t *property)
The constructor for new DDS_DynamicData objects.
 
const struct DDS_DynamicDataProperty_t DDS_DYNAMIC_DATA_PROPERTY_DEFAULT
Sentinel constant indicating default values for DDS_DynamicDataProperty_t.
 
@ DDS_RETCODE_OK
Successful return.
Definition: infrastructure.ifc:1355
 
@ DDS_RETCODE_ERROR
Generic, unspecified error.
Definition: infrastructure.ifc:1359
 
@ DDS_RETCODE_BAD_PARAMETER
Illegal parameter value.
Definition: infrastructure.ifc:1367
 
DDS_TypeCodeFactory * DDS_TypeCodeFactory_get_instance(void)
Gets the singleton instance of this class.
 
A sample of any complex data type, which can be inspected and manipulated reflectively.
Definition: dynamicdata.ifc:437
 
DDS_Boolean allocate_pointers
Whether to allocate pointer members or not.
Definition: common.ifc:464
 
The definition of a particular data type, which you can use to inspect the name, members,...
Definition: typecode.ifc:442
 
DDS_Boolean delete_pointers
Whether to delete pointer members or not.
Definition: common.ifc:511
 
DDS_Boolean delete_optional_members
Whether to delete optional members or not.
Definition: common.ifc:515