DEADSOFTWARE

Solve oldType path lookup, found SEGFAULT
[odcread.git] / alien.h
1 #ifndef _ALIEN_H_
2 #define _ALIEN_H_
4 #include <oberon.h>
5 #include <store.h>
6 #include <iostream>
7 #include <vector>
9 namespace odc {
11 /**
12 * Part of an alien store
13 */
14 struct AlienComponent {
15 virtual std::string toString() = 0;
16 };
18 /**
19 * Totally unstructured part of an alien store
20 */
21 struct AlienPiece : public AlienComponent {
22 const char * const data;
23 const size_t len;
25 AlienPiece(const char * const data, const size_t len);
27 virtual std::string toString();
28 };
30 /**
31 * Store component of an alien store
32 */
33 struct AlienPart : public AlienComponent {
34 Store * const store;
36 AlienPart(Store * const _store);
38 virtual std::string toString();
39 };
41 class Alien : public Store {
42 SHORTCHAR **d_path;
43 std::vector<AlienComponent*> d_comps;
45 public:
47 Alien(INTEGER id, SHORTCHAR **path);
49 std::vector<AlienComponent*> & getComponents();
51 // cause-: INTEGER; (** # 0, the cause that turned this store into an alien **)
52 // file-: Files.File; (** base file holding alien pieces **)
53 // comps-: AlienComp (** the constituent components of this alien store **)
55 virtual std::string toString();
56 };
58 }
59 #endif // _ALIEN_H_