From 66382c62af1be515deff66d51dba7f27e5fe4937 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 18 Jan 2015 18:41:30 +0100 Subject: Renamed RttiType to Rtti --- src/core/model/Document.cpp | 12 ++++++------ src/core/model/Document.hpp | 16 ++++++++-------- src/core/model/Domain.cpp | 10 +++++----- src/core/model/Domain.hpp | 12 ++++++------ src/core/model/Node.cpp | 14 +++++++------- src/core/model/Node.hpp | 8 ++++---- src/core/model/Typesystem.cpp | 26 +++++++++++++------------- src/core/model/Typesystem.hpp | 28 ++++++++++++++-------------- 8 files changed, 63 insertions(+), 63 deletions(-) (limited to 'src/core/model') diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp index 5ca257b..fc9ff8d 100644 --- a/src/core/model/Document.cpp +++ b/src/core/model/Document.cpp @@ -409,21 +409,21 @@ bool Document::hasChild(Handle s) const /* Type registrations */ namespace RttiTypes { -const RttiType Document = +const Rtti Document = RttiBuilder("Document").parent(&Node).composedOf( {&AnnotationEntity, &StructuredEntity}); -const RttiType StructureNode = +const Rtti StructureNode = RttiBuilder("StructureNode").parent(&Node); -const RttiType StructuredEntity = +const Rtti StructuredEntity = RttiBuilder("StructuredEntity") .parent(&StructureNode) .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); -const RttiType DocumentPrimitive = +const Rtti DocumentPrimitive = RttiBuilder("DocumentPrimitive") .parent(&StructureNode); -const RttiType Anchor = +const Rtti Anchor = RttiBuilder("Anchor").parent(&StructureNode); -const RttiType AnnotationEntity = +const Rtti AnnotationEntity = RttiBuilder("AnnotationEntity") .parent(&Node) .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index 164d9ba..7c5ee3c 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -120,7 +120,7 @@ namespace ousia { // Forward declarations -class RttiType; +class Rtti; namespace model { @@ -642,13 +642,13 @@ public: } namespace RttiTypes { -extern const RttiType Document; -extern const RttiType DocumentEntity; -extern const RttiType AnnotationEntity; -extern const RttiType StructureNode; -extern const RttiType StructuredEntity; -extern const RttiType DocumentPrimitive; -extern const RttiType Anchor; +extern const Rtti Document; +extern const Rtti DocumentEntity; +extern const Rtti AnnotationEntity; +extern const Rtti StructureNode; +extern const Rtti StructuredEntity; +extern const Rtti DocumentPrimitive; +extern const Rtti Anchor; } } diff --git a/src/core/model/Domain.cpp b/src/core/model/Domain.cpp index 6f50b1c..e4f087c 100644 --- a/src/core/model/Domain.cpp +++ b/src/core/model/Domain.cpp @@ -279,16 +279,16 @@ void Domain::addAnnotationClass(Handle a) /* Type registrations */ namespace RttiTypes { -const RttiType FieldDescriptor = +const Rtti FieldDescriptor = RttiBuilder("FieldDescriptor").parent(&Node); -const RttiType Descriptor = +const Rtti Descriptor = RttiBuilder("Descriptor").parent(&Node); -const RttiType StructuredClass = +const Rtti StructuredClass = RttiBuilder("StructuredClass").parent(&Descriptor).composedOf( &FieldDescriptor); -const RttiType AnnotationClass = +const Rtti AnnotationClass = RttiBuilder("AnnotationClass").parent(&Descriptor); -const RttiType Domain = +const Rtti Domain = RttiBuilder("Domain").parent(&Node).composedOf( {&StructuredClass, &AnnotationClass}); } diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index 86e2992..579a65c 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -211,7 +211,7 @@ namespace ousia { // Forward declarations -class RttiType; +class Rtti; namespace model { @@ -771,11 +771,11 @@ public: namespace RttiTypes { -extern const RttiType FieldDescriptor; -extern const RttiType Descriptor; -extern const RttiType StructuredClass; -extern const RttiType AnnotationClass; -extern const RttiType Domain; +extern const Rtti FieldDescriptor; +extern const Rtti Descriptor; +extern const Rtti StructuredClass; +extern const Rtti AnnotationClass; +extern const Rtti Domain; } } diff --git a/src/core/model/Node.cpp b/src/core/model/Node.cpp index d069eee..c4892af 100644 --- a/src/core/model/Node.cpp +++ b/src/core/model/Node.cpp @@ -67,7 +67,7 @@ public: /** * Type of the node that was requested for resolution. */ - const RttiType &type; + const Rtti &type; /** * Tracks all nodes that have already been visited. @@ -90,7 +90,7 @@ public: * @param type is the type of the node that should be resolved. */ SharedResolutionState(const std::vector &path, - const RttiType &type) + const Rtti &type) : path(path), type(type) { } @@ -187,9 +187,9 @@ public: * * @return true if the type matches, false otherwise. */ - bool typeMatches(const RttiType &type) { return type.isa(shared.type); } + bool typeMatches(const Rtti &type) { return type.isa(shared.type); } - bool canContainType(const RttiType &type) + bool canContainType(const Rtti &type) { return type.composedOf(shared.type); } @@ -331,7 +331,7 @@ bool Node::continueResolveReference(Handle h, ResolutionState &state) } std::vector Node::resolve( - const std::vector &path, const RttiType &type) + const std::vector &path, const Rtti &type) { // Create the state variables SharedResolutionState sharedState(path, type); @@ -347,7 +347,7 @@ std::vector Node::resolve( } std::vector Node::resolve(const std::string &name, - const RttiType &type) + const Rtti &type) { // Place the name in a vector and call the corresponding resolve function return resolve(std::vector{name}, type); @@ -437,7 +437,7 @@ bool Node::validate(Logger &logger) const /* RTTI type registrations */ namespace RttiTypes { -const RttiType Node = +const Rtti Node = RttiBuilder("Node") .property("name", {RttiTypes::String, {[](const ousia::Node *obj) { diff --git a/src/core/model/Node.hpp b/src/core/model/Node.hpp index 4db0cf7..190e8de 100644 --- a/src/core/model/Node.hpp +++ b/src/core/model/Node.hpp @@ -44,7 +44,7 @@ namespace ousia { // Forward declarations class Logger; -class RttiType; +class Rtti; /** * Describes the validity of a node structure. @@ -481,7 +481,7 @@ public: * the resolved elements. */ std::vector resolve(const std::vector &path, - const RttiType &type); + const Rtti &type); /** * Function which resolves a single name to a list of possible nodes @@ -493,7 +493,7 @@ public: * the resolved elements. */ std::vector resolve(const std::string &name, - const RttiType &type); + const Rtti &type); /** * Checks whether this node is valid and returns true if it is and false @@ -573,7 +573,7 @@ namespace RttiTypes { /** * Typeinformation for the base "Node" class. */ -extern const RttiType Node; +extern const Rtti Node; } } diff --git a/src/core/model/Typesystem.cpp b/src/core/model/Typesystem.cpp index 6daa7fe..f26363c 100644 --- a/src/core/model/Typesystem.cpp +++ b/src/core/model/Typesystem.cpp @@ -566,26 +566,26 @@ SystemTypesystem::SystemTypesystem(Manager &mgr) /* RTTI type registrations */ namespace RttiTypes { -const RttiType Type = RttiBuilder("Type").parent(&Node); -const RttiType StringType = +const Rtti Type = RttiBuilder("Type").parent(&Node); +const Rtti StringType = RttiBuilder("StringType").parent(&Type); -const RttiType IntType = RttiBuilder("IntType").parent(&Type); -const RttiType DoubleType = +const Rtti IntType = RttiBuilder("IntType").parent(&Type); +const Rtti DoubleType = RttiBuilder("DoubleType").parent(&Type); -const RttiType BoolType = RttiBuilder("BoolType").parent(&Type); -const RttiType EnumType = RttiBuilder("EnumType").parent(&Type); -const RttiType StructType = +const Rtti BoolType = RttiBuilder("BoolType").parent(&Type); +const Rtti EnumType = RttiBuilder("EnumType").parent(&Type); +const Rtti StructType = RttiBuilder("StructType").parent(&Type).composedOf(&Attribute); -const RttiType ArrayType = RttiBuilder("ArrayType").parent(&Type); -const RttiType UnknownType = +const Rtti ArrayType = RttiBuilder("ArrayType").parent(&Type); +const Rtti UnknownType = RttiBuilder("UnknownType").parent(&Type); -const RttiType Constant = RttiBuilder("Constant").parent(&Node); -const RttiType Attribute = RttiBuilder("Attribute").parent(&Node); -const RttiType Typesystem = +const Rtti Constant = RttiBuilder("Constant").parent(&Node); +const Rtti Attribute = RttiBuilder("Attribute").parent(&Node); +const Rtti Typesystem = RttiBuilder("Typesystem").parent(&Node).composedOf( {&StringType, &IntType, &DoubleType, &BoolType, &EnumType, &StructType, &Constant}); -const RttiType SystemTypesystem = +const Rtti SystemTypesystem = RttiBuilder ("SystemTypesystem").parent(&Typesystem); } } diff --git a/src/core/model/Typesystem.hpp b/src/core/model/Typesystem.hpp index a126813..dce8abc 100644 --- a/src/core/model/Typesystem.hpp +++ b/src/core/model/Typesystem.hpp @@ -41,7 +41,7 @@ namespace ousia { // Forward declarations -class RttiType; +class Rtti; namespace model { @@ -1111,67 +1111,67 @@ namespace RttiTypes { /** * Type information for the Type class. */ -extern const RttiType Type; +extern const Rtti Type; /** * Type information for the StringType class. */ -extern const RttiType StringType; +extern const Rtti StringType; /** * Type information for the IntType class. */ -extern const RttiType IntType; +extern const Rtti IntType; /** * Type information for the DoubleType class. */ -extern const RttiType DoubleType; +extern const Rtti DoubleType; /** * Type information for the BoolType class. */ -extern const RttiType BoolType; +extern const Rtti BoolType; /** * Type information for the EnumType class. */ -extern const RttiType EnumType; +extern const Rtti EnumType; /** * Type information for the StructType class. */ -extern const RttiType StructType; +extern const Rtti StructType; /** * Type information for the ArrayType class. */ -extern const RttiType ArrayType; +extern const Rtti ArrayType; /** * Type information for the UnknownType class. */ -extern const RttiType UnknownType; +extern const Rtti UnknownType; /** * Type information for the Constant class. */ -extern const RttiType Constant; +extern const Rtti Constant; /** * Type information for the Attribute class. */ -extern const RttiType Attribute; +extern const Rtti Attribute; /** * Type information for the Typesystem class. */ -extern const RttiType Typesystem; +extern const Rtti Typesystem; /** * Type information for the SystemTypesystem class. */ -extern const RttiType SystemTypesystem; +extern const Rtti SystemTypesystem; } } -- cgit v1.2.3