OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > > Struct Template Reference

#include <SafetyProfileSequence.h>

List of all members.

Public Member Functions

seq_size_type maximum () const
seq_size_type max_size () const
void replace (seq_size_type length, T *data, seq_flag_type release=false)

Static Public Member Functions

static T * allocbuf ()

Protected Member Functions

 AllocPolicy (seq_size_type=N)
T * allocate (seq_size_type=N) const
void swap (AllocPolicy &) throw ()

Detailed Description

template<typename T, typename Sequence, seq_size_type N>
struct OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >

Definition at line 54 of file SafetyProfileSequence.h.


Constructor & Destructor Documentation

template<typename T , typename Sequence , seq_size_type N>
OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::AllocPolicy ( seq_size_type  = N  )  [inline, explicit, protected]

Definition at line 63 of file SafetyProfileSequence.h.

00063 {}


Member Function Documentation

template<typename T , typename Sequence , seq_size_type N>
T* OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::allocate ( seq_size_type  = N  )  const [inline, protected]

Definition at line 64 of file SafetyProfileSequence.h.

00064 { return allocbuf(); }

template<typename T , typename Sequence , seq_size_type N>
T * OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::allocbuf (  )  [inline, static]

Definition at line 334 of file SafetyProfileSequence.h.

References ACE_Allocator::instance(), and ACE_Allocator::malloc().

00335   {
00336     void* const raw =
00337       ACE_Allocator::instance()->malloc(N * sizeof(T));
00338     T* const mem = static_cast<T*>(raw);
00339     Sequence::ElementPolicy::construct(mem, N, false);
00340     return mem;
00341   }

Here is the call graph for this function:

template<typename T , typename Sequence , seq_size_type N>
seq_size_type OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::max_size (  )  const [inline]

Definition at line 57 of file SafetyProfileSequence.h.

00057 { return N; }

template<typename T , typename Sequence , seq_size_type N>
seq_size_type OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::maximum (  )  const [inline]

Definition at line 56 of file SafetyProfileSequence.h.

00056 { return N; }

template<typename T , typename Sequence , seq_size_type N>
void OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::replace ( seq_size_type  length,
T *  data,
seq_flag_type  release = false 
) [inline]

Definition at line 58 of file SafetyProfileSequence.h.

References release().

00059     {
00060       static_cast<Sequence&>(*this).replace_i(N, length, data, release);
00061     }

Here is the call graph for this function:

template<typename T , typename Sequence , seq_size_type N>
void OpenDDS::SafetyProfile::AllocPolicy< T, Sequence, Bounded< N > >::swap ( AllocPolicy< T, Sequence, Bounded< N > > &   )  throw () [inline, protected]

Definition at line 65 of file SafetyProfileSequence.h.

00065 {}


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1