diff --git a/alien.cc b/alien.cc
index d82a33ca1a2f120a008e9561e197ad644018fd8a..fddd2024dbcb0dfd2ee200c52b3b93170f8c6a54 100644 (file)
--- a/alien.cc
+++ b/alien.cc
return std::string("AlienPiece");
}
-AlienPart::AlienPart(Store * const _store): store(_store) {}
+std::string AlienPiece::toPlainText() {
+ return std::string();
+}
+
+AlienPart::AlienPart(Store * const store): d_store(store) {}
std::string AlienPart::toString() {
- return store->toString();
+ if (d_store != 0)
+ return d_store->toString();
+ else
+ return "NULL";
+}
+
+std::string AlienPart::toPlainText() {
+ if (d_store != 0)
+ return d_store->toPlainText();
+ else
+ return std::string();
}
Alien::Alien(INTEGER id, const TypePath &path): Store(id), d_path(path), d_comps() {}
return sofar + "}";
}
+std::string Alien::toPlainText() {
+ std::string sofar = std::string();
+ for (int i = 0; i < d_comps.size(); ++i) {
+ sofar += d_comps[i]->toPlainText();
+ }
+ return sofar;
+}
+
}