ICG 2
Electric Boogaloo
Public Types | Public Member Functions | List of all members
StructMember Struct Reference

Represent a normal or static member of a struct. More...

#include <StructMember.hpp>

Inheritance diagram for StructMember:
BitfieldStructMember< T >

Public Types

enum  StorageClass { NORMAL , STATIC }
 

Public Member Functions

 StructMember (std::string memberName, std::string typeSpecName, int address, StorageClass storage=NORMAL)
 
 ~StructMember ()
 
std::string toString () const
 toString More...
 
void * getAddressOfMember (void *structAddress=NULL) const
 Get the address of this member given the base address of a struct containing it. More...
 
bool operator< (const StructMember &other) const
 Enable sorting by offset. More...
 
std::string getName () const
 Get the name of this struct member. More...
 
std::string getTypeSpecName () const
 Get the type name of this struct member. More...
 
std::shared_ptr< const DataTypegetSubType () const
 Get the type of this member. More...
 
void setSubType (std::shared_ptr< const DataType > type)
 Set the SubType of this member. More...
 
StorageClass getStorageClass () const
 Get the storage class of this member. More...
 

Detailed Description

Represent a normal or static member of a struct.

Member Enumeration Documentation

◆ StorageClass

Enumerator
NORMAL 
STATIC 

Constructor & Destructor Documentation

◆ StructMember()

StructMember::StructMember ( std::string  memberName,
std::string  typeSpecName,
int  address,
StorageClass  storage = NORMAL 
)

Constructor.

◆ ~StructMember()

StructMember::~StructMember ( )

Member Function Documentation

◆ getAddressOfMember()

void * StructMember::getAddressOfMember ( void *  structAddress = NULL) const

Get the address of this member given the base address of a struct containing it.

Parameters
structAddressbase address of struct - may be excluded if we're working with a static member
Returns
void* address of member

◆ getName()

std::string StructMember::getName ( ) const
inline

Get the name of this struct member.

Returns
std::string

◆ getStorageClass()

StorageClass StructMember::getStorageClass ( ) const
inline

Get the storage class of this member.

Returns
StorageClass

◆ getSubType()

std::shared_ptr<const DataType> StructMember::getSubType ( ) const
inline

Get the type of this member.

Returns
std::shared_ptr<const DataType>

◆ getTypeSpecName()

std::string StructMember::getTypeSpecName ( ) const
inline

Get the type name of this struct member.

Returns
std::string

◆ operator<()

bool StructMember::operator< ( const StructMember other) const
inline

Enable sorting by offset.

◆ setSubType()

void StructMember::setSubType ( std::shared_ptr< const DataType type)
inline

Set the SubType of this member.

Parameters
typesubtype to set

◆ toString()

std::string StructMember::toString ( ) const

toString

Returns
std::string

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