ICG 2
Electric Boogaloo
Public Member Functions | List of all members
PrimitiveDataType Class Referenceabstract

#include <PrimitiveDataType.hpp>

Inheritance diagram for PrimitiveDataType:
DataType SpecifiedPrimitiveDataType< T >

Public Member Functions

 PrimitiveDataType ()
 
 ~PrimitiveDataType ()
 
bool accept (DataTypeVisitor *visitor) const override
 
virtual bool isFloatingPoint () const =0
 Determine whether this is an integer type or floating point type. More...
 
virtual bool isSigned () const =0
 Determine whether type is signed. More...
 
virtual bool isVoid () const =0
 Is the type void? More...
 
virtual void clearValue (void *address) const =0
 Clear the variable at the given address. More...
 
virtual bool assignValue (void *address, Value *value) const =0
 Assign a value to the variable at the given address. More...
 
virtual ValuegetValue (void *address) const =0
 Creates a Value object for the variable at the given address. More...
 
virtual void printValue (std::ostream &s, void *address) const =0
 Print an ascii representation of the value at the given address to the stream. More...
 
- Public Member Functions inherited from DataType
virtual ~DataType ()
 
virtual bool validate (DataTypeInator *dataTypeInator)=0
 Verify that all of the types that are named by this DataType or subordinate DataTypes are resolvable to actual DataTypes in the TypeDictionary. More...
 
virtual bool isValid () const =0
 Determine whether this type has already been successfully validated. More...
 
virtual size_t getSize () const =0
 The size (in bytes) of an instance of the DataType. More...
 
virtual std::string getTypeSpecName () const =0
 Get the Type Spec Name object. More...
 
virtual void * createInstance (unsigned int n=1) const =0
 Create one or more instances of this type. More...
 
virtual void deleteInstance (void *address) const =0
 Delete this instance. More...
 
virtual std::string makeDeclaration (std::string declarator) const
 
virtual std::string toString () const
 

Constructor & Destructor Documentation

◆ PrimitiveDataType()

PrimitiveDataType::PrimitiveDataType ( )
inline

Constructor for PrimitiveDataType.

◆ ~PrimitiveDataType()

PrimitiveDataType::~PrimitiveDataType ( )
inline

Member Function Documentation

◆ accept()

bool PrimitiveDataType::accept ( DataTypeVisitor visitor) const
inlineoverridevirtual

Implements DataType.

◆ assignValue()

virtual bool PrimitiveDataType::assignValue ( void *  address,
Value value 
) const
pure virtual

Assign a value to the variable at the given address.

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

Implemented in SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, and SpecifiedPrimitiveDataType< T >.

◆ clearValue()

virtual void PrimitiveDataType::clearValue ( void *  address) const
pure virtual

Clear the variable at the given address.

Parameters
addressAddress of the variable.

Implemented in SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, and SpecifiedPrimitiveDataType< T >.

◆ getValue()

virtual Value* PrimitiveDataType::getValue ( void *  address) const
pure virtual

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

Parameters
addressAddress of the variable.

Implemented in SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, and SpecifiedPrimitiveDataType< T >.

◆ isFloatingPoint()

virtual bool PrimitiveDataType::isFloatingPoint ( ) const
pure virtual

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

Returns
true this type is float or double
false otherwise

Implemented in SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, and SpecifiedPrimitiveDataType< T >.

◆ isSigned()

virtual bool PrimitiveDataType::isSigned ( ) const
pure virtual

◆ isVoid()

virtual bool PrimitiveDataType::isVoid ( ) const
pure virtual

Is the type void?

Returns
true type is void
false type is not void

Implemented in SpecifiedPrimitiveDataType< T >, SpecifiedPrimitiveDataType< T >, and SpecifiedPrimitiveDataType< T >.

◆ printValue()

virtual void PrimitiveDataType::printValue ( std::ostream &  s,
void *  address 
) const
pure virtual

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