lsst.daf.persistence
16.0-7-g88875c5+4
|
Abstract base class for FormatterStorage implementations. More...
#include <FormatterStorage.h>
Public Types | |
typedef std::shared_ptr< FormatterStorage > | Ptr |
typedef std::vector< Ptr > | List |
typedef unsigned long | memId |
typedef memId(* | memNewCallback) (const memId cid) |
typedef memId(* | memCallback) (const Citizen *ptr) |
Public Member Functions | |
virtual | ~FormatterStorage (void) |
Minimal destructor. More... | |
virtual void | setPolicy (lsst::pex::policy::Policy::Ptr policy)=0 |
Allow a Policy to be used to configure the FormatterStorage. More... | |
virtual void | setPersistLocation (LogicalLocation const &location)=0 |
Set the destination for persistence. More... | |
virtual void | setRetrieveLocation (LogicalLocation const &location)=0 |
Set the source for retrieval. More... | |
virtual void | startTransaction (void)=0 |
Begin an atomic transaction. More... | |
virtual void | endTransaction (void)=0 |
End an atomic transaction. More... | |
std::string | repr () const |
void | markPersistent (void) |
memId | getId () const |
Static Public Member Functions | |
static Ptr | createInstance (std::string const &name, LogicalLocation const &location, bool persist, lsst::pex::policy::Policy::Ptr policy) |
Create and configure a FormatterStorage subclass instance. More... | |
static bool | hasBeenCorrupted () |
static memId | getNextMemId () |
static int | init () |
static int | census (int, memId startingMemId=0) |
static void | census (std::ostream &stream, memId startingMemId=0) |
static const std::vector< const Citizen *> * | census () |
static int | census (int, memId startingMemId=0) |
static void | census (std::ostream &stream, memId startingMemId=0) |
static const std::vector< const Citizen *> * | census () |
static memId | setNewCallbackId (memId id) |
static memId | setNewCallbackId (memId id) |
static memId | setDeleteCallbackId (memId id) |
static memId | setDeleteCallbackId (memId id) |
static memNewCallback | setNewCallback (memNewCallback func) |
static memCallback | setDeleteCallback (memCallback func) |
static memCallback | setCorruptionCallback (memCallback func) |
Public Attributes | |
magicSentinel | |
Protected Member Functions | |
FormatterStorage (std::type_info const &type) | |
Constructor. More... | |
void | verifyPathName (std::string const &pathName) |
Ensure that all directories along a path exist, creating them if necessary. More... | |
Abstract base class for FormatterStorage implementations.
All subclasses of this base class must be added to StorageRegistry.
Definition at line 60 of file FormatterStorage.h.
Definition at line 63 of file FormatterStorage.h.
Definition at line 62 of file FormatterStorage.h.
|
virtual |
Minimal destructor.
Definition at line 65 of file FormatterStorage.cc.
|
explicitprotected |
Constructor.
[in] | type | typeid() of subclass |
Definition at line 60 of file FormatterStorage.cc.
|
static |
Create and configure a FormatterStorage subclass instance.
[in] | name | Name of subclass |
[in] | location | Location to persist to or retrieve from |
[in] | persist | True if persisting, false if retrieving |
[in] | policy | Policy used to configure the FormatterStorage |
Definition at line 75 of file FormatterStorage.cc.
|
pure virtual |
End an atomic transaction.
Implemented in lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Set the destination for persistence.
[in] | location | Location to persist to. |
Exclusive with setRetrieveLocation().
Implemented in lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Allow a Policy to be used to configure the FormatterStorage.
[in] | policy | Should be called first, after construction. |
Implemented in lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Set the source for retrieval.
[in] | location | Location to retrieve from. |
Exclusive with setPersistLocation().
Implemented in lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Begin an atomic transaction.
Implemented in lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
protected |
Ensure that all directories along a path exist, creating them if necessary.
[in] | name | Pathname to file to be created |
Definition at line 93 of file FormatterStorage.cc.