DEADSOFTWARE

Show internal structure of StdTextModel
[odcread.git] / alien.cc
1 #include <alien.h>
3 namespace odc {
5 AlienPiece::AlienPiece(const char * const _data, const size_t _len): data(_data), len(_len) {}
7 std::string AlienPiece::toString() {
8 return std::string("AlienPiece");
9 }
11 AlienPart::AlienPart(Store * const _store): store(_store) {}
13 std::string AlienPart::toString() {
14 if (store != 0)
15 return store->toString();
16 else
17 return "NULL";
18 }
20 Alien::Alien(INTEGER id, const TypePath &path): Store(id), d_path(path), d_comps() {}
22 std::vector<AlienComponent*> & Alien::getComponents() {
23 return d_comps;
24 }
26 std::string Alien::toString() {
27 std::string sofar = d_path.toString() + "{ ";
28 for (int i = 0; i < d_comps.size(); ++i) {
29 sofar += d_comps[i]->toString() + " ";
30 }
31 return sofar + "}";
32 }
34 }