23
23
* Semantic information about a class. */
25
25
#include "Puma/CRecord.h"
26
#include "Puma/CTypeInfo.h"
27
26
#include "Puma/CBaseClassInfo.h"
28
#include "Puma/CTokens.h"
29
27
#include "Puma/CProtection.h"
33
34
/** \class CClassInfo CClassInfo.h Puma/CClassInfo.h
34
35
* Semantic information about a class. Note that 'struct's
35
36
* are ordinary classes where the member access type
122
123
* or NULL to create an empty base class semantic object. */
123
124
CBaseClassInfo *newBaseClass (CClassInfo *bc = 0);
125
/** Check if the class is declared using keyword 'struct'. */
126
bool isStruct () const;
128
126
/** Get the accessibility of a particular member or base class member.
129
127
* \param oi The semantic object for the member. */
130
128
CProtection::Type Accessibility (CObjectInfo *oi) const;
132
130
/** Check if the given function overrides any virtual function
133
131
* defined in this class or any of its base classes.
134
132
* \param fi The function. */
135
133
bool overridesVirtual (const CFunctionInfo *fi) const;
135
/** Check if the class is declared using keyword 'struct'. */
136
bool isStruct () const;
137
137
/** Check if this class is an aggregate according to
138
138
* paragraph 8.5.1-1 of the ISO C++ standard. */
139
139
bool isAggregate () const;
140
/** Yields true if the class has no non-static data members other than
141
* bit-fields of length 0, no virtual member functions, no virtual
142
* base classes, and no base class B for which isEmpty() is false.
143
* \return true if empty class. */
144
bool isEmpty () const;
145
/** Yields true if the class declares or inherits a virtual function. */
146
bool isPolymorphic () const;
147
/** Yields true if the class has a pure virtual function. */
148
bool isAbstract () const;
149
/** Yields true if the class has a virtual destructor. */
150
bool hasVirtualDtor () const;
142
153
inline CClassInfo::CClassInfo (ObjectId id) :