summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-22 00:43:14 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-22 00:43:14 +0100
commit601d07df6339696bace0f303a69a0a02a39f9eea (patch)
tree036d237800a151f51826fa401c56d15429d70bca /src
parentc2fb0693208c2e980fdb161e63ef82096c49d59a (diff)
made setParent protected to be consistent with move semantics.
Diffstat (limited to 'src')
-rw-r--r--src/core/model/Document.hpp5
-rw-r--r--src/core/model/Domain.hpp6
-rw-r--r--src/core/model/Node.hpp14
3 files changed, 17 insertions, 8 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp
index a7dee25..f13faf2 100644
--- a/src/core/model/Document.hpp
+++ b/src/core/model/Document.hpp
@@ -372,6 +372,8 @@ public:
* information please refer to the header documentation above.
*/
class StructuredEntity : public StructureNode, public DocumentEntity {
+ friend Document;
+
protected:
bool doValidate(Logger &logger) const override;
@@ -497,7 +499,7 @@ public:
class Anchor : public StructureNode {
protected:
bool doValidate(Logger &logger) const override;
-
+
public:
/**
* Constructor for Anchor.
@@ -545,6 +547,7 @@ public:
*/
class AnnotationEntity : public Node, public DocumentEntity {
friend DocumentEntity;
+ friend Document;
private:
Owned<Anchor> start;
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp
index e485171..85caa14 100644
--- a/src/core/model/Domain.hpp
+++ b/src/core/model/Domain.hpp
@@ -249,6 +249,8 @@ class Domain;
* undefined state.
*/
class FieldDescriptor : public Node {
+ friend Descriptor;
+
public:
/**
* This enum class contains all possible FieldTypes, meaning either the
@@ -672,6 +674,8 @@ static const Cardinality AnyCardinality = createAny();
* What about the cardinality?
*/
class StructuredClass : public Descriptor {
+ friend Domain;
+
private:
const Cardinality cardinality;
Owned<StructuredClass> superclass;
@@ -833,6 +837,8 @@ public:
* This class has no special properties and is in essence just a Descriptor.
*/
class AnnotationClass : public Descriptor {
+ friend Domain;
+
public:
/**
* The constructor for a new AnnotationClass. Note that you have to add
diff --git a/src/core/model/Node.hpp b/src/core/model/Node.hpp
index 6923125..c5761a8 100644
--- a/src/core/model/Node.hpp
+++ b/src/core/model/Node.hpp
@@ -210,6 +210,13 @@ private:
protected:
/**
+ * Sets the parent node.
+ *
+ * @param parent is a Handle to the parent node.
+ */
+ void setParent(Handle<Node> parent);
+
+ /**
* Function which should be overwritten by derived classes in order to
* resolve node names to a list of possible nodes. The implementations of
* this function do not need to do anything but call the
@@ -451,13 +458,6 @@ public:
Rooted<Managed> getParent() const { return parent; }
/**
- * Sets the parent node.
- *
- * @param parent is a Handle to the parent node.
- */
- void setParent(Handle<Node> parent);
-
- /**
* Returns true, if the node does not have a parent. Root nodes may either
* be the root element of the complete DOM tree
*