X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Floader.h;h=bb1292cc7b3c2740adc14a6c596bde54c4a59678;hb=2d289d20a9a4aeac7774976e4213a7c72f1dc75b;hp=4a1faa3f7af650ff4f4ec3726cc768fea77255cb;hpb=b0b9af7216560da2a46ea38fe2df959f4dfb126f;p=libs%2Fdatafile.git diff --git a/source/loader.h b/source/loader.h index 4a1faa3..bb1292c 100644 --- a/source/loader.h +++ b/source/loader.h @@ -35,21 +35,12 @@ See also classes ObjectLoader and CollectionObjectLoader in objectloader.h. class Loader { private: - struct ActionKey - { - std::string keyword; - std::string signature; - - ActionKey(const std::string &, const std::string &); - - bool operator<(const ActionKey &) const; - }; - - typedef std::map ActionMap; + typedef std::map ActionMap; ActionMap actions; const Statement *cur_st; bool sub_loaded; + std::list aux_loaders; protected: bool check_sub_loads; @@ -131,7 +122,12 @@ protected: private: void add(const std::string &, LoaderAction *); - LoaderAction *find_action(const ActionKey &) const; +protected: + void add_auxiliary_loader(Loader &); + +private: + bool has_action(const StatementKey &) const; + LoaderAction *find_action(const StatementKey &) const; protected: /** Returns the source of the statement being processed. This can be used @@ -139,9 +135,6 @@ protected: source may not necessarily be a file. */ const std::string &get_source() const; - /** Throws a data_error from the current line. */ - void error(const std::string &) const; - virtual void finish() { } };