Represents an STL sequence type - vector, list, deque, array.
More...
#include <SequenceDataType.hpp>
Represents an STL sequence type - vector, list, deque, array.
◆ SequenceDataType() [1/2]
| SequenceDataType::SequenceDataType |
( |
std::string |
typeSpecifierName, |
|
|
int |
typeSize, |
|
|
void *(*)(int) |
allocator, |
|
|
void(*)(void *) |
deAllocator |
|
) |
| |
Construct an SequenceDataType.
- Parameters
-
| typeSpecifierName | string representation of fully qualified type |
| typeSize | size of container |
◆ SequenceDataType() [2/2]
◆ ~SequenceDataType()
| SequenceDataType::~SequenceDataType |
( |
| ) |
|
◆ accept()
◆ clear()
| virtual bool SequenceDataType::clear |
( |
void * |
address | ) |
const |
|
pure virtual |
clear the underlying container
- Parameters
-
| address | address of sequence object to clear |
- Returns
- int num elements to resize to
Implemented in SpecifiedSequenceDataType< T >.
◆ createInstance()
| void * SequenceDataType::createInstance |
( |
unsigned int |
n | ) |
const |
|
overridevirtual |
Create one or more instances of this type.
- Parameters
-
- Returns
- void* address of the beginnning of the allocation
Implements DataType.
◆ deleteInstance()
| void SequenceDataType::deleteInstance |
( |
void * |
address | ) |
const |
|
overridevirtual |
Delete this instance.
- Parameters
-
| address | of instance to delete |
- Note
- Is this compatible with the createInstance?
Implements DataType.
◆ getElementAddresses()
| virtual std::vector<void *> SequenceDataType::getElementAddresses |
( |
void * |
address | ) |
const |
|
pure virtual |
Given the address of a sequence of this type, get a list of all the addresses of the elements within.
- Parameters
-
| address | pointer to a sequence object |
- Returns
- std::vector<void *> addresses of all elements
Implemented in SpecifiedSequenceDataType< T >.
◆ getNumElements()
| virtual int SequenceDataType::getNumElements |
( |
void * |
address | ) |
const |
|
pure virtual |
Given the address of a sequence of this type, get the number of elements in this sequence.
- Parameters
-
| address | pointer to a sequence object |
- Returns
- int number of elements in this sequence
Implemented in SpecifiedSequenceDataType< T >.
◆ getSize()
| size_t SequenceDataType::getSize |
( |
| ) |
const |
|
overridevirtual |
◆ getSubType()
| std::shared_ptr< const DataType > SequenceDataType::getSubType |
( |
| ) |
const |
Get the type of the elements of this sequence.
- Returns
- std::shared_ptr<const DataType>
◆ getTypeSpecName()
| std::string SequenceDataType::getTypeSpecName |
( |
| ) |
const |
|
overridevirtual |
Get the Type Spec Name object.
- Returns
- std::string name of the type
Implements DataType.
◆ isValid()
| bool SequenceDataType::isValid |
( |
| ) |
const |
|
overridevirtual |
Determine whether this type has already been successfully validated.
- Returns
- true if validated, false otherwise
Implements DataType.
◆ makeDeclaration()
| std::string SequenceDataType::makeDeclaration |
( |
std::string |
declarator | ) |
const |
|
overridevirtual |
Generate a declaration of this DataType.
- Parameters
-
| declarator | A declarator, which can be a 1) a variable name or an array declarator (both are direct-declarators) or 2) a pointer declarator ( not a direct-declarator ). |
Reimplemented from DataType.
◆ resize()
| virtual bool SequenceDataType::resize |
( |
void * |
address, |
|
|
int |
n_elems |
|
) |
| const |
|
pure virtual |
resize the underlying container
- Parameters
-
| address | address of sequence object to resize |
| n_elems | int num elements to resize to |
- Returns
- bool whether the resize was successful
Implemented in SpecifiedSequenceDataType< T >.
◆ validate()
Verify that all of the types that are named by this DataType or subordinate DataTypes are resolvable to actual DataTypes in the TypeDictionary.
- Parameters
-
| dataTypeInator | - type resolver machine |
- Returns
- true if successful, false otherwise
Implements DataType.
The documentation for this class was generated from the following files: