summaryrefslogtreecommitdiff
path: root/src/model/domain/Annotation.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-03-06 11:54:40 +0000
committerbenjamin <benjamin@daaaf23c-2e50-4459-9457-1e69db5a47bf>2014-03-06 11:54:40 +0000
commit1cb5fdc15c5f8399ca08377eb498f7c27c2eee85 (patch)
tree1e3a23d78b094d40d9fb80ce8e330bdc113eb2e4 /src/model/domain/Annotation.hpp
parent247945811adbfb5ddaa1ba4e1f3dfc20cd7eb058 (diff)
reworked the model classes according to manipulated GraphNode and removed some bugs resulting from a misunderstanding between abtract domain declarations and instances.
git-svn-id: file:///var/local/svn/basicwriter@29 daaaf23c-2e50-4459-9457-1e69db5a47bf
Diffstat (limited to 'src/model/domain/Annotation.hpp')
-rw-r--r--src/model/domain/Annotation.hpp46
1 files changed, 15 insertions, 31 deletions
diff --git a/src/model/domain/Annotation.hpp b/src/model/domain/Annotation.hpp
index 233b421..0e84d1c 100644
--- a/src/model/domain/Annotation.hpp
+++ b/src/model/domain/Annotation.hpp
@@ -16,22 +16,22 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _ANNOTATION_HPP_
-#define _ANNOTATION_HPP_
+#ifndef _OUSIA_MODEL_DOMAIN_ANNOTATION_HPP_
+#define _OUSIA_MODEL_DOMAIN_ANNOTATION_HPP_
#include <memory>
+#include <string>
#include <vector>
#include <model/GraphNode.hpp>
-#include <model/domain/Anchor.hpp>
-#include <model/domain/Structure.hpp>
-#include <model/domain/Field.hpp>
+#include "Structure.hpp"
+#include "Field.hpp"
namespace ousia {
+namespace model {
namespace domain {
//class Structure;
-//class Anchor;
//class Field;
class Annotation : public GraphNode {
@@ -39,11 +39,15 @@ class Annotation : public GraphNode {
private:
std::vector<std::shared_ptr<Structure>> structures;
std::vector<std::shared_ptr<Field>> fields;
- std::shared_ptr<Anchor> start;
- std::shared_ptr<Anchor> end;
public:
- using GraphNode::GraphNode;
+
+ Annotation(std::shared_ptr<GraphNode> parent = nullptr,
+ const std::string &name = "") :
+ GraphNode(GraphNodeType::Annotation, parent, name)
+ {
+ // Do nothing here
+ }
std::vector<std::shared_ptr<Structure>>& getStructures()
{
@@ -54,28 +58,8 @@ public:
{
return fields;
}
-
- std::shared_ptr<Anchor> getStart()
- {
- return start;
- }
-
- void setStart(std::shared_ptr<Anchor> start)
- {
- this->start = start;
- }
-
- std::shared_ptr<Anchor> getEnd()
- {
- return end;
- }
-
- void setEnd(std::shared_ptr<Anchor> end)
- {
- this->end = end;
- }
};
}
}
-
-#endif /* _ANNOTATION_HPP_ */
+}
+#endif /* _OUSIA_MODEL_DOMAIN_ANNOTATION_HPP_ */