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

#include <PointerDataType.hpp>

Inheritance diagram for PointerDataType:
DataType

Public Member Functions

 PointerDataType (std::string typeSpecifierName)
 
 PointerDataType (const PointerDataType &original)=delete
 
 ~PointerDataType ()
 
PointerDataTypeoperator= (PointerDataType rhs)=delete
 
bool validate (DataTypeInator *dataTypeInator) override
 Verify that all of the types that are named by this DataType or subordinate DataTypes are resolvable to actual DataTypes in the TypeDictionary. More...
 
bool isValid () const override
 Determine whether this type has already been successfully validated. More...
 
size_t getSize () const override
 
void * createInstance (unsigned int num) const override
 
void deleteInstance (void *address) const override
 Delete this instance. More...
 
std::string getTypeSpecName () const override
 Get the Type Spec Name object. More...
 
std::string makeDeclaration (std::string declarator) const override
 
bool accept (DataTypeVisitor *visitor) const override
 
std::shared_ptr< const DataTypegetSubType () const
 
- Public Member Functions inherited from DataType
virtual ~DataType ()
 
virtual std::string toString () const
 

Constructor & Destructor Documentation

◆ PointerDataType() [1/2]

PointerDataType::PointerDataType ( std::string  typeSpecifierName)

Constructor for ArrayDataType.

Parameters
typeSpecifierNameName of the type on with this type is based.

◆ PointerDataType() [2/2]

PointerDataType::PointerDataType ( const PointerDataType original)
delete

◆ ~PointerDataType()

PointerDataType::~PointerDataType ( )

Member Function Documentation

◆ accept()

bool PointerDataType::accept ( DataTypeVisitor visitor) const
overridevirtual

Implements DataType.

◆ createInstance()

void * PointerDataType::createInstance ( unsigned int  num) const
overridevirtual

Create zero or more instances of this DataType.

Implements DataType.

◆ deleteInstance()

void PointerDataType::deleteInstance ( void *  address) const
overridevirtual

Delete this instance.

Parameters
addressof instance to delete
Note
Is this compatible with the createInstance?

Implements DataType.

◆ getSize()

size_t PointerDataType::getSize ( ) const
overridevirtual
Returns
The size (in bytes) of an instance of the PointerDataType.

Implements DataType.

◆ getSubType()

std::shared_ptr< const DataType > PointerDataType::getSubType ( ) const

◆ getTypeSpecName()

std::string PointerDataType::getTypeSpecName ( ) const
overridevirtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ isValid()

bool PointerDataType::isValid ( ) const
overridevirtual

Determine whether this type has already been successfully validated.

Returns
true if validated, false otherwise

Implements DataType.

◆ makeDeclaration()

std::string PointerDataType::makeDeclaration ( std::string  declarator) const
overridevirtual

Generate a declaration of this DataType.

Parameters
declaratorA 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.

◆ operator=()

PointerDataType& PointerDataType::operator= ( PointerDataType  rhs)
delete

◆ validate()

bool PointerDataType::validate ( DataTypeInator dataTypeInator)
overridevirtual

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: