8 T* temp = (T*)calloc( num,
sizeof(T));
9 for (
int ii=0 ; ii<num ; ii++) {
new( &temp[ii]) T(); }
10 return ((
void *)temp);
17 T* temp =
static_cast<T*
> (address);
33 std::vector<void *> addresses;
35 T * container =
static_cast<T *
> (address);
37 typename T::iterator curr = container->begin();
38 typename T::iterator end = container->end();
41 addresses.push_back(&*curr);
49 bool resize (
void * address,
int n_elems)
const {
50 T * container =
static_cast<T *
> (address);
51 container->resize(n_elems);
56 T * container =
static_cast<T *
> (address);
57 return container->size();
61 bool clear (
void * address)
const override {
62 T * container =
static_cast<T *
> (address);
void * sequence_construct(int num)
Definition: SpecifiedSequenceDataType.hpp:7
void sequence_destruct(void *address)
Definition: SpecifiedSequenceDataType.hpp:16
Represents an STL sequence type - vector, list, deque, array.
Definition: SequenceDataType.hpp:15
Definition: SpecifiedSequenceDataType.hpp:22
SpecifiedSequenceDataType(const SpecifiedSequenceDataType< T > &other)=delete
SpecifiedSequenceDataType(std::string typeSpecifierName)
Definition: SpecifiedSequenceDataType.hpp:25
~SpecifiedSequenceDataType()=default
bool resize(void *address, int n_elems) const
resize the underlying container
Definition: SpecifiedSequenceDataType.hpp:49
SpecifiedSequenceDataType & operator=(SpecifiedSequenceDataType< T > rhs)=delete
std::vector< void * > getElementAddresses(void *address) const override
Given the address of a sequence of this type, get a list of all the addresses of the elements within.
Definition: SpecifiedSequenceDataType.hpp:32
bool clear(void *address) const override
clear the underlying container
Definition: SpecifiedSequenceDataType.hpp:61
int getNumElements(void *address) const override
Given the address of a sequence of this type, get the number of elements in this sequence.
Definition: SpecifiedSequenceDataType.hpp:55