DEADSOFTWARE

Fix SEGFAULT
[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 return store->toString();
15 }
17 Alien::Alien(INTEGER id, SHORTCHAR **path): Store(id), d_path(path), d_comps() {}
19 std::vector<AlienComponent*> & Alien::getComponents() {
20 return d_comps;
21 }
23 std::string Alien::toString() {
24 std::string sofar = std::string(d_path[0]) + "{ ";
25 for (int i = 0; i < d_comps.size(); ++i) {
26 sofar += d_comps[i]->toString() + " ";
27 }
28 return sofar + "}";
29 }
31 }