This class models skills that can be assigned to resources. More...
#include <model.h>
Public Types | |
typedef Association< Resource, Skill, ResourceSkill >::ListB | resourcelist |
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
size_t | extrasize () const |
virtual PyObject * | getattro (const Attribute &) |
const resourcelist & | getResources () const |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () const |
virtual int | setattro (const Attribute &, const PythonObject &) |
Skill (const string &n) | |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~Skill () | |
![]() | |
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 |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static PyObject * | addPythonResource (PyObject *, PyObject *) |
static int | initialize () |
![]() | |
static Skill * | add (const string &k, const MetaClass &cls) |
static Skill * | add (Skill *t) |
static Skill * | add (Skill *t, Skill *hint) |
static iterator | begin () |
static void | clear () |
static bool | empty () |
static iterator | end () |
static Skill * | find (const string &k) |
static Skill * | 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) |
![]() | |
template<class T > | |
static PyObject * | create (PyTypeObject *pytype, PyObject *args, PyObject *kwds) |
template<class T > | |
static Object * | createDefault () |
template<class T > | |
static Object * | createString (const string &n) |
static PyObject * | toXML (PyObject *, PyObject *) |
Static Public Attributes | |
static const MetaCategory * | metadata |
Friends | |
class | ResourceSkill |
This class models skills that can be assigned to resources.
typedef Association<Resource,Skill,ResourceSkill>::ListB frepple::Skill::resourcelist |
|
inline |
|
static |
Python interface to add a new resource.
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.
|
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< Skill >.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
|
inline |
|
inlinevirtual |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Reimplemented in frepple::SkillDefault.
|
inlinevirtual |
This returns the type information on the object, a bit similar to the standard type_info information.
Implements frepple::utils::Object.
Reimplemented in frepple::SkillDefault.
|
static |
Reimplemented in frepple::SkillDefault.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
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
Reimplemented from frepple::utils::Object.
|
friend |
|
static |
Reimplemented in frepple::SkillDefault.