From 0778a9446dc3475b887d20515165a4dc63ed0cd0 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 5 Jan 2015 20:51:14 +0100 Subject: Replaced the term "aggregation" with "composition" --- src/core/common/Rtti.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/common/Rtti.cpp') diff --git a/src/core/common/Rtti.cpp b/src/core/common/Rtti.cpp index edfcda8..feabe05 100644 --- a/src/core/common/Rtti.cpp +++ b/src/core/common/Rtti.cpp @@ -53,7 +53,7 @@ void RttiBase::initialize() const if (!initialized) { initialized = true; - // Insert the parent types of the parent types and the aggregated types + // Insert the parent types of the parent types and the composite types // of the parents { std::unordered_set origParents = parents; @@ -63,23 +63,23 @@ void RttiBase::initialize() const } for (const RttiBase *parent : parents) { parent->initialize(); - aggregatedTypes.insert(parent->aggregatedTypes.begin(), - parent->aggregatedTypes.end()); + compositeTypes.insert(parent->compositeTypes.begin(), + parent->compositeTypes.end()); } parents.insert(this); } - // Insert the aggregated types of the aggregated types and the parents - // of each aggregated type + // Insert the composite types of the composite types and the parents + // of each composite type { - std::unordered_set origAggregatedTypes = - aggregatedTypes; - for (const RttiBase *aggregatedType : origAggregatedTypes) { - aggregatedType->initialize(); - aggregatedTypes.insert(aggregatedType->aggregatedTypes.begin(), - aggregatedType->aggregatedTypes.end()); - aggregatedTypes.insert(aggregatedType->parents.begin(), - aggregatedType->parents.end()); + std::unordered_set origCompositeTypes = + compositeTypes; + for (const RttiBase *compositeType : origCompositeTypes) { + compositeType->initialize(); + compositeTypes.insert(compositeType->compositeTypes.begin(), + compositeType->compositeTypes.end()); + compositeTypes.insert(compositeType->parents.begin(), + compositeType->parents.end()); } } } @@ -91,10 +91,10 @@ bool RttiBase::isa(const RttiBase &other) const return parents.count(&other) > 0; } -bool RttiBase::aggregatedOf(const RttiBase &other) const +bool RttiBase::composedOf(const RttiBase &other) const { initialize(); - return aggregatedTypes.count(&other) > 0; + return compositeTypes.count(&other) > 0; } /* Constant initialization */ -- cgit v1.2.3