X-Git-Url: https://deadsoftware.ru/gitweb?p=odcread.git;a=blobdiff_plain;f=alien.h;h=9f061dc412224be3e1236b94191afb3b54ee5faa;hp=40ef09ab838b9c21b5860549acfddedd9e680b3a;hb=d7f2452e20b04d1559b7bdd3aa49b6fbf7d0abaf;hpb=121a58d72f3b5e537007072f93397f6e6661fb90 diff --git a/alien.h b/alien.h index 40ef09a..9f061dc 100644 --- a/alien.h +++ b/alien.h @@ -3,8 +3,10 @@ #include #include +#include #include #include +#include namespace odc { @@ -13,6 +15,7 @@ namespace odc { */ struct AlienComponent { virtual std::string toString() = 0; + virtual void accept(Visitor &visitor) const = 0; }; /** @@ -25,26 +28,28 @@ struct AlienPiece : public AlienComponent { AlienPiece(const char * const data, const size_t len); virtual std::string toString(); + virtual void accept(Visitor &visitor) const; }; /** * Store component of an alien store */ struct AlienPart : public AlienComponent { - Store * const store; + Store * const d_store; - AlienPart(Store * const _store); + AlienPart(Store * const store); virtual std::string toString(); + virtual void accept(Visitor &visitor) const; }; class Alien : public Store { - SHORTCHAR **d_path; + const TypePath d_path; std::vector d_comps; public: - Alien(INTEGER id, SHORTCHAR **path); + Alien(INTEGER id, const TypePath &path); std::vector & getComponents(); @@ -53,6 +58,7 @@ class Alien : public Store { // comps-: AlienComp (** the constituent components of this alien store **) virtual std::string toString(); + virtual void accept(Visitor &visitor) const; }; }