#ifndef ROWSETCACHE_H #define ROWSETCACHE_H #include "sourceObject.h" #include "presenter.h" #include "iHaveParameters.h" #include "rowSet.h" #include class RowSet; class RowState; typedef std::shared_ptr RowSetCPtr; class DLL_PUBLIC RowSetCache : public IHaveParameters, public virtual SourceObject { public: RowSetCache(ScriptNodePtr p); bool checkAndExecute(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *, const RowProcessorCallback &); virtual RowSetPresenterPtr openFor(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *) = 0; virtual void save(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *) = 0; virtual void discard(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *) = 0; protected: virtual RowSetCPtr getCachedRowSet(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *) const = 0; typedef boost::function KeyApplier; void applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const; const bool inherit; }; typedef std::shared_ptr RowSetCachePtr; typedef AdHoc::Factory> RowSetCacheFactory; #endif