#include <SafetyProfileSequence.h>
Classes | |
struct | Element |
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 |
Element Policy for sequences of strings.
CharT | FACE::Char or FACE::WChar |
Definition at line 126 of file SafetyProfileSequence.h.
typedef const CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::ConstElement |
Definition at line 202 of file SafetyProfileSequence.h.
typedef const CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::ConstRawElement |
Definition at line 203 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 366 of file SafetyProfileSequence.h.
00368 { 00369 for (seq_size_type i = use_cookie; i < n + use_cookie; ++i) { 00370 buffer[i] = StringTraits<CharT>::empty(); 00371 } 00372 if (use_cookie) { 00373 *reinterpret_cast<seq_size_type*>(buffer) = n; 00374 } 00375 }
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::copy_n | ( | const CharT *const * | in, | |
seq_size_type | n, | |||
CharT ** | out | |||
) | [inline, static] |
Definition at line 378 of file SafetyProfileSequence.h.
00380 { 00381 for (seq_size_type i = 0; i < n; ++i) { 00382 StringTraits<CharT>::free(out[i]); 00383 out[i] = StringTraits<CharT>::dup(in[i]); 00384 } 00385 }
CharT ** OpenDDS::SafetyProfile::StringEltPolicy< CharT >::destroy | ( | CharT ** | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 406 of file SafetyProfileSequence.h.
00408 { 00409 seq_size_type n = n_or_int_max; 00410 CharT** allocated = buffer; 00411 00412 if (n_or_int_max == INT_MAX) { 00413 allocated = buffer - 1; 00414 n = *reinterpret_cast<seq_size_type*>(allocated); 00415 } 00416 00417 for (seq_size_type i = 0; i < n; ++i) { 00418 StringTraits<CharT>::free(buffer[i]); 00419 } 00420 00421 return allocated; 00422 }
static Element OpenDDS::SafetyProfile::StringEltPolicy< CharT >::make_element | ( | CharT *& | elt, | |
seq_flag_type | release | |||
) | [inline, static] |
Definition at line 197 of file SafetyProfileSequence.h.
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::move_n | ( | CharT ** | in, | |
seq_size_type | n, | |||
CharT ** | out | |||
) | [inline, static] |
Definition at line 388 of file SafetyProfileSequence.h.
References OpenDDS::DCPS::swap().
00390 { 00391 for (seq_size_type i = 0; i < n; ++i) { 00392 std::swap(in[i], out[i]); 00393 } 00394 }
void OpenDDS::SafetyProfile::StringEltPolicy< CharT >::reset_n | ( | CharT ** | buffer, | |
seq_size_type | n | |||
) | [inline, static] |
Definition at line 397 of file SafetyProfileSequence.h.
00398 { 00399 for (seq_size_type i = 0; i < n; ++i) { 00400 StringTraits<CharT>::free(buffer[i]); 00401 buffer[i] = StringTraits<CharT>::empty(); 00402 } 00403 }
const seq_size_type OpenDDS::SafetyProfile::StringEltPolicy< CharT >::extra = 1 [static] |
Definition at line 204 of file SafetyProfileSequence.h.