ICG 2
Electric Boogaloo
Public Member Functions | List of all members
SpecifiedPrimitiveDataType< T > Class Template Reference

#include <SpecifiedPrimitiveDataType.hpp>

Inheritance diagram for SpecifiedPrimitiveDataType< T >:
PrimitiveDataType DataType

Public Member Functions

 SpecifiedPrimitiveDataType ()
 
 SpecifiedPrimitiveDataType (const SpecifiedPrimitiveDataType< T > &original)=default
 
 ~SpecifiedPrimitiveDataType ()=default
 
SpecifiedPrimitiveDataType< T > & operator= (SpecifiedPrimitiveDataType< T > &rhs)=default
 
bool validate (DataTypeInator *dataTypeInator=NULL) 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...
 
void clearValue (void *address) const
 Clear the variable at the given address. More...
 
bool assignValue (void *address, Value *value) const
 
ValuegetValue (void *address) const
 Creates a Value object for the variable at the given address. More...
 
void printValue (std::ostream &s, void *address) const
 
std::string getTypeSpecName () const
 
bool isFloatingPoint () const
 
bool isSigned () const
 
bool isVoid () const
 
bool isFloatingPoint () const
 Determine whether this is an integer type or floating point type. More...
 
bool isFloatingPoint () const
 Determine whether this is an integer type or floating point type. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isVoid () const
 Is the type void? More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
size_t getSize () const
 The size (in bytes) of an instance of the DataType. More...
 
void * createInstance (unsigned int num) const
 Create one or more instances of this type. More...
 
void deleteInstance (void *address) const
 Delete this instance. More...
 
void clearValue (void *address) const
 Clear the variable at the given address. More...
 
bool assignValue (void *address, Value *value) const
 Assign a value to the variable at the given address. More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
ValuegetValue (void *address) const
 Creates a Value object for the variable at the given address. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
std::string getTypeSpecName () const
 Get the Type Spec Name object. More...
 
bool isFloatingPoint () const
 Determine whether this is an integer type or floating point type. More...
 
bool isFloatingPoint () const
 Determine whether this is an integer type or floating point type. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isSigned () const
 Determine whether type is signed. More...
 
bool isVoid () const
 Is the type void? More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
size_t getSize () const
 The size (in bytes) of an instance of the DataType. More...
 
void deleteInstance (void *address) const
 Delete this instance. More...
 
void * createInstance (unsigned int num) const
 Create one or more instances of this type. More...
 
void clearValue (void *address) const
 Clear the variable at the given address. More...
 
bool assignValue (void *address, Value *value) const
 Assign a value to the variable at the given address. More...
 
void printValue (std::ostream &s, void *address) const
 Print an ascii representation of the value at the given address to the stream. More...
 
ValuegetValue (void *address) const
 Creates a Value object for the variable at the given address. More...
 
- Public Member Functions inherited from PrimitiveDataType
 PrimitiveDataType ()
 
 ~PrimitiveDataType ()
 
bool accept (DataTypeVisitor *visitor) const override
 
- Public Member Functions inherited from DataType
virtual ~DataType ()
 
virtual std::string makeDeclaration (std::string declarator) const
 
virtual std::string toString () const
 

Constructor & Destructor Documentation

◆ SpecifiedPrimitiveDataType() [1/2]

template<class T >
SpecifiedPrimitiveDataType< T >::SpecifiedPrimitiveDataType ( )
inline

◆ SpecifiedPrimitiveDataType() [2/2]

template<class T >
SpecifiedPrimitiveDataType< T >::SpecifiedPrimitiveDataType ( const SpecifiedPrimitiveDataType< T > &  original)
default

◆ ~SpecifiedPrimitiveDataType()

template<class T >
SpecifiedPrimitiveDataType< T >::~SpecifiedPrimitiveDataType ( )
default

Member Function Documentation

◆ assignValue() [1/3]

template<class T >
bool SpecifiedPrimitiveDataType< T >::assignValue ( void *  address,
Value value 
) const
inlinevirtual

Assign a value to the variable at the given address.

Parameters
addressAddress of the variable.
valueValue to be assigned to the variable.

Implements PrimitiveDataType.

◆ assignValue() [2/3]

bool SpecifiedPrimitiveDataType< void >::assignValue ( void *  address,
Value value 
) const
virtual

Assign a value to the variable at the given address.

Parameters
addressAddress of the variable.
valueValue to be assigned to the element.

Implements PrimitiveDataType.

◆ assignValue() [3/3]

bool SpecifiedPrimitiveDataType< void >::assignValue ( void *  address,
Value value 
) const
virtual

Assign a value to the variable at the given address.

Parameters
addressAddress of the variable.
valueValue to be assigned to the element.

Implements PrimitiveDataType.

◆ clearValue() [1/3]

template<class T >
void SpecifiedPrimitiveDataType< T >::clearValue ( void *  address) const
inlinevirtual

Clear the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ clearValue() [2/3]

void SpecifiedPrimitiveDataType< void >::clearValue ( void *  address) const
virtual

Clear the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ clearValue() [3/3]

void SpecifiedPrimitiveDataType< void >::clearValue ( void *  address) const
virtual

Clear the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ createInstance() [1/3]

void * SpecifiedPrimitiveDataType< void >::createInstance ( unsigned int  n) const
virtual

Create one or more instances of this type.

Parameters
nnumber to create
Returns
void* address of the beginnning of the allocation

Implements DataType.

◆ createInstance() [2/3]

void * SpecifiedPrimitiveDataType< void >::createInstance ( unsigned int  n) const
virtual

Create one or more instances of this type.

Parameters
nnumber to create
Returns
void* address of the beginnning of the allocation

Implements DataType.

◆ createInstance() [3/3]

template<class T >
void* SpecifiedPrimitiveDataType< T >::createInstance ( unsigned int  num) const
inlineoverridevirtual
Returns
an instance of the type that this PrimiitveDataType Class describes.

Implements DataType.

◆ deleteInstance() [1/3]

void SpecifiedPrimitiveDataType< void >::deleteInstance ( void *  address) const
virtual

Delete this instance.

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

Implements DataType.

◆ deleteInstance() [2/3]

void SpecifiedPrimitiveDataType< void >::deleteInstance ( void *  address) const
virtual

Delete this instance.

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

Implements DataType.

◆ deleteInstance() [3/3]

template<class T >
void SpecifiedPrimitiveDataType< T >::deleteInstance ( void *  address) const
inlineoverridevirtual

Delete this instance.

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

Implements DataType.

◆ getSize() [1/3]

size_t SpecifiedPrimitiveDataType< void >::getSize ( ) const
virtual

The size (in bytes) of an instance of the DataType.

Returns
size_t size of this type

Implements DataType.

◆ getSize() [2/3]

size_t SpecifiedPrimitiveDataType< void >::getSize ( ) const
virtual

The size (in bytes) of an instance of the DataType.

Returns
size_t size of this type

Implements DataType.

◆ getSize() [3/3]

template<class T >
size_t SpecifiedPrimitiveDataType< T >::getSize ( ) const
inlineoverridevirtual
Returns
The size (in bytes) of an instance of the DataType

Implements DataType.

◆ getTypeSpecName() [1/15]

template<class T >
std::string SpecifiedPrimitiveDataType< T >::getTypeSpecName ( ) const
inlinevirtual

Get a string representation of this SpecifiedPrimitiveDataType's type-specifier.

Implements DataType.

◆ getTypeSpecName() [2/15]

std::string SpecifiedPrimitiveDataType< void >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [3/15]

std::string SpecifiedPrimitiveDataType< char >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [4/15]

std::string SpecifiedPrimitiveDataType< short >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [5/15]

std::string SpecifiedPrimitiveDataType< int >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [6/15]

std::string SpecifiedPrimitiveDataType< long >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [7/15]

std::string SpecifiedPrimitiveDataType< wchar_t >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [8/15]

std::string SpecifiedPrimitiveDataType< long long >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [9/15]

std::string SpecifiedPrimitiveDataType< unsigned char >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [10/15]

std::string SpecifiedPrimitiveDataType< unsigned short >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [11/15]

std::string SpecifiedPrimitiveDataType< unsigned int >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [12/15]

std::string SpecifiedPrimitiveDataType< unsigned long >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [13/15]

std::string SpecifiedPrimitiveDataType< unsigned long long >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [14/15]

std::string SpecifiedPrimitiveDataType< float >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getTypeSpecName() [15/15]

std::string SpecifiedPrimitiveDataType< double >::getTypeSpecName ( ) const
virtual

Get the Type Spec Name object.

Returns
std::string name of the type

Implements DataType.

◆ getValue() [1/3]

template<class T >
Value* SpecifiedPrimitiveDataType< T >::getValue ( void *  address) const
inlinevirtual

Creates a Value object for the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ getValue() [2/3]

Value * SpecifiedPrimitiveDataType< void >::getValue ( void *  address) const
virtual

Creates a Value object for the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ getValue() [3/3]

Value * SpecifiedPrimitiveDataType< void >::getValue ( void *  address) const
virtual

Creates a Value object for the variable at the given address.

Parameters
addressAddress of the variable.

Implements PrimitiveDataType.

◆ isFloatingPoint() [1/5]

template<class T >
bool SpecifiedPrimitiveDataType< T >::isFloatingPoint ( ) const
inlinevirtual

Return true if T is float or double. Otherwise return false.

Implements PrimitiveDataType.

◆ isFloatingPoint() [2/5]

bool SpecifiedPrimitiveDataType< float >::isFloatingPoint ( ) const
virtual

Determine whether this is an integer type or floating point type.

Returns
true this type is float or double
false otherwise

Implements PrimitiveDataType.

◆ isFloatingPoint() [3/5]

bool SpecifiedPrimitiveDataType< double >::isFloatingPoint ( ) const
virtual

Determine whether this is an integer type or floating point type.

Returns
true this type is float or double
false otherwise

Implements PrimitiveDataType.

◆ isFloatingPoint() [4/5]

bool SpecifiedPrimitiveDataType< float >::isFloatingPoint ( ) const
virtual

Determine whether this is an integer type or floating point type.

Returns
true this type is float or double
false otherwise

Implements PrimitiveDataType.

◆ isFloatingPoint() [5/5]

bool SpecifiedPrimitiveDataType< double >::isFloatingPoint ( ) const
virtual

Determine whether this is an integer type or floating point type.

Returns
true this type is float or double
false otherwise

Implements PrimitiveDataType.

◆ isSigned() [1/11]

template<class T >
bool SpecifiedPrimitiveDataType< T >::isSigned ( ) const
inlinevirtual

Return true if T is char, short, int, long, or long long. Otherwise return false.

Implements PrimitiveDataType.

◆ isSigned() [2/11]

bool SpecifiedPrimitiveDataType< char >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [3/11]

bool SpecifiedPrimitiveDataType< short >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [4/11]

bool SpecifiedPrimitiveDataType< int >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [5/11]

bool SpecifiedPrimitiveDataType< long >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [6/11]

bool SpecifiedPrimitiveDataType< long long >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [7/11]

bool SpecifiedPrimitiveDataType< char >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [8/11]

bool SpecifiedPrimitiveDataType< short >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [9/11]

bool SpecifiedPrimitiveDataType< int >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [10/11]

bool SpecifiedPrimitiveDataType< long >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isSigned() [11/11]

bool SpecifiedPrimitiveDataType< long long >::isSigned ( ) const
virtual

Determine whether type is signed.

Note
Do we really need this?
Returns
true is signed
false type has unsigned, uint_* type

Implements PrimitiveDataType.

◆ isValid()

template<class T >
bool SpecifiedPrimitiveDataType< T >::isValid ( ) const
inlineoverridevirtual

Determine whether this type has already been successfully validated.

Returns
true if validated, false otherwise

Implements DataType.

◆ isVoid() [1/3]

template<class T >
bool SpecifiedPrimitiveDataType< T >::isVoid ( ) const
inlinevirtual

Return true if DataType is void. Otherwise return false.

Implements PrimitiveDataType.

◆ isVoid() [2/3]

bool SpecifiedPrimitiveDataType< void >::isVoid ( ) const
virtual

Is the type void?

Returns
true type is void
false type is not void

Implements PrimitiveDataType.

◆ isVoid() [3/3]

bool SpecifiedPrimitiveDataType< void >::isVoid ( ) const
virtual

Is the type void?

Returns
true type is void
false type is not void

Implements PrimitiveDataType.

◆ operator=()

template<class T >
SpecifiedPrimitiveDataType<T>& SpecifiedPrimitiveDataType< T >::operator= ( SpecifiedPrimitiveDataType< T > &  rhs)
default

◆ printValue() [1/7]

template<class T >
void SpecifiedPrimitiveDataType< T >::printValue ( std::ostream &  s,
void *  address 
) const
inlinevirtual

Print the value of the variable at the given address, to the given stream.

Parameters
sThe stream to print to.
addressAddress of the variable.

Implements PrimitiveDataType.

◆ printValue() [2/7]

void SpecifiedPrimitiveDataType< char >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ printValue() [3/7]

void SpecifiedPrimitiveDataType< unsigned char >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ printValue() [4/7]

void SpecifiedPrimitiveDataType< void >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ printValue() [5/7]

void SpecifiedPrimitiveDataType< char >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ printValue() [6/7]

void SpecifiedPrimitiveDataType< unsigned char >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ printValue() [7/7]

void SpecifiedPrimitiveDataType< void >::printValue ( std::ostream &  s,
void *  address 
) const
virtual

Print an ascii representation of the value at the given address to the stream.

Implements PrimitiveDataType.

◆ validate()

template<class T >
bool SpecifiedPrimitiveDataType< T >::validate ( DataTypeInator dataTypeInator = NULL)
inlineoverridevirtual

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 file: