45 #ifndef CLIPPER_CONTAINER
46 #define CLIPPER_CONTAINER
127 std::vector<Container*> children;
128 bool destroyed_with_parent;
149 T* pt =
dynamic_cast<T*
>(p);
150 if ( pt != NULL )
return pt;
const Container & parent() const
get the parent of this object
Definition: container.cpp:142
void move(const String &path)
'move' method moves this object to somewhere else in the hierarchy
Definition: container.cpp:216
virtual ~Container()
destructor: virtual
Definition: container.cpp:108
String path() const
get the path of this tree object
Definition: container.cpp:120
T * parent_of_type_ptr()
search up the tree for a parent of the specified type (NULL on fail)
Definition: container.h:143
bool is_destroyed_with_parent() const
is this object to be destroyed when parent is destroyed?
Definition: container.cpp:133
virtual void update()
update: hierarchical content update function
Definition: container.cpp:65
const Container & child(const int &i) const
get the i'th child of this object
Definition: container.cpp:157
const Container & ultimate_parent() const
get the ultimate parent of this object - the top of the tree
Definition: container.cpp:171
String name() const
get the name of this tree object
Definition: container.cpp:127
bool has_parent() const
test if this object has a parent
Definition: container.cpp:139
void set_name(const String &name)
set the name of this tree object
Definition: container.cpp:130
String extension with simple parsing methods.
Definition: clipper_types.h:64
Container(const String name="")
constructor: make null object or top object in a tree
Definition: container.cpp:71
int num_children() const
return number of children
Definition: container.cpp:154
void set_destroyed_with_parent(const bool d=true)
set this object to be destroyed when parent is destroyed
Definition: container.cpp:136
Container * parent_ptr()
get the parent of this object (NULL on fail)
Definition: container.cpp:183
Container * find_path_ptr(const String &path)
find an object using a directory-like path (NULL on fail)
Definition: container.cpp:188
Definition for a generic container Object.
Definition: container.h:68