29
30
class CTemplateInfo;
33
/** \class CRecord CRecord.h Puma/CRecord.h
34
* Semantic information about a class or union. */
31
35
class CRecord : public CStructure {
32
// // classes/unions using this as/in an attribute.
33
// Array<CObjectInfo*> _Referer;
34
// // classes/unions/enums used by this class/union as/in an attribute.
35
// Array<CObjectInfo*> _Used;
36
// // methods (defined) of other classes/unions using this
37
// // class/union as argument/result.
38
// Array<CFunctionInfo*> _Transferer;
39
// // classes/unions/enums used as/in arguments/results of (defined)
40
// // methods of this class/union.
41
// Array<CObjectInfo*> _Transfered;
43
36
CTemplateInfo *_TemplateInfo;
45
38
bool _hiddenFwdDecl;
42
* \param id The object type. */
43
CRecord (ObjectId id);
49
/** Get the template information if this is a class or union template.
50
* \return The template information or NULL if not a template. */
53
51
CTemplateInfo *TemplateInfo () const;
54
void TemplateInfo (CTemplateInfo *);
56
void QualifiedScope (CStructure *);
59
bool isComplete (unsigned long = 0) const; // is complete type?
60
bool isDefined () const; // has a definition?
61
bool isTemplate () const; // is class template?
62
bool isHiddenForwardDecl () const; // hides names?
63
// unsigned Referers () const;
64
// unsigned Usages () const;
65
// unsigned Transferers () const;
66
// unsigned Transfers () const;
67
// CObjectInfo *Referer (unsigned) const;
68
// CObjectInfo *Referer (const char *) const;
69
// CObjectInfo *Usage (unsigned) const;
70
// CObjectInfo *Usage (const char *) const;
71
// CFunctionInfo *Transferer (unsigned) const;
72
// CFunctionInfo *Transferer (const char *) const;
73
// CObjectInfo *Transfer (unsigned) const;
74
// CObjectInfo *Transfer (const char *) const;
75
// bool isReferer (const CObjectInfo *) const;
76
// bool isUsed (const CObjectInfo *) const;
77
// bool isTransferer (const CFunctionInfo *) const;
78
// bool isTransfered (const CObjectInfo *) const;
81
void isTemplate (bool);
82
void isHiddenForwardDecl (bool);
83
// void addReferer (CObjectInfo *);
84
// void addUsage (CObjectInfo *);
85
// void addTransferer (CFunctionInfo *);
86
// void addTransfer (CObjectInfo *);
87
// void removeReferer (const CObjectInfo *); // WILL NOT BE DESTROYED!
88
// void removeUsage (const CObjectInfo *); // WILL NOT BE DESTROYED!
89
// void removeTransferer (const CFunctionInfo *); // WILL NOT BE DESTROYED!
90
// void removeTransfer (const CObjectInfo *); // WILL NOT BE DESTROYED!
92
// additional information
93
// bool isForward () const;
52
/** Set the template information of a class/union template.
53
* \param info The template information. */
54
void TemplateInfo (CTemplateInfo *info);
56
/** Set the qualification scope of a nested class or union
57
* or class/union declared in a namespace.
58
* \param scope The qualification scope. */
59
void QualifiedScope (CStructure *scope);
61
/** Check if the class/union is complete (defined)
62
* at the given source code position. The position
63
* is specified by the unique number of the CT_Token
64
* tree node representing the name of the class/union.
65
* \param pos The source code position. */
66
bool isComplete (unsigned long pos = 0) const;
67
/** Check if the class/union is defined. */
68
bool isDefined () const;
69
/** Check if the class/union is a template. */
70
bool isTemplate () const;
71
/** Check if this is a class/union forward declaration
72
* hidden by another declaration in the same scope. */
73
bool isHiddenForwardDecl () const;
75
/** Set whether this class/union is a template.
76
* \param v \e true if it is a template. */
77
void isTemplate (bool v);
78
/** Set whether this is a class/union forward declaration
79
* hidden by another declaration in the same scope.
80
* \param v \e true if it is a hidden forward declaration. */
81
void isHiddenForwardDecl (bool v);
96
84
inline CRecord::CRecord (CObjectInfo::ObjectId id) :