ubit
Public Member Functions | List of all members
ubit::UChildren Class Reference

Child (or attribute) list. More...

#include <uchild.hpp>

Inheritance diagram for ubit::UChildren:
ubit::UArgsChildren

Public Member Functions

UChildIter at (int pos)
 returns an iterator pointing to the object at this position; returns the last child if 'pos' = -1 and end() if 'pos' is out of bounds.
 
UChildIter find (const UNode &child)
 returns an iterator pointing to 'child'; returns end() if 'child' does no belong to the child list.
 
UChildIter findStr (const UStr &value, bool ignore_case=true)
 searches a string (UStr) which is equal to 'value'; returns end() if there is no such child. More...
 
UChildIter findBox (const UStr &value, bool ignore_case=true)
 searches a box (UBox or subclass) which contains a string which is equal to 'value'; returns end() if there is no such child. More...
 
template<class CC >
UChildIter findClass (CC *&c)
 returns an iterator to the first child that derives from this class. More...
 

Detailed Description

Child (or attribute) list.

See also
: UChildIter, UElem::children(), UElem::attributes(), UAttr::attributes().

Member Function Documentation

§ findBox()

UChildIter UChildren::findBox ( const UStr value,
bool  ignore_case = true 
)

searches a box (UBox or subclass) which contains a string which is equal to 'value'; returns end() if there is no such child.

this function compares the content of strings (not their addresses).

§ findClass()

template<class CC >
UChildIter ubit::UChildren::findClass ( CC *&  c)
inline

returns an iterator to the first child that derives from this class.

"derives" means: this class or a direct or indirect subclass. Exemple:

   UColor* c = null;
   UChildIter i = children.findClass(c);

§ findStr()

UChildIter UChildren::findStr ( const UStr value,
bool  ignore_case = true 
)

searches a string (UStr) which is equal to 'value'; returns end() if there is no such child.

this function compares the content of strings (not their addresses).


The documentation for this class was generated from the following files: