25 SequenceDataType( std::string typeSpecifierName,
int typeSize,
void *(*allocator)(
int),
void (*deAllocator)(
void*) ) ;
55 size_t getSize()
const override ;
86 std::shared_ptr<const DataType>
getSubType()
const;
111 virtual bool resize (
void * address,
int n_elems)
const = 0;
119 virtual bool clear (
void * address)
const = 0;
123 bool initSequenceDataType(
const DataTypeInator* dataTypeInator, std::string typeSpecName,
unsigned int n_elems );
127 std::string typeSpecName;
128 std::string elemTypeName;
129 std::shared_ptr<const DataType> subType;
130 void* (*allocator)(int);
131 void (*deAllocator)(
void*);
Register and manage datatypes at runtime.
Definition: DataTypeInator.hpp:16
Abstract base class for a DataTypeVisitor.
Definition: DataTypeVisitor.hpp:20
Abstract base class for DataTypes.
Definition: DataType.hpp:11
Represents an STL sequence type - vector, list, deque, array.
Definition: SequenceDataType.hpp:15
std::string getTypeSpecName() const override
Get the Type Spec Name object.
Definition: SequenceDataType.cpp:72
void * createInstance(unsigned int num) const override
Create one or more instances of this type.
Definition: SequenceDataType.cpp:63
SequenceDataType(std::string typeSpecifierName, int typeSize, void *(*allocator)(int), void(*deAllocator)(void *))
Construct an SequenceDataType.
Definition: SequenceDataType.cpp:10
std::shared_ptr< const DataType > getSubType() const
Get the type of the elements of this sequence.
Definition: SequenceDataType.cpp:76
std::string makeDeclaration(std::string declarator) const override
Definition: SequenceDataType.cpp:81
bool validate(DataTypeInator *dataTypeInator) override
Verify that all of the types that are named by this DataType or subordinate DataTypes are resolvable ...
Definition: SequenceDataType.cpp:23
bool accept(DataTypeVisitor *visitor) const override
Definition: SequenceDataType.cpp:85
virtual bool resize(void *address, int n_elems) const =0
resize the underlying container
~SequenceDataType()
Definition: SequenceDataType.cpp:19
void deleteInstance(void *address) const override
Delete this instance.
Definition: SequenceDataType.cpp:67
virtual int getNumElements(void *address) const =0
Given the address of a sequence of this type, get the number of elements in this sequence.
virtual bool clear(void *address) const =0
clear the underlying container
SequenceDataType(const SequenceDataType &original)=delete
bool isValid() const override
Determine whether this type has already been successfully validated.
Definition: SequenceDataType.cpp:48
size_t getSize() const override
Definition: SequenceDataType.cpp:53
virtual std::vector< void * > getElementAddresses(void *address) const =0
Given the address of a sequence of this type, get a list of all the addresses of the elements within.