Puma Reference Manual | Puma::CRecord Class Reference |
Semantic information about a class or union. More...
#include <Puma/CRecord.h>
Public Types | |
typedef std::list< CTree * > | TreeList |
typedef std::map< Token *, TreeList > | InstantiateDelayedMap |
Public Member Functions | |
~CRecord () | |
Destructor. | |
CTemplateInfo * | TemplateInfo () const |
Get the template information if this is a class or union template. | |
void | TemplateInfo (CTemplateInfo *info) |
Set the template information of a class/union template. | |
void | QualifiedScope (CStructure *scope) |
Set the qualification scope of a nested class or union or class/union declared in a namespace. | |
bool | isComplete (unsigned long pos=0) const |
Check if the class/union is complete (defined) at the given source code position. | |
bool | isDefined () const |
Check if the class/union is defined. | |
bool | isTemplate () const |
Check if the class/union is a template. | |
bool | isHiddenForwardDecl () const |
Check if this is a class/union forward declaration hidden by another declaration in the same scope. | |
bool | hasTrivialAssign () const |
Yields true if the class has a trivial copy assignment operator. | |
bool | hasTrivialCopy () const |
Yields true if the class has a trivial copy constructor. | |
bool | hasTrivialCtor () const |
Yields true if the class has a trivial default constructor. | |
bool | hasTrivialDtor () const |
Yields true if the class has a trivial destructor. | |
void | isTemplate (bool v) |
Set whether this class/union is a template. | |
void | isHiddenForwardDecl (bool v) |
Set whether this is a class/union forward declaration hidden by another declaration in the same scope. | |
bool | isCompleteParsed () const |
Return true if record is complete parsed. | |
void | isCompleteParsed (bool v) |
Set if record is complete parsed. | |
void | addParseDelayed (CTree *tree) |
Add a part of record to be parse delayed. | |
unsigned | ParseDelayed () const |
Get the number of parts of record to be parsed delayed. | |
CTree * | ParseDelayed (unsigned n) const |
Get the n-th part of record to be parsed delayed. | |
void | saveParseDelayedListLength () |
Save the current length of the delayed record parts list. | |
unsigned | forgetParseDelayedListLength () |
Forget the last saved length of the delayed record parts list. | |
void | rejectParseDelayed () |
Reject all parts of record to be parsed delayed added behind the last saved position in the list. | |
void | addInstantiateDelayed (Token *start, CTree *tree) |
Add a part of record to be instantiated delayed. | |
bool | haveInstantiateDelayed (Token *start) const |
Return true if there are template instances for which to instantiate the record part. | |
const TreeList & | InstantiateDelayed (Token *start) const |
Get the list of instances in which to instantiate the record part. | |
void | resetDelayed () |
Reset the list of parts of record to be parsed or instantiated delayed. | |
void | removeDelayed (CTree *tree) |
Remove the part of record to be parsed or instantiated delayed. | |
Protected Member Functions | |
CRecord (ObjectId id) | |
Constructor. |
Semantic information about a class or union.
typedef std::map<Token*,TreeList> Puma::CRecord::InstantiateDelayedMap |
typedef std::list<CTree*> Puma::CRecord::TreeList |
Puma::CRecord::CRecord | ( | CObjectInfo::ObjectId | id | ) | [inline, protected] |
Constructor.
id | The object type. |
Destructor.
void Puma::CRecord::addInstantiateDelayed | ( | Token * | start, |
CTree * | tree | ||
) | [inline] |
Add a part of record to be instantiated delayed.
void Puma::CRecord::addParseDelayed | ( | CTree * | tree | ) | [inline] |
Add a part of record to be parse delayed.
unsigned Puma::CRecord::forgetParseDelayedListLength | ( | ) | [inline] |
Forget the last saved length of the delayed record parts list.
bool Puma::CRecord::hasTrivialAssign | ( | ) | const |
Yields true if the class has a trivial copy assignment operator.
bool Puma::CRecord::hasTrivialCopy | ( | ) | const |
Yields true if the class has a trivial copy constructor.
bool Puma::CRecord::hasTrivialCtor | ( | ) | const |
Yields true if the class has a trivial default constructor.
bool Puma::CRecord::hasTrivialDtor | ( | ) | const |
Yields true if the class has a trivial destructor.
bool Puma::CRecord::haveInstantiateDelayed | ( | Token * | start | ) | const [inline] |
Return true if there are template instances for which to instantiate the record part.
const CRecord::TreeList & Puma::CRecord::InstantiateDelayed | ( | Token * | start | ) | const [inline] |
Get the list of instances in which to instantiate the record part.
bool Puma::CRecord::isComplete | ( | unsigned long | pos = 0 | ) | const |
Check if the class/union is complete (defined) at the given source code position.
The position is specified by the unique number of the CT_Token tree node representing the name of the class/union.
pos | The source code position. |
bool Puma::CRecord::isCompleteParsed | ( | ) | const [inline] |
Return true if record is complete parsed.
void Puma::CRecord::isCompleteParsed | ( | bool | v | ) | [inline] |
Set if record is complete parsed.
bool Puma::CRecord::isDefined | ( | ) | const |
Check if the class/union is defined.
bool Puma::CRecord::isHiddenForwardDecl | ( | ) | const [inline] |
Check if this is a class/union forward declaration hidden by another declaration in the same scope.
void Puma::CRecord::isHiddenForwardDecl | ( | bool | v | ) | [inline] |
Set whether this is a class/union forward declaration hidden by another declaration in the same scope.
v | true if it is a hidden forward declaration. |
bool Puma::CRecord::isTemplate | ( | ) | const [inline] |
Check if the class/union is a template.
Reimplemented from Puma::CObjectInfo.
void Puma::CRecord::isTemplate | ( | bool | v | ) | [inline] |
Set whether this class/union is a template.
v | true if it is a template. |
unsigned Puma::CRecord::ParseDelayed | ( | ) | const [inline] |
Get the number of parts of record to be parsed delayed.
CTree * Puma::CRecord::ParseDelayed | ( | unsigned | n | ) | const [inline] |
Get the n-th part of record to be parsed delayed.
void Puma::CRecord::QualifiedScope | ( | CStructure * | scope | ) | [inline] |
Set the qualification scope of a nested class or union or class/union declared in a namespace.
scope | The qualification scope. |
void Puma::CRecord::rejectParseDelayed | ( | ) |
Reject all parts of record to be parsed delayed added behind the last saved position in the list.
void Puma::CRecord::removeDelayed | ( | CTree * | tree | ) |
Remove the part of record to be parsed or instantiated delayed.
void Puma::CRecord::resetDelayed | ( | ) | [inline] |
Reset the list of parts of record to be parsed or instantiated delayed.
void Puma::CRecord::saveParseDelayedListLength | ( | ) | [inline] |
Save the current length of the delayed record parts list.
CTemplateInfo * Puma::CRecord::TemplateInfo | ( | ) | const [inline] |
Get the template information if this is a class or union template.
Reimplemented from Puma::CObjectInfo.
void Puma::CRecord::TemplateInfo | ( | CTemplateInfo * | info | ) | [inline] |
Set the template information of a class/union template.
info | The template information. |