Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GeneralClassMap Class Reference

This class stores information about all classes found in a source file. More...

#include <iopcTranslator.h>

List of all members.

Public Member Functions

int addClass (const char *className, const char *declaredWhere, bool persistent, char *&firstDeclarationWhere)


Detailed Description

This class stores information about all classes found in a source file.

Its purpose is to check whether there aren't two same named classes, where almost one of them is persistent capable. The checking is needed because OpenC++ supports namespaces and nested classes only partially. That's why we internally ignore the namespaces and nesting of the class and use one flat namespace for all classes.

Map - key = class name, value = class information.


Member Function Documentation

int GeneralClassMap::addClass const char *  className,
const char *  declaredWhere,
bool  persistent,
char *&  firstDeclarationWhere
[inline]
 

Tries to add information about class into this object.

If this object already contains information about class with name className, function returns non-zero return value and string (firstDeclarationWhere) describing where the class has been first time encountered.

Parameters:
className Name of the class.
declaredWhere Where this class comes from (file name + line number).
persistent Is the class persistent capable?
firstDeclarationWhere Where the same named class has been firstly encountered (file name + line number).
Return values:
0 OK
1 Persistent class with specified name has been already added, cannot add non-persistent one.
2 Non-persistent class with specified name has been already added, cannot add persistent one.
3 Persistent class with specified name has been already added, cannot add second one with the same name.


The documentation for this class was generated from the following file:
Generated on Wed Aug 11 22:35:30 2004 for IOPC by Doxygen 1.3.6