#include <root.h>

Public Member Functions | |
| Root (const char *id) | |
| void | SetID (const string &id) |
| const string & | GetID () |
| string | GetFullPath () |
| Root * | Find (const string &path) |
| void | Sort (bool backward=false) |
| int | GetTreeSize () const |
| void | LogTree (const string &indent) const |
| void | Lock () const |
| void | Unlock () const |
| bool | ReleaseChildren () |
| void | ClearChildren () |
Protected Member Functions | |
| virtual | ~Root () |
| void | SendMessage (BaseMessage *message, Root *destination, double delay=0.0) |
| virtual bool | Serialize (Serializer &serializer) |
| virtual bool | Deserialize (Serializer &serializer, bool first) |
Protected Attributes | |
| string | id |
| Mutex * | mutex |
| Root::Root | ( | const char * | id | ) |
| Root::~Root | ( | ) | [protected, virtual] |
| void Root::SetID | ( | const string & | id | ) | [inline] |
| const string & Root::GetID | ( | ) | [inline] |
Returns the object's id without path.
| string Root::GetFullPath | ( | ) |
Returns the full pathname of the object.
| Root * Root::Find | ( | const string & | id | ) | [inline] |
Finds a child object with a given id, NULL if not found.
| void Root::Sort | ( | bool | backward = false |
) |
Sort child objects alphabetically. This is a slow operation.
| int Root::GetTreeSize | ( | ) | const |
Recursive version of GetInstanceSize(). Returns the summed the size of all children.
| void Root::LogTree | ( | const string & | indent | ) | const |
Writes hierarchy with this node in the root to log file.
| void Root::Lock | ( | ) | const [inline] |
| void Root::Unlock | ( | ) | const [inline] |
| bool Root::ReleaseChildren | ( | ) |
Releases all children nodes.
True if all children were released. | void Root::ClearChildren | ( | ) |
Removes all children nodes.
| void Root::SendMessage | ( | BaseMessage * | message, | |
| Root * | destination, | |||
| double | delay = 0.0 | |||
| ) | [protected] |
| bool Root::Serialize | ( | Serializer & | serializer | ) | [protected, virtual] |
Recursively serialize all children.
Reimplemented from Serialized.
Reimplemented in BuildingPrototype, ForcePrototype, Player, Preloaded, Prototype, and Unit.
| bool Root::Deserialize | ( | Serializer & | serializer, | |
| bool | first | |||
| ) | [protected, virtual] |
Recursively deserialize all children.
Reimplemented from Serialized.
Reimplemented in BuildingPrototype, ForcePrototype, Player, Preloaded, Prototype, Unit, Animation, Mesh, and Model.
string Root::id [protected] |
Mutex* Root::mutex [mutable, protected] |
1.5.3