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

This is a class template that can be used to represent a composite type. This version can ONLY be used to represent an empty class, for the ease of testing. Normally, they are defined through template specialization. More...

#include <SpecifiedCompositeType.hpp>

Inheritance diagram for SpecifiedCompositeType< T >:
CompositeDataType DataType

Public Member Functions

 SpecifiedCompositeType (std::string name)
 
MemberMapgetMemberMap ()
 
const MemberMapgetMemberMap () const override
 Get the map of struct members in this object. More...
 
- Public Member Functions inherited from CompositeDataType
 CompositeDataType (std::string name, size_t sizeof_struct, void *(*allocator)(int), void(*deAllocator)(void *))
 
 CompositeDataType (const CompositeDataType &original)=delete
 
 ~CompositeDataType ()
 
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
 Create one or more instances of this type. More...
 
void deleteInstance (void *address) const override
 Delete this instance. More...
 
std::string toString () const override
 
bool accept (DataTypeVisitor *visitor) const override
 
std::string getTypeSpecName () const override
 Get the Type Spec Name object. More...
 
const SortedMemberListgetSortedMemberList () const
 Get the Sorted Member List object. More...
 
bool hasMemberNamed (std::string name)
 Look up whether this struct has a member with the given name. More...
 
- Public Member Functions inherited from DataType
virtual ~DataType ()
 
virtual std::string makeDeclaration (std::string declarator) const
 

Static Public Member Functions

template<typename Derived >
static MemberMap applyMembersToDerived ()
 

Additional Inherited Members

- Public Types inherited from CompositeDataType
typedef std::map< std::string, StructMemberMemberMap
 
typedef std::vector< StructMember * > SortedMemberList
 

Detailed Description

template<typename T>
class SpecifiedCompositeType< T >

This is a class template that can be used to represent a composite type. This version can ONLY be used to represent an empty class, for the ease of testing. Normally, they are defined through template specialization.

Template Parameters
Tclass that is represented

Constructor & Destructor Documentation

◆ SpecifiedCompositeType()

template<typename T >
SpecifiedCompositeType< T >::SpecifiedCompositeType ( std::string  name)
inline

Member Function Documentation

◆ applyMembersToDerived()

template<typename T >
template<typename Derived >
static MemberMap SpecifiedCompositeType< T >::applyMembersToDerived ( )
inlinestatic

◆ getMemberMap() [1/2]

template<typename T >
MemberMap& SpecifiedCompositeType< T >::getMemberMap ( )
inlinevirtual

Implements CompositeDataType.

◆ getMemberMap() [2/2]

template<typename T >
const MemberMap& SpecifiedCompositeType< T >::getMemberMap ( ) const
inlineoverridevirtual

Get the map of struct members in this object.

Returns
MemberMap& reference to the MemberMap object

Implements CompositeDataType.


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