diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 18:22:14 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 18:22:14 +0100 |
commit | a30e627ffccf36384689295ce54af32e38ef5ef8 (patch) | |
tree | ffd03045f2f292da9d9f2d684d166093abaf7a21 /src/core/model/Document.cpp | |
parent | 1ebaaf08c0bc7de704a3c2a423f572c54c4a069b (diff) |
Droped Rtti<T> class, using RttiType instead
Diffstat (limited to 'src/core/model/Document.cpp')
-rw-r--r-- | src/core/model/Document.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
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 <set> #include <core/common/Exceptions.hpp> -#include <core/common/Rtti.hpp> +#include <core/common/RttiBuilder.hpp> namespace ousia { namespace model { @@ -347,20 +347,24 @@ bool Document::hasChild(Handle<StructureNode> s) const /* Type registrations */ namespace RttiTypes { -const Rtti<model::Document> Document = - RttiBuilder("Document").parent(&Node).composedOf( +const RttiType Document = + RttiBuilder<model::Document>("Document").parent(&Node).composedOf( {&AnnotationEntity, &StructuredEntity}); -const Rtti<model::StructureNode> StructureNode = - RttiBuilder("StructureNode").parent(&Node); -const Rtti<model::StructuredEntity> StructuredEntity = - RttiBuilder("StructuredEntity").parent(&StructureNode).composedOf( - {&StructuredEntity, &DocumentPrimitive, &Anchor}); -const Rtti<model::DocumentPrimitive> DocumentPrimitive = - RttiBuilder("DocumentPrimitive").parent(&StructureNode); -const Rtti<model::Anchor> Anchor = RttiBuilder("Anchor").parent(&StructureNode); -const Rtti<model::AnnotationEntity> AnnotationEntity = - RttiBuilder("AnnotationEntity").parent(&Node).composedOf( - {&StructuredEntity, &DocumentPrimitive, &Anchor}); +const RttiType StructureNode = + RttiBuilder<model::StructureNode>("StructureNode").parent(&Node); +const RttiType StructuredEntity = + RttiBuilder<model::StructuredEntity>("StructuredEntity") + .parent(&StructureNode) + .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); +const RttiType DocumentPrimitive = + RttiBuilder<model::DocumentPrimitive>("DocumentPrimitive") + .parent(&StructureNode); +const RttiType Anchor = + RttiBuilder<model::Anchor>("Anchor").parent(&StructureNode); +const RttiType AnnotationEntity = + RttiBuilder<model::AnnotationEntity>("AnnotationEntity") + .parent(&Node) + .composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor}); } } |