From a30e627ffccf36384689295ce54af32e38ef5ef8 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 18 Jan 2015 18:22:14 +0100 Subject: Droped Rtti class, using RttiType instead --- src/core/model/Document.cpp | 32 ++++++++++++++++++-------------- src/core/model/Document.hpp | 14 +++++++------- src/core/model/Domain.cpp | 22 +++++++++++----------- src/core/model/Domain.hpp | 10 +++++----- src/core/model/Node.cpp | 7 +++---- src/core/model/Node.hpp | 2 +- src/core/model/Typesystem.cpp | 40 ++++++++++++++++++++-------------------- src/core/model/Typesystem.hpp | 28 ++++++++++++++-------------- 8 files changed, 79 insertions(+), 76 deletions(-) (limited to 'src/core/model') diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp index 5f0ad4c..f817845 100644 --- a/src/core/model/Document.cpp +++ b/src/core/model/Document.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace ousia { namespace model { @@ -347,20 +347,24 @@ bool Document::hasChild(Handle s) const /* Type registrations */ namespace RttiTypes { -const Rtti Document = - RttiBuilder("Document").parent(&Node).composedOf( +const RttiType Document = + RttiBuilder("Document").parent(&Node).composedOf( {&AnnotationEntity, &StructuredEntity}); -const Rtti StructureNode = - RttiBuilder("StructureNode").parent(&Node); -const Rtti StructuredEntity = - RttiBuilder("StructuredEntity").parent(&StructureNode).composedOf( - {&StructuredEntity, &DocumentPrimitive, &Anchor}); -const Rtti DocumentPrimitive = - RttiBuilder("DocumentPrimitive").parent(&StructureNode); -const Rtti Anchor = RttiBuilder("Anchor").parent(&StructureNode); -const Rtti AnnotationEntity = - RttiBuilder("AnnotationEntity").parent(&Node).composedOf( - {&StructuredEntity, &DocumentPrimitive, &Anchor}); +const RttiType StructureNode = + RttiBuilder("StructureNode").parent(&Node); +const RttiType StructuredEntity = + RttiBuilder("StructuredEntity") + .parent(&StructureNode) + .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); +const RttiType DocumentPrimitive = + RttiBuilder("DocumentPrimitive") + .parent(&StructureNode); +const RttiType Anchor = + RttiBuilder("Anchor").parent(&StructureNode); +const RttiType AnnotationEntity = + RttiBuilder("AnnotationEntity") + .parent(&Node) + .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); } } diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index 9410d17..d9729c3 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -641,13 +641,13 @@ public: } namespace RttiTypes { -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; +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; } } diff --git a/src/core/model/Domain.cpp b/src/core/model/Domain.cpp index 9a0ed0d..6f50b1c 100644 --- a/src/core/model/Domain.cpp +++ b/src/core/model/Domain.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include #include "Domain.hpp" @@ -279,17 +279,17 @@ void Domain::addAnnotationClass(Handle a) /* Type registrations */ namespace RttiTypes { -const Rtti FieldDescriptor = - RttiBuilder("FieldDescriptor").parent(&Node); -const Rtti Descriptor = - RttiBuilder("Descriptor").parent(&Node); -const Rtti StructuredClass = - RttiBuilder("StructuredClass").parent(&Descriptor).composedOf( +const RttiType FieldDescriptor = + RttiBuilder("FieldDescriptor").parent(&Node); +const RttiType Descriptor = + RttiBuilder("Descriptor").parent(&Node); +const RttiType StructuredClass = + RttiBuilder("StructuredClass").parent(&Descriptor).composedOf( &FieldDescriptor); -const Rtti AnnotationClass = - RttiBuilder("AnnotationClass").parent(&Descriptor); -const Rtti Domain = - RttiBuilder("Domain").parent(&Node).composedOf( +const RttiType AnnotationClass = + RttiBuilder("AnnotationClass").parent(&Descriptor); +const RttiType Domain = + RttiBuilder("Domain").parent(&Node).composedOf( {&StructuredClass, &AnnotationClass}); } } diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index d1ba44f..b192c11 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -769,11 +769,11 @@ public: namespace RttiTypes { -extern const Rtti FieldDescriptor; -extern const Rtti Descriptor; -extern const Rtti StructuredClass; -extern const Rtti AnnotationClass; -extern const Rtti Domain; +extern const RttiType FieldDescriptor; +extern const RttiType Descriptor; +extern const RttiType StructuredClass; +extern const RttiType AnnotationClass; +extern const RttiType Domain; } } diff --git a/src/core/model/Node.cpp b/src/core/model/Node.cpp index bd023e1..be13d42 100644 --- a/src/core/model/Node.cpp +++ b/src/core/model/Node.cpp @@ -21,8 +21,7 @@ #include #include -#include -#include +#include #include #include "Node.hpp" @@ -438,8 +437,8 @@ bool Node::validate(Logger &logger) const /* RTTI type registrations */ namespace RttiTypes { -const Rtti Node = - TypedRttiBuilder("Node") +const RttiType Node = + RttiBuilder("Node") .property("name", {RttiTypes::String, {[](const ousia::Node *obj) { return Variant::fromString(obj->getName()); diff --git a/src/core/model/Node.hpp b/src/core/model/Node.hpp index 0168a3e..79f38b8 100644 --- a/src/core/model/Node.hpp +++ b/src/core/model/Node.hpp @@ -575,7 +575,7 @@ namespace RttiTypes { /** * Typeinformation for the base "Node" class. */ -extern const Rtti Node; +extern const RttiType Node; } } diff --git a/src/core/model/Typesystem.cpp b/src/core/model/Typesystem.cpp index 13bb38c..2be564d 100644 --- a/src/core/model/Typesystem.cpp +++ b/src/core/model/Typesystem.cpp @@ -18,7 +18,7 @@ #include "Typesystem.hpp" -#include +#include #include #include @@ -560,27 +560,27 @@ SystemTypesystem::SystemTypesystem(Manager &mgr) /* RTTI type registrations */ namespace RttiTypes { -const Rtti Type = RttiBuilder("Type").parent(&Node); -const Rtti StringType = - RttiBuilder("StringType").parent(&Type); -const Rtti IntType = RttiBuilder("IntType").parent(&Type); -const Rtti DoubleType = - RttiBuilder("DoubleType").parent(&Type); -const Rtti BoolType = RttiBuilder("BoolType").parent(&Type); -const Rtti EnumType = RttiBuilder("EnumType").parent(&Type); -const Rtti StructType = - RttiBuilder("StructType").parent(&Type).composedOf(&Attribute); -const Rtti ArrayType = RttiBuilder("ArrayType").parent(&Type); -const Rtti UnknownType = - RttiBuilder("UnknownType").parent(&Type); -const Rtti Constant = RttiBuilder("Constant").parent(&Node); -const Rtti Attribute = RttiBuilder("Attribute").parent(&Node); -const Rtti Typesystem = - RttiBuilder("Typesystem").parent(&Node).composedOf( +const RttiType Type = RttiBuilder("Type").parent(&Node); +const RttiType StringType = + RttiBuilder("StringType").parent(&Type); +const RttiType IntType = RttiBuilder("IntType").parent(&Type); +const RttiType DoubleType = + RttiBuilder("DoubleType").parent(&Type); +const RttiType BoolType = RttiBuilder("BoolType").parent(&Type); +const RttiType EnumType = RttiBuilder("EnumType").parent(&Type); +const RttiType StructType = + RttiBuilder("StructType").parent(&Type).composedOf(&Attribute); +const RttiType ArrayType = RttiBuilder("ArrayType").parent(&Type); +const RttiType UnknownType = + RttiBuilder("UnknownType").parent(&Type); +const RttiType Constant = RttiBuilder("Constant").parent(&Node); +const RttiType Attribute = RttiBuilder("Attribute").parent(&Node); +const RttiType Typesystem = + RttiBuilder("Typesystem").parent(&Node).composedOf( {&StringType, &IntType, &DoubleType, &BoolType, &EnumType, &StructType, &Constant}); -const Rtti SystemTypesystem = - RttiBuilder("SystemTypesystem").parent(&Typesystem); +const RttiType SystemTypesystem = + RttiBuilder ("SystemTypesystem").parent(&Typesystem); } } diff --git a/src/core/model/Typesystem.hpp b/src/core/model/Typesystem.hpp index a4a679d..1b54a07 100644 --- a/src/core/model/Typesystem.hpp +++ b/src/core/model/Typesystem.hpp @@ -1097,67 +1097,67 @@ namespace RttiTypes { /** * Type information for the Type class. */ -extern const Rtti Type; +extern const RttiType Type; /** * Type information for the StringType class. */ -extern const Rtti StringType; +extern const RttiType StringType; /** * Type information for the IntType class. */ -extern const Rtti IntType; +extern const RttiType IntType; /** * Type information for the DoubleType class. */ -extern const Rtti DoubleType; +extern const RttiType DoubleType; /** * Type information for the BoolType class. */ -extern const Rtti BoolType; +extern const RttiType BoolType; /** * Type information for the EnumType class. */ -extern const Rtti EnumType; +extern const RttiType EnumType; /** * Type information for the StructType class. */ -extern const Rtti StructType; +extern const RttiType StructType; /** * Type information for the ArrayType class. */ -extern const Rtti ArrayType; +extern const RttiType ArrayType; /** * Type information for the UnknownType class. */ -extern const Rtti UnknownType; +extern const RttiType UnknownType; /** * Type information for the Constant class. */ -extern const Rtti Constant; +extern const RttiType Constant; /** - * Type information for the Constant class. + * Type information for the Attribute class. */ -extern const Rtti Attribute; +extern const RttiType Attribute; /** * Type information for the Typesystem class. */ -extern const Rtti Typesystem; +extern const RttiType Typesystem; /** * Type information for the SystemTypesystem class. */ -extern const Rtti SystemTypesystem; +extern const RttiType SystemTypesystem; } } -- cgit v1.2.3