#include <SafetyProfileSequence.h>
Public Types | |
typedef T & | Element |
typedef const T & | ConstElement |
typedef const 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 use_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 |
Definition at line 217 of file SafetyProfileSequence.h.
typedef const T& OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::ConstElement |
Definition at line 219 of file SafetyProfileSequence.h.
typedef const T OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::ConstRawElement |
Definition at line 220 of file SafetyProfileSequence.h.
typedef T& OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::Element |
Definition at line 218 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::construct | ( | T * | buffer, | |
seq_size_type | n, | |||
seq_flag_type | use_cookie | |||
) | [inline, static] |
Definition at line 476 of file SafetyProfileSequence.h.
References OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::extra.
00479 { 00480 const seq_size_type start = use_cookie ? extra : 0; 00481 for (seq_size_type i = start; i < n + start; ++i) { 00482 TAO::Array_Traits<Forany>::construct(buffer[i]); 00483 } 00484 if (use_cookie) { 00485 *reinterpret_cast<seq_size_type*>(buffer) = n; 00486 } 00487 }
void OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::copy_n | ( | const T * | input, | |
seq_size_type | n, | |||
T * | output | |||
) | [inline, static] |
Definition at line 490 of file SafetyProfileSequence.h.
Referenced by OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::move_n().
00492 { 00493 for (seq_size_type i = 0; i < n; ++i) { 00494 TAO::Array_Traits<Forany>::copy(out[i], in[i]); 00495 } 00496 }
T * OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::destroy | ( | T * | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 507 of file SafetyProfileSequence.h.
References OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::extra.
00508 { 00509 seq_size_type num = n; 00510 T* alloc = buffer; 00511 00512 if (n == INT_MAX) { 00513 alloc = buffer - extra; 00514 num = *reinterpret_cast<seq_size_type*>(alloc); 00515 } 00516 00517 for (seq_size_type i = 0; i < num; ++i) { 00518 TAO::Array_Traits<Forany>::destroy(buffer[i]); 00519 } 00520 00521 return alloc; 00522 }
static T& OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::make_element | ( | T & | elt, | |
seq_flag_type | ||||
) | [inline, static] |
static void OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::move_n | ( | T * | in, | |
seq_size_type | n, | |||
T * | out | |||
) | [inline, static] |
Definition at line 226 of file SafetyProfileSequence.h.
References OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::copy_n().
00226 { copy_n(in, n, out); }
void OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::reset_n | ( | T * | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 499 of file SafetyProfileSequence.h.
00500 { 00501 for (seq_size_type i = 0; i < n; ++i) { 00502 TAO::Array_Traits<Forany>::zero(buffer[i]); 00503 } 00504 }
const seq_size_type OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::extra [static] |
Initial value:
(sizeof(seq_size_type) - 1) / sizeof(T) + 1
Definition at line 221 of file SafetyProfileSequence.h.
Referenced by OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::construct(), and OpenDDS::SafetyProfile::ArrayEltPolicy< Forany, T >::destroy().