#ifndef ROWSETCACHE_H #define ROWSETCACHE_H #include "sourceObject.h" #include "presenter.h" #include "iHaveParameters.h" #include "rowSet.h" class RowSet; class RowState; typedef boost::intrusive_ptr RowSetCPtr; class RowSetCache : public IHaveParameters, public 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 boost::intrusive_ptr RowSetCachePtr; #endif