diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 20:51:14 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 20:51:14 +0100 |
commit | 0778a9446dc3475b887d20515165a4dc63ed0cd0 (patch) | |
tree | bbd6dc700feb72c5f5f35a204bed083080afa35a | |
parent | 15dd9d1aa1e0cfe8b31364fb42985ee8d5c5fc9d (diff) |
Replaced the term "aggregation" with "composition"
-rw-r--r-- | src/core/common/Rtti.cpp | 30 | ||||
-rw-r--r-- | src/core/common/Rtti.hpp | 26 | ||||
-rw-r--r-- | src/core/managed/Managed.cpp | 4 | ||||
-rw-r--r-- | src/core/managed/Managed.hpp | 2 | ||||
-rw-r--r-- | src/core/managed/Manager.cpp | 2 | ||||
-rw-r--r-- | test/core/common/RttiTest.cpp | 62 | ||||
-rw-r--r-- | test/core/model/TypesystemTest.cpp | 260 |
7 files changed, 193 insertions, 193 deletions
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<const RttiBase *> 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<const RttiBase *> 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<const RttiBase *> 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 */ diff --git a/src/core/common/Rtti.hpp b/src/core/common/Rtti.hpp index ab937f5..237c60f 100644 --- a/src/core/common/Rtti.hpp +++ b/src/core/common/Rtti.hpp @@ -114,9 +114,9 @@ public: class RttiBase { private: /** - * Set to true if once the parents and the aggregated types list have been + * Set to true if once the parents and the composite types list have been * completed (by including the parents of the original parent elements and - * the aggregated types of the original aggregated types). + * the composite types of the original composite types). */ mutable bool initialized; @@ -126,14 +126,14 @@ private: mutable std::unordered_set<const RttiBase *> parents; /** - * Set containing references to all types this type is aggregated of, - * including all aggregated types of the original aggregated types. + * Set containing references to all types this type is a composition of, + * including all composite types of the original composite types. */ - mutable std::unordered_set<const RttiBase *> aggregatedTypes; + mutable std::unordered_set<const RttiBase *> compositeTypes; /** - * Adds the parent types of the parents and the aggregated types of the - * aggregated types to the internal sets. + * Adds the parent types of the original parents and the composite types of + * the original composite types to the internal sets for faster lookup. */ void initialize() const; @@ -162,11 +162,11 @@ public: RttiBase(std::string name, const std::type_info &native, std::unordered_set<const RttiBase *> parents = std::unordered_set<const RttiBase *>{}, - std::unordered_set<const RttiBase *> aggregatedTypes = + std::unordered_set<const RttiBase *> compositeTypes = std::unordered_set<const RttiBase *>{}) : initialized(false), parents(std::move(parents)), - aggregatedTypes(aggregatedTypes), + compositeTypes(compositeTypes), name(std::move(name)) { RttiStore::store(native, this); @@ -187,9 +187,9 @@ public: * resolving objects of a certain type by name in an object graph. * * @param other is the other type for which should be checked whether this - * type is directly or indirectly aggregated of it. + * type is directly or indirectly composed of it. */ - bool aggregatedOf(const RttiBase &other) const; + bool composedOf(const RttiBase &other) const; }; /** @@ -212,10 +212,10 @@ public: */ Rtti(std::string name, const std::unordered_set<const RttiBase *> &parents = std::unordered_set<const RttiBase *>{}, - std::unordered_set<const RttiBase *> aggregatedTypes = + std::unordered_set<const RttiBase *> compositeTypes = std::unordered_set<const RttiBase *>{}) : RttiBase(name, typeid(T), std::move(parents), - std::move(aggregatedTypes)) + std::move(compositeTypes)) { } }; diff --git a/src/core/managed/Managed.cpp b/src/core/managed/Managed.cpp index cede819..1342fec 100644 --- a/src/core/managed/Managed.cpp +++ b/src/core/managed/Managed.cpp @@ -81,8 +81,8 @@ const RttiBase &Managed::type() const { return typeOf(*this); } bool Managed::isa(const RttiBase &t) const { return type().isa(t); } -bool Managed::aggregatedOf(const RttiBase &t) const +bool Managed::composedOf(const RttiBase &t) const { - return type().aggregatedOf(t); + return type().composedOf(t); } } diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp index fecbfdd..f7eaa48 100644 --- a/src/core/managed/Managed.hpp +++ b/src/core/managed/Managed.hpp @@ -215,7 +215,7 @@ public: * @param true if the RttiBase registered for this particular Managed class * may contain instance of the given type. */ - bool aggregatedOf(const RttiBase &t) const; + bool composedOf(const RttiBase &t) const; }; /** diff --git a/src/core/managed/Manager.cpp b/src/core/managed/Manager.cpp index 4eaa71f..5428ea1 100644 --- a/src/core/managed/Manager.cpp +++ b/src/core/managed/Manager.cpp @@ -674,7 +674,7 @@ void Manager::exportGraphviz(const char *filename) } } } - if (et == EdgeType::NORMAL && type.aggregatedOf(typeTar)) { + if (et == EdgeType::NORMAL && type.composedOf(typeTar)) { et = EdgeType::AGGREGATE; } diff --git a/test/core/common/RttiTest.cpp b/test/core/common/RttiTest.cpp index 1154fb5..e5d7571 100644 --- a/test/core/common/RttiTest.cpp +++ b/test/core/common/RttiTest.cpp @@ -81,42 +81,42 @@ TEST(Rtti, isa) ASSERT_TRUE(Type4.isa(Type4)); } -TEST(Rtti, aggregatedOf) +TEST(Rtti, composedOf) { std::vector<const RttiBase *> types{&Type1, &Type2, &Type3, &Type4}; for (auto t : types) { - ASSERT_FALSE(t->aggregatedOf(Type1)); - ASSERT_FALSE(t->aggregatedOf(Type2)); - ASSERT_FALSE(t->aggregatedOf(Type3)); - ASSERT_FALSE(t->aggregatedOf(Type4)); - ASSERT_FALSE(t->aggregatedOf(Type5)); - ASSERT_FALSE(t->aggregatedOf(Type6)); - ASSERT_FALSE(t->aggregatedOf(Type7)); + ASSERT_FALSE(t->composedOf(Type1)); + ASSERT_FALSE(t->composedOf(Type2)); + ASSERT_FALSE(t->composedOf(Type3)); + ASSERT_FALSE(t->composedOf(Type4)); + ASSERT_FALSE(t->composedOf(Type5)); + ASSERT_FALSE(t->composedOf(Type6)); + ASSERT_FALSE(t->composedOf(Type7)); } - ASSERT_TRUE(Type5.aggregatedOf(Type1)); - ASSERT_FALSE(Type5.aggregatedOf(Type2)); - ASSERT_FALSE(Type5.aggregatedOf(Type3)); - ASSERT_FALSE(Type5.aggregatedOf(Type4)); - ASSERT_FALSE(Type5.aggregatedOf(Type5)); - ASSERT_TRUE(Type5.aggregatedOf(Type6)); - ASSERT_TRUE(Type5.aggregatedOf(Type7)); - - ASSERT_TRUE(Type6.aggregatedOf(Type1)); - ASSERT_FALSE(Type6.aggregatedOf(Type2)); - ASSERT_FALSE(Type6.aggregatedOf(Type3)); - ASSERT_FALSE(Type6.aggregatedOf(Type4)); - ASSERT_FALSE(Type6.aggregatedOf(Type5)); - ASSERT_FALSE(Type6.aggregatedOf(Type6)); - ASSERT_FALSE(Type6.aggregatedOf(Type7)); - - ASSERT_TRUE(Type7.aggregatedOf(Type1)); - ASSERT_FALSE(Type7.aggregatedOf(Type2)); - ASSERT_FALSE(Type7.aggregatedOf(Type3)); - ASSERT_FALSE(Type7.aggregatedOf(Type4)); - ASSERT_FALSE(Type7.aggregatedOf(Type5)); - ASSERT_FALSE(Type7.aggregatedOf(Type6)); - ASSERT_FALSE(Type7.aggregatedOf(Type7)); + ASSERT_TRUE(Type5.composedOf(Type1)); + ASSERT_FALSE(Type5.composedOf(Type2)); + ASSERT_FALSE(Type5.composedOf(Type3)); + ASSERT_FALSE(Type5.composedOf(Type4)); + ASSERT_FALSE(Type5.composedOf(Type5)); + ASSERT_TRUE(Type5.composedOf(Type6)); + ASSERT_TRUE(Type5.composedOf(Type7)); + + ASSERT_TRUE(Type6.composedOf(Type1)); + ASSERT_FALSE(Type6.composedOf(Type2)); + ASSERT_FALSE(Type6.composedOf(Type3)); + ASSERT_FALSE(Type6.composedOf(Type4)); + ASSERT_FALSE(Type6.composedOf(Type5)); + ASSERT_FALSE(Type6.composedOf(Type6)); + ASSERT_FALSE(Type6.composedOf(Type7)); + + ASSERT_TRUE(Type7.composedOf(Type1)); + ASSERT_FALSE(Type7.composedOf(Type2)); + ASSERT_FALSE(Type7.composedOf(Type3)); + ASSERT_FALSE(Type7.composedOf(Type4)); + ASSERT_FALSE(Type7.composedOf(Type5)); + ASSERT_FALSE(Type7.composedOf(Type6)); + ASSERT_FALSE(Type7.composedOf(Type7)); } } } diff --git a/test/core/model/TypesystemTest.cpp b/test/core/model/TypesystemTest.cpp index 12efc46..c280716 100644 --- a/test/core/model/TypesystemTest.cpp +++ b/test/core/model/TypesystemTest.cpp @@ -38,19 +38,19 @@ TEST(StringType, rtti) ASSERT_TRUE(strType->isa(typeOf<Type>())); ASSERT_TRUE(strType->isa(typeOf<Node>())); ASSERT_TRUE(strType->isa(RttiTypes::StringType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(strType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(strType->composedOf(RttiTypes::SystemTypesystem)); } TEST(StringType, creation) @@ -127,19 +127,19 @@ TEST(IntType, rtti) ASSERT_TRUE(intType->isa(RttiTypes::IntType)); ASSERT_TRUE(intType->isa(typeOf<Type>())); ASSERT_TRUE(intType->isa(typeOf<Node>())); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(intType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(intType->composedOf(RttiTypes::SystemTypesystem)); } TEST(IntType, creation) @@ -180,19 +180,19 @@ TEST(DoubleType, rtti) ASSERT_TRUE(doubleType->isa(RttiTypes::DoubleType)); ASSERT_TRUE(doubleType->isa(typeOf<Type>())); ASSERT_TRUE(doubleType->isa(typeOf<Node>())); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::SystemTypesystem)); } TEST(DoubleType, creation) @@ -240,19 +240,19 @@ TEST(BoolType, rtti) ASSERT_TRUE(boolType->isa(RttiTypes::BoolType)); ASSERT_TRUE(boolType->isa(typeOf<Type>())); ASSERT_TRUE(boolType->isa(typeOf<Node>())); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::SystemTypesystem)); } TEST(BoolType, creation) @@ -301,19 +301,19 @@ TEST(EnumType, rtti) ASSERT_TRUE(enumType->isa(RttiTypes::EnumType)); ASSERT_TRUE(enumType->isa(typeOf<Type>())); ASSERT_TRUE(enumType->isa(typeOf<Node>())); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::SystemTypesystem)); } TEST(EnumType, creation) @@ -478,19 +478,19 @@ TEST(StructType, rtti) ASSERT_TRUE(structType->isa(RttiTypes::StructType)); ASSERT_TRUE(structType->isa(typeOf<Type>())); ASSERT_TRUE(structType->isa(typeOf<Node>())); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(structType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(structType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(structType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(structType->composedOf(RttiTypes::SystemTypesystem)); } TEST(StructType, creation) @@ -741,19 +741,19 @@ TEST(ArrayType, rtti) ASSERT_TRUE(arrayType->isa(RttiTypes::ArrayType)); ASSERT_TRUE(arrayType->isa(typeOf<Type>())); ASSERT_TRUE(arrayType->isa(typeOf<Node>())); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::SystemTypesystem)); } TEST(ArrayType, creation) @@ -806,19 +806,19 @@ TEST(UnknownType, rtti) ASSERT_TRUE(unknownType->isa(RttiTypes::UnknownType)); ASSERT_TRUE(unknownType->isa(typeOf<Type>())); ASSERT_TRUE(unknownType->isa(typeOf<Node>())); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::SystemTypesystem)); } TEST(UnknownType, creation) @@ -849,19 +849,19 @@ TEST(Typesystem, rtti) { Manager mgr{1}; Rooted<Typesystem> typesystem{new Typesystem{mgr, "typesystem"}}; - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Type)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StringType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::IntType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::BoolType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::EnumType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Type)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StringType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::IntType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::DoubleType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::BoolType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::EnumType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::UnknownType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::SystemTypesystem)); } /* Class SystemTypesystem */ @@ -870,19 +870,19 @@ TEST(SystemTypesystem, rtti) { Manager mgr{1}; Rooted<SystemTypesystem> typesystem{new SystemTypesystem{mgr}}; - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Type)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StringType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::IntType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::BoolType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::EnumType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Type)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StringType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::IntType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::DoubleType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::BoolType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::EnumType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::UnknownType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::SystemTypesystem)); } |