117 void add(VariableRef& var)
119 _values().add(var.variable());
129 return _values().size();
133 template<
class Function> Function
136 std::for_each(_values().begin(),_values().end(),f);
147 return _values().empty();
150 VariableCollection clone()
const
152 VariableCollection new_collection;
153 new_collection._values().copy(_values());
154 return new_collection;
157 VariableCollectionEnumerator enumerator()
const
159 return VariableCollectionEnumerator(*
this);
162 bool contains(IVariable* v)
const
164 return _values().contains(v);
167 bool contains(VariableRef& v)
const
169 return _values().contains(v.variable());
173 void sortByName(
bool is_ascendent);
177 const Array<IVariable*>& _values()
const {
return m_p->variables(); }
178 Array<IVariable*>& _values() {
return m_p->variables(); }