diff options
Diffstat (limited to 'src/component.cpp')
-rw-r--r-- | src/component.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/component.cpp b/src/component.cpp index 35ff3dc0..cbedac63 100644 --- a/src/component.cpp +++ b/src/component.cpp @@ -75,4 +75,22 @@ void component::setParsedBounds(const string::size_type start, const string::siz } +const std::vector <component*> component::getChildComponents() +{ + const std::vector <const component*> constList = + const_cast <const component*>(this)->getChildComponents(); + + std::vector <component*> list; + + const std::vector <const component*>::size_type count = constList.size(); + + list.resize(count); + + for (std::vector <const component*>::size_type i = 0 ; i < count ; ++i) + list[i] = const_cast <component*>(constList[i]); + + return (list); +} + + } |