some renamings.
This commit is contained in:
@@ -206,6 +206,12 @@ namespace znode
|
||||
return !children().empty();
|
||||
}
|
||||
|
||||
//! testet, ob kinder vorhanden sind.
|
||||
bool has_child(str_cref tagname ) const
|
||||
{
|
||||
return child(tagname ) != nullptr;
|
||||
}
|
||||
|
||||
//! gibt das erste kind zurück
|
||||
zshared_node first_child()
|
||||
{
|
||||
@@ -229,6 +235,17 @@ namespace znode
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//
|
||||
zshared_node child(str_cref tagname ) const
|
||||
{
|
||||
for( auto child : _children )
|
||||
{
|
||||
if( child->tag_name() == tagname )
|
||||
return child;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//! hängt einen knoten an meine kinderliste an.
|
||||
int add_child( const zshared_node& node )
|
||||
{
|
||||
@@ -313,7 +330,7 @@ namespace znode
|
||||
|
||||
//! findet den ersten kind-knoten mit dem attribut 'attrkey' welches den
|
||||
//! wert 'attrvalue' hat.
|
||||
zshared_node find_child_by_attribute(str_cref attrkey, str_cref attrvalue )
|
||||
zshared_node find_child_by_attribute(str_cref attrkey, str_cref attrvalue ) const
|
||||
{
|
||||
for( auto child : _children )
|
||||
{
|
||||
@@ -323,18 +340,9 @@ namespace znode
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//
|
||||
zshared_node find_child_by_tag_name(str_cref tagname )
|
||||
{
|
||||
for( auto child : _children )
|
||||
{
|
||||
if( child->tag_name() == tagname )
|
||||
return child;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
zshared_node find_child_by_id( int id )
|
||||
|
||||
zshared_node find_child_by_id( int id ) const
|
||||
{
|
||||
for (auto child : _children )
|
||||
{
|
||||
|
Reference in New Issue
Block a user