34 #ifndef GRAPH_TREE_TREE_H 35 #define GRAPH_TREE_TREE_H 43 #ifndef GRAPH_TREE_BASE_H 63 Tree(
bool allowChildren=
true,
const std::string & str=
"" );
73 std::set<std::string>& missing)
const;
75 std::set< Tree * > getElementsWith(
const std::string&,
76 bool recurse=
true )
const;
78 std::set< Tree * > getElementsWith(
const std::string&,
const T&,
79 bool recurse=
true )
const;
81 virtual size_t size()
const 82 #ifndef AIMS_GRAPH_SIZE_NO_DEPREC_WARNING 91 void recurseElementsWith(
const std::string&,
bool,
const Tree *,
92 std::set< Tree * >& )
const;
95 void recurseElementsWith(
const std::string&,
const T&,
bool,
const Tree *,
96 std::set< Tree * >& )
const;
102 inline Tree::Tree(
bool allowChildren,
const std::string & str )
111 Tree::recurseElementsWith(
const std::string& s,
const T& t,
bool recurse,
112 const Tree *p, std::set< Tree * >& trees )
const 118 if ( ( ao = dynamic_cast< Tree * >( *e ) ) != 0 )
120 if ( ao->hasProperty( s ) )
124 if ( ao->getProperty( s, tmp ) && tmp == t )
129 recurseElementsWith( s, t, recurse, ao, trees );
140 std::set< Tree * > trees;
142 recurseElementsWith( s, t, recurse,
this, trees );
#define DECLARE_GENERIC_OBJECT_TYPE(T)
#define __deprecated__(msg)
Abstract base class for visiting constant Trees.
virtual size_t childrenSize() const
Returns the number of children BaseTree the receiver contains.
Tree(bool allowChildren=true, const std::string &str="")
virtual size_t size() const __attribute__((__deprecated__("use childrenSize() for the number of children")))
deprecated - use childrenSize() for the number of children.
std::list< BaseTree * >::const_iterator const_iterator
std::set< Tree *> getElementsWith(const std::string &, bool recurse=true) const
Abstract base class for visiting Trees.
std::map< std::string, Syntax > SyntaxSet
SyntaxedObject< PropertySet > AttributedObject
const_iterator end() const
const_iterator begin() const