#include <SafetyProfileSequence.h>
Public Types | |
typedef const CharT * | ConstElement |
typedef const CharT * | ConstRawElement |
Static Public Member Functions | |
static Element | make_element (CharT *&elt, seq_flag_type release) |
static void | construct (CharT **buf, seq_size_type n, seq_flag_type cookie) |
static void | copy_n (const CharT *const *in, seq_size_type n, CharT **out) |
static void | move_n (CharT **in, seq_size_type n, CharT **out) |
static void | reset_n (CharT **, seq_size_type) |
static CharT ** | destroy (CharT **buffer, seq_size_type n) |
Static Public Attributes | |
static const seq_size_type | extra = 1 |
Classes | |
struct | Element |
Definition at line 125 of file SafetyProfileSequence.h.
typedef const CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::ConstElement |
Definition at line 201 of file SafetyProfileSequence.h.
typedef const CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::ConstRawElement |
Definition at line 202 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::construct | ( | CharT ** | buf, | |
seq_size_type | n, | |||
seq_flag_type | cookie | |||
) | [inline, static] |
Definition at line 365 of file SafetyProfileSequence.h.
00367 { 00368 for (seq_size_type i = use_cookie; i < n + use_cookie; ++i) { 00369 buffer[i] = StringTraits<CharT>::empty(); 00370 } 00371 if (use_cookie) { 00372 *reinterpret_cast<seq_size_type*>(buffer) = n; 00373 } 00374 }
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::copy_n | ( | const CharT *const * | in, | |
seq_size_type | n, | |||
CharT ** | out | |||
) | [inline, static] |
Definition at line 377 of file SafetyProfileSequence.h.
00379 { 00380 for (seq_size_type i = 0; i < n; ++i) { 00381 StringTraits<CharT>::free(out[i]); 00382 out[i] = StringTraits<CharT>::dup(in[i]); 00383 } 00384 }
CharT ** OpenDDS::SafetyProfile::StringEltPolicy< CharT >::destroy | ( | CharT ** | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 405 of file SafetyProfileSequence.h.
00407 { 00408 seq_size_type n = n_or_int_max; 00409 CharT** allocated = buffer; 00410 00411 if (n_or_int_max == INT_MAX) { 00412 allocated = buffer - 1; 00413 n = *reinterpret_cast<seq_size_type*>(allocated); 00414 } 00415 00416 for (seq_size_type i = 0; i < n; ++i) { 00417 StringTraits<CharT>::free(buffer[i]); 00418 } 00419 00420 return allocated; 00421 }
static Element OpenDDS::SafetyProfile::StringEltPolicy< CharT >::make_element | ( | CharT *& | elt, | |
seq_flag_type | release | |||
) | [inline, static] |
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::move_n | ( | CharT ** | in, | |
seq_size_type | n, | |||
CharT ** | out | |||
) | [inline, static] |
Definition at line 387 of file SafetyProfileSequence.h.
References OpenDDS::DCPS::swap().
00389 { 00390 for (seq_size_type i = 0; i < n; ++i) { 00391 std::swap(in[i], out[i]); 00392 } 00393 }
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::reset_n | ( | CharT ** | , | |
seq_size_type | ||||
) | [inline, static] |
Definition at line 396 of file SafetyProfileSequence.h.
00397 { 00398 for (seq_size_type i = 0; i < n; ++i) { 00399 StringTraits<CharT>::free(buffer[i]); 00400 buffer[i] = StringTraits<CharT>::empty(); 00401 } 00402 }
const seq_size_type OpenDDS::SafetyProfile::StringEltPolicy< CharT >::extra = 1 [static] |
Definition at line 203 of file SafetyProfileSequence.h.