ICG 2
Electric Boogaloo
Public Member Functions | List of all members
DataTypeInator Class Reference

Register and manage datatypes at runtime. More...

#include <DataTypeInator.hpp>

Public Member Functions

 DataTypeInator ()
 
 DataTypeInator (TypeDictionary *dict)
 
std::shared_ptr< const DataTyperesolve (std::string name)
 Look up the DataType given a string representation of the type This is the most important function of this entire library. More...
 
void addToDictionary (std::string name, DataType *typeSpec)
 Add a name-DataType pair to the manager. More...
 
void addTypeDef (std::string typedefedName, std::string canonicalName)
 Register a typedef statement with the DataTypeInator. More...
 
bool validateDictionary ()
 Ensure all types in the dictionary are valid. More...
 

Detailed Description

Register and manage datatypes at runtime.

Constructor & Destructor Documentation

◆ DataTypeInator() [1/2]

DataTypeInator::DataTypeInator ( )

◆ DataTypeInator() [2/2]

DataTypeInator::DataTypeInator ( TypeDictionary dict)

Member Function Documentation

◆ addToDictionary()

void DataTypeInator::addToDictionary ( std::string  name,
DataType typeSpec 
)

Add a name-DataType pair to the manager.

Parameters
nameString representation of type. Should be the fully qualified canonical name
typeSpecbare pointer to the (validated or unvalidated) datatype. DataTypeInator will assume ownership of it.

◆ addTypeDef()

void DataTypeInator::addTypeDef ( std::string  typedefedName,
std::string  canonicalName 
)

Register a typedef statement with the DataTypeInator.

Parameters
typedefedNameLHS of typedef
canonicalNameRHS of typedef

◆ resolve()

std::shared_ptr< const DataType > DataTypeInator::resolve ( std::string  name)

Look up the DataType given a string representation of the type This is the most important function of this entire library.

Parameters
namefully qualified type name to look up (not necessarily canonical)
Returns
std::shared_ptr<const DataType>

◆ validateDictionary()

bool DataTypeInator::validateDictionary ( )

Ensure all types in the dictionary are valid.

Returns
true it good
false it not good

The documentation for this class was generated from the following files: