Puma::CClassDatabase Class Reference
#include <Puma/infos/CClassDatabase.h>
List of all members.
Detailed Description
A
CClassDatabase object is a database of all semantic objects (infos) of a project.
Constructor & Destructor Documentation
Puma::CClassDatabase::CClassDatabase |
( |
CProject & |
prj, |
|
|
int |
size = 997 | |
|
) |
| | [inline] |
Construct a class database object.
- Parameters:
-
| prj | The corresponding project. |
| size | Not used. |
virtual Puma::CClassDatabase::~CClassDatabase |
( |
|
) |
[virtual] |
Destruct the class database. Also destroys all infos in the database.
Member Function Documentation
unsigned Puma::CClassDatabase::ObjectInfos |
( |
|
) |
const [inline] |
Get the number of semantic object infos.
unsigned Puma::CClassDatabase::ClassInfos |
( |
|
) |
const [inline] |
Get the number of class infos.
unsigned Puma::CClassDatabase::UnionInfos |
( |
|
) |
const [inline] |
Get the number of union infos.
unsigned Puma::CClassDatabase::EnumInfos |
( |
|
) |
const [inline] |
Get the number of enumeration infos.
unsigned Puma::CClassDatabase::TypedefInfos |
( |
|
) |
const [inline] |
Get the number of typedef infos.
unsigned Puma::CClassDatabase::FunctionInfos |
( |
|
) |
const [inline] |
Get the number of function infos.
unsigned Puma::CClassDatabase::FileInfos |
( |
|
) |
const [inline] |
Get the number of on-demand generated built-in operator functions.
CObjectInfo* Puma::CClassDatabase::ObjectInfo |
( |
unsigned |
n |
) |
const |
Get the n-th semantic object info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CClassInfo * Puma::CClassDatabase::ClassInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th class info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CUnionInfo * Puma::CClassDatabase::UnionInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th union info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CEnumInfo * Puma::CClassDatabase::EnumInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th enumeration info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CTypedefInfo * Puma::CClassDatabase::TypedefInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th typedef info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CFunctionInfo * Puma::CClassDatabase::FunctionInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th function info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
CFileInfo * Puma::CClassDatabase::FileInfo |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th on-demand generated built-in operator info.
- Parameters:
-
| n | The number of the info. |
- Returns:
- The info or
NULL
if n is invalid.
Get the semantic object info identified by the given source code position.
- Parameters:
-
| pos | The position in the source code. |
- Returns:
- The info or
NULL
if the info could not be identified.
Get the semantic object info identified by the given source code position.
- Parameters:
-
| pos | The position in the source code. |
- Returns:
- The info or
NULL
if the info could not be identified.
void Puma::CClassDatabase::Insert |
( |
CObjectInfo * |
info |
) |
|
Insert a new semantic object into the database.
- Parameters:
-
| info | The semantic object info to insert. |
void Puma::CClassDatabase::Remove |
( |
CObjectInfo * |
info |
) |
|
Remove the given semantic object from the database.
- Parameters:
-
| info | The semantic object info to remove. |
Get a function info object for a built-in operator.
- Parameters:
-
| name | Operator name. |
| tok | Operator token type, used as a key for fast lookup. |
| rtype | result type of the operator. Not used for lookup, only for object creation. |
| t0 | first argument type. |
| t1 | second argument type or NULL . |
- Returns:
- on-demand generated operator function object.
void Puma::CClassDatabase::Dump |
( |
ostream & |
out, |
|
|
int |
depth = 0 | |
|
) |
| | const |
Dump the contents of the database. The dump is indented as tree corresponding to the nesting of the semantic objects.
- Parameters:
-
| out | The output stream to dump to. |
| depth | The max. depth in the tree to be dumped. |
CProject * Puma::CClassDatabase::Project |
( |
|
) |
const [inline] |
Get the project info delivered to the constructor of the database.