summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-07 02:31:51 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-07 02:31:51 +0100
commitf6531b10353dacdcbab211a31926c165211cf3b3 (patch)
treeb0c6508bb58b5a34e4b4f8007af5af44fd38aca1 /src/plugins
parent6b3b2f5965e5dfb2000bb9c23f11a83e175741de (diff)
Unified handling of references to Rtti instances: Now using pointers everywhere
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/html/DemoOutput.cpp6
-rw-r--r--src/plugins/xml/XmlParser.cpp12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp
index 074e65e..d61e9b7 100644
--- a/src/plugins/html/DemoOutput.cpp
+++ b/src/plugins/html/DemoOutput.cpp
@@ -151,7 +151,7 @@ Rooted<xml::Element> DemoHTMLTransformer::transformSection(
// Then we get all the children.
for (auto &n : section->getField()) {
- if (!n->isa(RttiTypes::StructuredEntity)) {
+ if (!n->isa(&RttiTypes::StructuredEntity)) {
continue;
}
Handle<StructuredEntity> s = n.cast<StructuredEntity>();
@@ -266,7 +266,7 @@ Rooted<xml::Element> DemoHTMLTransformer::transformParagraph(
// this is a handle for our current XML element for annotation handling.
Rooted<xml::Element> current = p;
for (auto &n : par->getField()) {
- if (n->isa(RttiTypes::Anchor)) {
+ if (n->isa(&RttiTypes::Anchor)) {
// check if this is a start Anchor.
// here we assume, again, that the ids/names of anchors are unique.
auto it = startMap.find(n->getName());
@@ -315,7 +315,7 @@ Rooted<xml::Element> DemoHTMLTransformer::transformParagraph(
continue;
}
// if this is not an anchor, we can only handle text.
- if (!n->isa(RttiTypes::StructuredEntity)) {
+ if (!n->isa(&RttiTypes::StructuredEntity)) {
continue;
}
Handle<StructuredEntity> t = n.cast<StructuredEntity>();
diff --git a/src/plugins/xml/XmlParser.cpp b/src/plugins/xml/XmlParser.cpp
index bd9b681..4f956d5 100644
--- a/src/plugins/xml/XmlParser.cpp
+++ b/src/plugins/xml/XmlParser.cpp
@@ -97,7 +97,7 @@ public:
{
// check if the parent in the structure tree was an explicit field
// reference.
- inField = parentNode->isa(RttiTypes::DocumentField);
+ inField = parentNode->isa(&RttiTypes::DocumentField);
if (inField) {
fieldName = parentNode->getName();
parentNode = scope().selectOrThrow(
@@ -108,10 +108,10 @@ public:
}
// reference the parent entity explicitly.
parent = nullptr;
- if (parentNode->isa(RttiTypes::StructuredEntity)) {
+ if (parentNode->isa(&RttiTypes::StructuredEntity)) {
parent = static_cast<DocumentEntity *>(
parentNode.cast<StructuredEntity>().get());
- } else if (parentNode->isa(RttiTypes::AnnotationEntity)) {
+ } else if (parentNode->isa(&RttiTypes::AnnotationEntity)) {
parent = static_cast<DocumentEntity *>(
parentNode.cast<AnnotationEntity>().get());
}
@@ -157,7 +157,7 @@ public:
args.erase(it);
}
Rooted<StructuredEntity> entity;
- if (parentNode->isa(RttiTypes::Document)) {
+ if (parentNode->isa(&RttiTypes::Document)) {
entity = parentNode.cast<Document>()->createRootStructuredEntity(
strct, args, name);
} else {
@@ -762,7 +762,7 @@ public:
Logger &logger) {
if (parent != nullptr) {
auto res = parent.cast<Descriptor>()->resolve(
- RttiTypes::FieldDescriptor, name);
+ &RttiTypes::FieldDescriptor, name);
if (res.size() != 1) {
logger.error(
std::string("Could not find referenced field ") + name,
@@ -840,7 +840,7 @@ public:
// Fetch the last node and check whether an import is valid at this
// position
Rooted<Node> leaf = scope().getLeaf();
- if (leaf == nullptr || !leaf->isa(RttiTypes::RootNode)) {
+ if (leaf == nullptr || !leaf->isa(&RttiTypes::RootNode)) {
logger().error(
"Import not supported here, must be inside a document, domain "
"or typesystem command.",