X-Git-Url: https://deadsoftware.ru/gitweb?p=odcread.git;a=blobdiff_plain;f=store.h;h=4e7360e782170315dafd917c53816b6ae5d141c4;hp=54438ab4845b72d44b563fa16c1901897b79099a;hb=d7f2452e20b04d1559b7bdd3aa49b6fbf7d0abaf;hpb=8987976196a50e3e9639879990c7473610ff5369 diff --git a/store.h b/store.h index 54438ab..4e7360e 100644 --- a/store.h +++ b/store.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -27,7 +28,6 @@ namespace odc { private: static const std::string TYPENAME; static const TypeProxy PROXY; - static TypePath *s_typePath; INTEGER d_id; @@ -63,7 +63,7 @@ namespace odc { * Get the TypePath to this object's type. * @see TypePath */ - const TypePath &getTypePath() const; + void getTypePath(TypePath *path) const; /** * PROCEDURE (s: Store) Domain (): Domain @@ -132,8 +132,13 @@ namespace odc { virtual std::string toString(); + /** + * Receiving end of the Visitor pattern. + */ + virtual void accept(Visitor &visitor) const; + private: - TypePath *calcTypePath(const std::string &name) const; + void calcTypePath(TypePath * out, const std::string &name) const; }; class Elem : public Store { @@ -200,32 +205,6 @@ namespace odc { virtual const std::string &getTypeName() const; virtual void internalize(Reader &reader); }; - - class TextModel : public ContainerModel { - private: - static const std::string TYPENAME; - static const TypeProxy PROXY; - - public: - TextModel(INTEGER id); - static const std::string &getType(); - static const std::string *getSuper(); - virtual const std::string &getTypeName() const; - virtual void internalize(Reader &reader); - }; - - class StdTextModel : public TextModel { - private: - static const std::string TYPENAME; - static const TypeProxy PROXY; - - public: - StdTextModel(INTEGER id); - static const std::string &getType(); - static const std::string *getSuper(); - virtual const std::string &getTypeName() const; - virtual void internalize(Reader &reader); - }; } #endif // _STORE_H_