Add an "at" function to ParseTree
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
1a37e35228
commit
a45902c9b2
@ -77,6 +77,7 @@ public:
|
||||
return optional<reference_wrapper<T>>();
|
||||
};
|
||||
inline component_ptr& operator[](const unsigned int& index) const { return subComponents[index]; }
|
||||
inline component_ptr& at(const unsigned int& index) const { return subComponents.at(index); }
|
||||
IS(NamedIdentifier)
|
||||
inline auto operator[](const string& key) const { return findReferenceByName<T>(key); }
|
||||
IS_PARSECOMPONENT inline void add(const T& component) { addComponent<T>(component); }
|
||||
|
Loading…
Reference in New Issue
Block a user