diff options
author | Vincent Richard <[email protected]> | 2004-12-20 12:33:55 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2004-12-20 12:33:55 +0000 |
commit | 3217dd9bf9476a544d450e9ac636ca629ad141d9 (patch) | |
tree | 897f107e1c89a3021c7f3687649bdf8eb0c9477e /src/component.cpp | |
parent | Updated ChangeLog. (diff) | |
download | vmime-3217dd9bf9476a544d450e9ac636ca629ad141d9.tar.gz vmime-3217dd9bf9476a544d450e9ac636ca629ad141d9.zip |
Added component::getChildComponents() function.
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); +} + + } |