#include <SafetyProfileSequence.h>
Public Types | |
typedef T & | Element |
typedef const T & | ConstElement |
typedef T | ConstRawElement |
Static Public Member Functions | |
static T & | make_element (T &elt, seq_flag_type) |
static void | construct (T *buffer, seq_size_type n, seq_flag_type cookie) |
static void | copy_n (const T *input, seq_size_type n, T *output) |
static void | move_n (T *in, seq_size_type n, T *out) |
static void | reset_n (T *buffer, seq_size_type n) |
static T * | destroy (T *buffer, seq_size_type n) |
Static Public Attributes | |
static const seq_size_type | extra = 1 |
Element Policy for sequence elements that are IDL "variable-length" types except for strings and arrays, which are handled separately.
T | element type of the sequence |
Definition at line 110 of file SafetyProfileSequence.h.
typedef const T& OpenDDS::SafetyProfile::VariEltPolicy< T >::ConstElement |
Definition at line 112 of file SafetyProfileSequence.h.
typedef T OpenDDS::SafetyProfile::VariEltPolicy< T >::ConstRawElement |
Definition at line 113 of file SafetyProfileSequence.h.
typedef T& OpenDDS::SafetyProfile::VariEltPolicy< T >::Element |
Definition at line 111 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::VariEltPolicy< T >::construct | ( | T * | buffer, | |
seq_size_type | n, | |||
seq_flag_type | cookie | |||
) | [inline, static] |
Definition at line 428 of file SafetyProfileSequence.h.
00430 { 00431 std::uninitialized_fill_n(buffer + use_cookie, n, T()); 00432 if (use_cookie) { 00433 *reinterpret_cast<seq_size_type*>(buffer) = n; 00434 } 00435 }
void OpenDDS::SafetyProfile::VariEltPolicy< T >::copy_n | ( | const T * | input, | |
seq_size_type | n, | |||
T * | output | |||
) | [inline, static] |
Definition at line 438 of file SafetyProfileSequence.h.
T * OpenDDS::SafetyProfile::VariEltPolicy< T >::destroy | ( | T * | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 456 of file SafetyProfileSequence.h.
00457 { 00458 seq_size_type n = n_or_int_max; 00459 T* allocated = buffer; 00460 00461 if (n_or_int_max == INT_MAX) { 00462 allocated = buffer - 1; 00463 n = *reinterpret_cast<seq_size_type*>(allocated); 00464 } 00465 00466 for (seq_size_type i = 0; i < n; ++i) { 00467 buffer[i].~T(); 00468 } 00469 00470 return allocated; 00471 }
static T& OpenDDS::SafetyProfile::VariEltPolicy< T >::make_element | ( | T & | elt, | |
seq_flag_type | ||||
) | [inline, static] |
Definition at line 115 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::VariEltPolicy< T >::move_n | ( | T * | in, | |
seq_size_type | n, | |||
T * | out | |||
) | [inline, static] |
Definition at line 444 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::VariEltPolicy< T >::reset_n | ( | T * | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 450 of file SafetyProfileSequence.h.
const seq_size_type OpenDDS::SafetyProfile::VariEltPolicy< T >::extra = 1 [static] |
Definition at line 114 of file SafetyProfileSequence.h.