From 3217dd9bf9476a544d450e9ac636ca629ad141d9 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 20 Dec 2004 12:33:55 +0000 Subject: Added component::getChildComponents() function. --- src/component.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/component.cpp') 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::getChildComponents() +{ + const std::vector constList = + const_cast (this)->getChildComponents(); + + std::vector list; + + const std::vector ::size_type count = constList.size(); + + list.resize(count); + + for (std::vector ::size_type i = 0 ; i < count ; ++i) + list[i] = const_cast (constList[i]); + + return (list); +} + + } -- cgit v1.2.3