|
WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
|
Generic typed container that manages a set of child Component pointers. More...
#include <Container.h>
Public Types | |
| typedef std::unordered_set< DataType * >::iterator | iterator |
Public Member Functions | |
| Container () | |
| virtual | ~Container () |
| virtual bool | addChild (DataType *child) |
| virtual bool | removeChild (DataType *child) |
| void | removeAllChildren () |
| virtual void | onChildAdded (DataType *) |
| virtual void | onChildRemoved (DataType *) |
| template<class ChildType > | |
| int | removeAllChildrenOfType () |
| unsigned int | nbChildren () const |
| bool | findChildComponent (Component *child, bool recursive=false) |
| Component * | getChild (unsigned int index) |
| const Component * | getChild (unsigned int index) const |
| iterator | begin () |
| iterator | end () |
Public Member Functions inherited from Component | |
| Component () | |
| virtual | ~Component () |
| virtual bool | addChild (Component *) |
| Add a child component to this node. | |
| virtual bool | removeChild (Component *) |
| Remove a child component from this node. | |
| void | setParentComponent (Component *) |
| Set the parent of this component. | |
| virtual void | onParentSet (Component *) |
| Called after the parent has been set; override for custom logic. | |
| const Component * | parent () const |
| Get the parent component (const). | |
| Component * | parent () |
| Get the parent component. | |
| template<class DataType > | |
| const DataType * | firstParentOfType () |
| Walk up the parent chain and return the first ancestor of the given type. | |
| void | ref () |
| Increment the reference counter. | |
| void | unref () |
| Decrement the reference counter; deletes this when it reaches zero. | |
| void | setName (const std::string &name) |
| std::string | name () const |
| virtual void | onNameChanged () |
| void | print (int l_depth=0) |
| virtual void | doPrint () |
| void | copy (const Component &component, bool) |
Private Attributes | |
| std::unordered_set< DataType * > | m_children |
Generic typed container that manages a set of child Component pointers.
| DataType | The child element type (must derive from Component). |
Children are reference-counted and automatically released on destruction.
Definition at line 12 of file Container.h.
| typedef std::unordered_set<DataType*>::iterator Container< DataType >::iterator |
Definition at line 15 of file Container.h.
| Container< DataType >::Container | ( | ) |
Definition at line 56 of file Container.h.
Definition at line 63 of file Container.h.
|
virtual |
Definition at line 73 of file Container.h.
|
virtual |
Reimplemented from Component.
Definition at line 132 of file Container.h.
Reimplemented from Component.
Definition at line 154 of file Container.h.
|
virtual |
Reimplemented from Component.
Definition at line 171 of file Container.h.
|
inlinevirtual |
Reimplemented from Component.
Definition at line 35 of file Container.h.
|
inlinevirtual |
Reimplemented in core::GameFolder, and wow::WoWFolder.
Definition at line 24 of file Container.h.
|
inlinevirtual |
Reimplemented in core::GameFolder, and wow::WoWFolder.
Definition at line 28 of file Container.h.
|
virtual |
Reimplemented from Component.
Definition at line 100 of file Container.h.
| int Container< DataType >::removeAllChildrenOfType | ( | ) |
Definition at line 110 of file Container.h.
|
virtual |
Definition at line 86 of file Container.h.
|
private |
Definition at line 52 of file Container.h.