summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df199b1)
raw | patch | inline | side by side (parent: df199b1)
author | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 17:26:41 +0000 (17:26 +0000) | ||
committer | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 17:26:41 +0000 (17:26 +0000) |
alien/Make.inc | patch | blob | history | |
alien/alien.cc | patch | blob | history | |
alien/alien.h | patch | blob | history | |
alien/alien.ih | [new file with mode: 0644] | patch | blob |
alien/part.cc | [new file with mode: 0644] | patch | blob |
alien/piece.cc | [new file with mode: 0644] | patch | blob |
diff --git a/alien/Make.inc b/alien/Make.inc
index 6a6a6a60dcfcf2ca468426ab867ae55455819515..fd5c7022bdd79e0c5ec3b3ebaf3bc8ca83aa351f 100644 (file)
--- a/alien/Make.inc
+++ b/alien/Make.inc
-SRCS += alien/alien.cc
+SRCS += alien/alien.cc alien/piece.cc alien/part.cc
diff --git a/alien/alien.cc b/alien/alien.cc
index 38c70bd2ee966b7ae76507be34d2ae8ab0be9fe7..d00a4b886e50a68bc3109c27cb952472a824c2f0 100644 (file)
--- a/alien/alien.cc
+++ b/alien/alien.cc
-#include "alien/alien.h"
+#include "alien/alien.ih"
namespace odc {
-AlienPiece::AlienPiece(const char * const _data, const size_t _len): data(_data), len(_len) {}
-
-std::string AlienPiece::toString() {
- return std::string("AlienPiece");
-}
-
-void AlienPiece::accept(Visitor &visitor) const {
-}
-
-AlienPart::AlienPart(Store * const store): d_store(store) {}
-
-std::string AlienPart::toString() {
- if (d_store != 0)
- return d_store->toString();
- else
- return "NULL";
-}
-
-void AlienPart::accept(Visitor &visitor) const {
- if (d_store != 0) {
- d_store->accept(visitor);
- }
-}
-
Alien::Alien(INTEGER id, const TypePath &path): Store(id), d_path(path), d_comps() {}
std::vector<AlienComponent*> & Alien::getComponents() {
}
}
-}
+} // namespace odc
diff --git a/alien/alien.h b/alien/alien.h
index 5cc1262856a6a541a942f33c61e9762289c9e4df..099364f8fa3c020c30f9eae89b5fde6fd0508623 100644 (file)
--- a/alien/alien.h
+++ b/alien/alien.h
#include "oberon.h"
#include "store/store.h"
-#include "visitor/visitor.h"
-#include <iostream>
#include <vector>
#include <string>
namespace odc {
+class Visitor;
+
/**
* Part of an alien store
*/
* Totally unstructured part of an alien store
*/
struct AlienPiece : public AlienComponent {
- const char * const data;
- const size_t len;
+ char const * const data;
+ size_t const len;
AlienPiece(const char * const data, const size_t len);
diff --git a/alien/alien.ih b/alien/alien.ih
--- /dev/null
+++ b/alien/alien.ih
@@ -0,0 +1,4 @@
+#include <iostream>
+
+#include "alien/alien.h"
+#include "visitor/visitor.h"
diff --git a/alien/part.cc b/alien/part.cc
--- /dev/null
+++ b/alien/part.cc
@@ -0,0 +1,20 @@
+#include "alien/alien.ih"
+
+namespace odc {
+
+AlienPart::AlienPart(Store * const store): d_store(store) {}
+
+std::string AlienPart::toString() {
+ if (d_store != 0)
+ return d_store->toString();
+ else
+ return "NULL";
+}
+
+void AlienPart::accept(Visitor &visitor) const {
+ if (d_store != 0) {
+ d_store->accept(visitor);
+ }
+}
+
+} // namespace odc
diff --git a/alien/piece.cc b/alien/piece.cc
--- /dev/null
+++ b/alien/piece.cc
@@ -0,0 +1,14 @@
+#include "alien/alien.ih"
+
+namespace odc {
+
+AlienPiece::AlienPiece(char const * const _data, const size_t _len): data(_data), len(_len) {}
+
+std::string AlienPiece::toString() {
+ return std::string("AlienPiece");
+}
+
+void AlienPiece::accept(Visitor &visitor) const {
+}
+
+} // namespace odc