IComposite_T Class
class IComposite_T
Template interface for classes that support composition. For example, if you require a composite visual component, you can simply mix this interface into to your MvcVisualComponent derived class.Defined in: Collect.h
Class Template Arguments
element_t
The class of the element to store in the collection.
pos_t
The class used for the iterator.
Class Members
virtual SEC_INT GetChildCount(BOOL bRecursive) const
Return number of children in composite
virtual element_t GetChild(const pos_t pos) const
Return a pointer to a child given the collection index
virtual BOOL AddChild(element_t child)
Add a child to the end of the collection
virtual BOOL InsertChildAt(element_t child, const pos_t pos)
Insert a child into the composite at a given position
virtual BOOL RemoveChild(const element_t child)
Remove specfied child
virtual BOOL RemoveChildAt(const pos_t pos)
Remove a child at the specified position from the composite
virtual BOOL FindChild(element_t child, pos_t& pos) const
Return the index of a given child in the composite
virtual pos_t GetHeadChildPos() const
Return the head position in sequence
virtual pos_t GetTailChildPos() const
Return the head position in sequence
virtual pos_t GetNextChildPos(pos_t posOld) const
Return the next position in sequence
virtual pos_t GetPrevChildPos(pos_t posOld) const
Return the previous position in sequence
virtual void SetParent(element_t parent,BOOL bRemoveFromOldParent=TRUE)
Set (or reset) this node's parent
virtual element_t GetParent() const
Get this node's parent