Files
qt6-migration-pipeline/external/rti_connext_dds-7.7.0/include/ndds/cdr/cdr_sequence.h
T
torsten 77c67c12ca Execute the same instructions but now for tools in folders you are getti
Entire-Metadata: .entire/metadata/fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Session: fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Strategy: manual-commit
2026-09-24 16:24:51 +00:00

393 lines
16 KiB
C

/* (c) Copyright 2003-2021, Real-Time Innovations, Inc. All rights reserved. */
/*
* @(#)cdr_sequence.h generated by: makeheader Tue Apr 7 17:39:07 2026
*
* built from: sequence.ifc
*/
#ifndef cdr_sequence_h
#define cdr_sequence_h
#ifndef DDS_SEQUENCE_NO_HEADERS
#ifndef osapi_type_h
#include "osapi/osapi_type.h"
#endif
#ifndef dds_c_common_h
#include "dds_c/dds_c_common.h"
#endif
#ifndef dds_c_dll_h
#include "dds_c/dds_c_dll.h"
#endif
#ifndef reda_inlineMemory_h
#include "reda/reda_inlineMemory.h"
#endif
#endif
struct DDS_SeqElementTypeAllocationParams_t {
DDS_Boolean allocate_pointers;
DDS_Boolean allocate_optional_members;
DDS_Boolean allocate_memory;
};
struct DDS_SeqElementTypeDeallocationParams_t {
DDS_Boolean delete_pointers;
DDS_Boolean delete_optional_members;
};
#define DDS_SeqElementTypeAllocationParams_from_type_alloc_settings( \
self, typeAlloc) \
(self)->allocate_pointers = (typeAlloc)->allocate_pointers; \
(self)->allocate_optional_members = (typeAlloc)->allocate_optional_members; \
(self)->allocate_memory = (typeAlloc)->allocate_memory
#define DDS_SeqElementTypeDeallocationParams_from_type_dealloc_settings( \
self, typeDealloc) \
(self)->delete_pointers = (typeDealloc)->delete_pointers; \
(self)->delete_optional_members = (typeDealloc)->delete_optional_members
#define DDS_TypeAllocationParams_from_seq_type_alloc_settings( \
self, typeAlloc) \
(self)->allocate_pointers = (typeAlloc)->allocate_pointers; \
(self)->allocate_optional_members = (typeAlloc)->allocate_optional_members; \
(self)->allocate_memory = (typeAlloc)->allocate_memory
#define DDS_TypeDeallocationParams_from_seq_type_dealloc_settings( \
self, typeDealloc) \
(self)->delete_pointers = (typeDealloc)->delete_pointers; \
(self)->delete_optional_members = (typeDealloc)->delete_optional_members
#define DDS_SEQUENCE_MEMBERS(TSeq, T) \
T *_contiguous_buffer; \
T **_discontiguous_buffer; \
void *_read_token1; \
void *_read_token2; \
DDS_UnsignedLong _maximum; \
DDS_UnsignedLong _length; \
DDS_Long _sequence_init; \
DDS_Boolean _owned; \
struct DDS_SeqElementTypeAllocationParams_t _elementAllocParams; \
DDS_UnsignedLong _absolute_maximum; \
struct DDS_SeqElementTypeDeallocationParams_t _elementDeallocParams;
#define NDDSUSERDllExport
#ifdef RTI_CPP
#include <new>
#ifndef dds_cpp_dll_h
#include "dds_cpp/dds_cpp_dll.h"
#endif
#ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP
/*i @ingroup DDSSequenceModule
@brief Empty list of sequence operator overloaded methods.
*/
#define DDS_SEQUENCE_OVERLOADED_OPERATOR_METHODS(TSeq, T)
#else /* #ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP */
/*ci @ingroup DDSSequenceModule
@brief Sequence operator overloaded methods
*/
#define DDS_SEQUENCE_OVERLOADED_OPERATOR_METHODS(TSeq, T) \
TSeq& operator=(const struct TSeq& src_seq); \
const T& operator[](DDS_Long i) const; \
T& operator[](DDS_Long i);
#endif /* #ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP */
/*ci @ingroup DDSSequenceModule
@brief Sequence dll export
*/
#define DDS_SEQUENCE_DLL_EXPORT NDDSUSERDllExport DDSCPPDllExport
#define DDS_SEQUENCE_COPY_METHODS(TSeq, T) \
bool copy_no_alloc(const struct TSeq& src_seq); \
bool from_array(const T *array, DDS_Long length); \
bool to_array(T *array, DDS_Long length); \
TSeq(const struct TSeq& seq); \
T& set_at(DDS_Long i, const T& val); \
bool copy(const struct TSeq& src_seq);
/*i @ingroup DDSSequeceModule
@brief C++-only methods definition of the sequence methods
Used in incarnating a \em generics implementation.
*/
#define DDS_SEQUENCE_METHODS(TSeq, T) \
bool element_pointers_allocation(bool allocatePointers);\
bool element_pointers_allocation(void);\
bool element_allocation_params( \
const DDS_TypeAllocationParams_t & params); \
DDS_TypeAllocationParams_t element_allocation_params(void); \
bool element_deallocation_params( \
const DDS_TypeDeallocationParams_t & params); \
DDS_TypeDeallocationParams_t element_deallocation_params(void); \
const T& get_at(DDS_Long i) const; \
DDS_Long maximum(void) const; \
bool maximum(DDS_Long new_max); \
bool absolute_maximum(DDS_Long absolute_maximum); \
DDS_Long length(void) const; \
bool length(DDS_Long new_length); \
bool ensure_length(DDS_Long length, DDS_Long max); \
bool has_ownership(void); \
bool loan_contiguous(T* buffer, DDS_Long new_length, DDS_Long new_max); \
bool loan_discontiguous(T** buffer, DDS_Long new_length, DDS_Long new_max); \
bool unloan(void); \
T * get_contiguous_bufferI(void) const; \
T * get_contiguous_buffer(void) const; \
T ** get_discontiguous_bufferI(void) const; \
T ** get_discontiguous_buffer(void) const; \
void get_read_tokenI(void** token1, void** token2) const; \
void set_read_tokenI(void* token1, void* token2); \
explicit TSeq(DDS_Long max = 0); \
\
DDS_SEQUENCE_OVERLOADED_OPERATOR_METHODS(TSeq, T) \
\
~TSeq();
#else /* if !defined(RTI_CPP) */
/*ci @ingroup DDSSequenceModule
@brief Empty Sequence dll export variable
Since for dds c sequence structure, there are no methods. Therefore, there is
no need to export anything.
*/
#define DDS_SEQUENCE_DLL_EXPORT
#define DDS_SEQUENCE_COPY_METHODS(TSeq, T)
/*ci @ingroup DDSSequenceModule
@brief Empty list of sequence methods.
*/
#define DDS_SEQUENCE_METHODS(TSeq, T)
#endif /* RTI_CPP */
#ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP
/*ci @ingroup DDSSequenceModule
@brief Empty sequence get method.
*/
#define DDS_SEQUENCE_GET_METHOD_IN_C(TSeq, T)
/*ci @ingroup DDSSequenceModule
@brief Empty sequence C methods.
*/
#define DDS_SEQUENCE_METHODS_IN_C(TSeq, T)
#else /* #ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP */
/*ci @ingroup DDSSequenceModule
@brief Sequence copy method in C
*/
#define DDS_SEQUENCE_GET_METHOD_IN_C(TSeq, T) \
; \
NDDSUSERDllExport DDSCDllExport \
T TSeq ## _get(const struct TSeq* self, DDS_Long i)
#define DDS_SEQUENCE_COPY_METHODS_IN_C(TSeq, T) \
; \
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _copy_no_alloc(struct TSeq* self, \
const struct TSeq* src); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _copy_no_allocI(struct TSeq* self, \
const struct TSeq* src); \
\
NDDSUSERDllExport DDSCDllExport \
struct TSeq* TSeq ## _copy(struct TSeq* self, const struct TSeq* src); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _from_array(struct TSeq* self, const T *array, \
DDS_Long length); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _to_array(struct TSeq* self, T *array, \
DDS_Long length)
/*ci @ingroup DDSSequenceModule
@brief All sequence methods in C (except for get)
*/
#define DDS_SEQUENCE_METHODS_IN_C(TSeq, T) \
; \
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _get_element_pointers_allocation( \
const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_element_pointers_allocation( \
struct TSeq* self, \
DDS_Boolean allocatePointers); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_element_allocation_params( \
struct TSeq* self, \
const struct DDS_TypeAllocationParams_t * params); \
\
NDDSUSERDllExport DDSCDllExport \
void TSeq ## _get_element_allocation_params( \
struct TSeq* self, struct DDS_TypeAllocationParams_t * params); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_element_deallocation_params( \
struct TSeq* self, \
const struct DDS_TypeDeallocationParams_t * params); \
\
NDDSUSERDllExport DDSCDllExport \
void TSeq ## _get_element_deallocation_params( \
struct TSeq* self, \
struct DDS_TypeDeallocationParams_t * params); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _initialize(struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Long TSeq ## _get_maximum(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_maximum(struct TSeq* self, DDS_Long new_max); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_absolute_maximum( \
struct TSeq* self, \
DDS_Long new_max); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Long TSeq ## _get_length(const struct TSeq *self); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _set_length(struct TSeq *self, DDS_Long new_length);\
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _ensure_length(struct TSeq *self, DDS_Long length, \
DDS_Long max); \
\
NDDSUSERDllExport DDSCDllExport \
T* TSeq ## _get_reference(const struct TSeq* self, DDS_Long i); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _loan_contiguous(struct TSeq* self, T* buffer, \
DDS_Long new_length, \
DDS_Long new_max); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _loan_discontiguous(struct TSeq* self, T** buffer, \
DDS_Long new_length, \
DDS_Long new_max); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _unloan(struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
T* TSeq ## _get_contiguous_bufferI(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
T* TSeq ## _get_contiguous_buffer(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
T** TSeq ## _get_discontiguous_bufferI(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
T** TSeq ## _get_discontiguous_buffer(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
void TSeq ## _get_read_tokenI(const struct TSeq* self, \
void** token1, void** token2); \
\
NDDSUSERDllExport DDSCDllExport \
void TSeq ## _set_read_tokenI(struct TSeq* self, \
void* token1, void* token2); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _has_ownership(const struct TSeq* self); \
\
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _finalize(struct TSeq* self)
#endif /* #ifdef NDDS_NO_OVERLOADED_OPERATORS_IN_CPP */
#define DDS_SEQUENCE_MEMORY_MANAGER_METHODS(TSeq) \
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _new_buffer_and_loan_w_memory_manager( \
struct TSeq *self, \
struct REDAInlineMemory **memory_manager, \
DDS_Long new_max); \
NDDSUSERDllExport DDSCDllExport \
DDS_Boolean TSeq ## _unloan_and_finalize_w_memory_manager( \
struct TSeq *self); \
NDDSUSERDllExport DDSCDllExport \
struct TSeq * TSeq ## _copy_w_memory_manager( \
struct TSeq *self, \
struct REDAInlineMemory **memory_manager, \
const struct TSeq *src)
#define DDS_SEQUENCE_NO_GET(TSeq, T) \
struct DDS_SEQUENCE_DLL_EXPORT TSeq { \
DDS_SEQUENCE_MEMBERS(TSeq, T) \
DDS_SEQUENCE_METHODS(TSeq, T) \
DDS_SEQUENCE_COPY_METHODS(TSeq, T) \
} \
DDS_SEQUENCE_METHODS_IN_C(TSeq, T) \
DDS_SEQUENCE_COPY_METHODS_IN_C(TSeq, T)
#define DDS_SEQUENCE_FLAT_DATA(TSeq, T) \
struct DDS_SEQUENCE_DLL_EXPORT TSeq { \
DDS_SEQUENCE_MEMBERS(TSeq, T) \
DDS_SEQUENCE_METHODS(TSeq, T) \
} \
DDS_SEQUENCE_METHODS_IN_C(TSeq, T)
#define DDS_SEQUENCE_NO_GET_W_MEMORY_MANAGER(TSeq, T) \
DDS_SEQUENCE_NO_GET(TSeq, T); \
DDS_SEQUENCE_MEMORY_MANAGER_METHODS(TSeq)
#define DDS_SEQUENCE_W_MEMORY_MANAGER(TSeq, T) \
DDS_SEQUENCE_NO_GET(TSeq, T) \
DDS_SEQUENCE_GET_METHOD_IN_C(TSeq, T); \
DDS_SEQUENCE_MEMORY_MANAGER_METHODS(TSeq)
#define DDS_SEQUENCE(TSeq, T) \
DDS_SEQUENCE_NO_GET(TSeq, T) \
DDS_SEQUENCE_GET_METHOD_IN_C(TSeq, T)
#define DDS_SEQUENCE_NO_GET_IN_C(TSeq, T) \
struct DDS_SEQUENCE_DLL_EXPORT TSeq { \
DDS_SEQUENCE_MEMBERS(TSeq, T) \
} \
DDS_SEQUENCE_METHODS_IN_C(TSeq, T) \
DDS_SEQUENCE_COPY_METHODS_IN_C(TSeq, T)
#define DDS_SEQUENCE_IN_C(TSeq, T) \
DDS_SEQUENCE_NO_GET_IN_C(TSeq, T) \
DDS_SEQUENCE_GET_METHOD_IN_C(TSeq, T)
#define DDS_SEQUENCE_MAGIC_NUMBER 0x7344L
#define DDS_SEQUENCE_INITIALIZER \
{ \
NULL, NULL, NULL, NULL, 0L, 0L, DDS_SEQUENCE_MAGIC_NUMBER, DDS_BOOLEAN_TRUE, \
{ DDS_BOOLEAN_TRUE, DDS_BOOLEAN_FALSE, DDS_BOOLEAN_TRUE }, RTI_INT32_MAX, \
{ DDS_BOOLEAN_TRUE, DDS_BOOLEAN_TRUE } \
}
#endif /* cdr_sequence_h */