This is a base class for the main objects. More...
#include <utils.h>
Classes | |
class | memberIterator |
This class models an STL-like iterator that allows us to iterate over the members. More... | |
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
memberIterator | beginMember () const |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
unsigned short | getHierarchyLevel () const |
T * | getOwner () const |
HasHierarchy (const string &n) | |
bool | hasOwner () const |
bool | isGroup () const |
void | setOwner (T *f) |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~HasHierarchy () | |
![]() | |
int | compare (const PyObject *other) const |
HasName (const string &n) | |
HasName (const char *n) | |
void | setName (const string &newname) |
virtual PyObject * | str () const |
~HasName () | |
![]() | |
TreeNode * | decrement () const |
const string & | getName () const |
TreeNode * | increment () const |
bool | operator< (const TreeNode &o) |
TreeNode (const string &n) | |
virtual | ~TreeNode () |
![]() | |
virtual bool | getHidden () const |
virtual size_t | getSize () const =0 |
virtual const MetaClass & | getType () const =0 |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
virtual PyObject * | getattro (const Attribute &attr) |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual int | setattro (const Attribute &attr, const PythonObject &field) |
virtual | ~PythonExtensionBase () |
Friends | |
class | memberIterator |
Additional Inherited Members | |
![]() | |
static T * | add (const string &k, const MetaClass &cls) |
static T * | add (T *t) |
static T * | add (T *t, T *hint) |
static iterator | begin () |
static void | clear () |
static bool | empty () |
static iterator | end () |
static T * | find (const string &k) |
static T * | findLowerBound (const string &k, bool *f=NULL) |
static Object * | reader (const MetaClass *cat, const AttributeList &in) |
static size_t | size () |
static void | verify () |
static void | writer (const MetaCategory *c, XMLOutput *o) |
![]() | |
NonCopyable () | |
~NonCopyable () | |
![]() | |
static PythonType * | registerPythonType (int, const type_info *) |
![]() | |
static vector< PythonType * > | table |
This is a base class for the main objects.
Instances of this class have the following properties:
|
inline |
frepple::utils::HasHierarchy< T >::~HasHierarchy | ( | ) |
|
virtual |
Called while restoring the model from an XML-file.
This is called for each element within the "this" element, for which the "this" element is immediate parent.
It is called when the open element tag is encountered.
Reimplemented from frepple::utils::Object.
|
inline |
|
virtual |
Called while restoring the model from an XML-file.
This is called when the corresponding close element tag is encountered, and the Data() member of pElement is valid.
Reimplemented from frepple::utils::HasName< T >.
unsigned short frepple::utils::HasHierarchy< T >::getHierarchyLevel | ( | ) | const |
|
inline |
|
inline |
|
inline |
void frepple::utils::HasHierarchy< T >::setOwner | ( | T * | f | ) |
|
virtual |
Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command
Note that this function is never called on its own. It is always called from the writeElement() method of a subclass. Therefore we don't need to worry about the refOnly or incHeader parameters.
Reimplemented from frepple::utils::Object.
|
friend |