LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Class for XML file storage. More...
#include <XmlStorage.h>
Public Types | |
typedef boost::shared_ptr < XmlStorage > | Ptr |
Public Types inherited from lsst::daf::persistence::Storage | |
typedef boost::shared_ptr < Storage > | Ptr |
typedef std::vector< Ptr > | List |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Public Member Functions | |
XmlStorage (void) | |
virtual | ~XmlStorage (void) |
virtual void | setPolicy (lsst::pex::policy::Policy::Ptr policy) |
virtual void | setPersistLocation (LogicalLocation const &location) |
virtual void | setRetrieveLocation (LogicalLocation const &location) |
virtual void | startTransaction (void) |
virtual void | endTransaction (void) |
virtual boost::archive::xml_oarchive & | getOArchive (void) |
virtual boost::archive::xml_iarchive & | getIArchive (void) |
Public Member Functions inherited from lsst::daf::persistence::Storage | |
virtual | ~Storage (void) |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Private Attributes | |
boost::scoped_ptr< std::ofstream > | _ostream |
Underlying output stream. More... | |
boost::scoped_ptr< std::ifstream > | _istream |
Underlying input stream. More... | |
boost::scoped_ptr < boost::archive::xml_oarchive > | _oarchive |
Boost XML output archive. More... | |
boost::scoped_ptr < boost::archive::xml_iarchive > | _iarchive |
Boost XML input archive. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from lsst::daf::persistence::Storage | |
static Ptr | createInstance (std::string const &name, LogicalLocation const &location, bool persist, lsst::pex::policy::Policy::Ptr policy) |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Protected Member Functions inherited from lsst::daf::persistence::Storage | |
Storage (std::type_info const &type) | |
void | verifyPathName (std::string const &pathName) |
Class for XML file storage.
Provides Boost XML archives for Formatter subclasses to use.
Definition at line 57 of file XmlStorage.h.
typedef boost::shared_ptr<XmlStorage> lsst::daf::persistence::XmlStorage::Ptr |
Definition at line 59 of file XmlStorage.h.
lsst::daf::persistence::XmlStorage::XmlStorage | ( | void | ) |
Constructor.
Definition at line 54 of file XmlStorage.cc.
|
virtual |
|
virtual |
End a transaction. No transaction support for now, but close streams.
Implements lsst::daf::persistence::Storage.
Definition at line 97 of file XmlStorage.cc.
|
virtual |
Get a boost::serialization
XML archive suitable for input.
Definition at line 114 of file XmlStorage.cc.
|
virtual |
Get a boost::serialization
XML archive suitable for output.
Definition at line 107 of file XmlStorage.cc.
|
virtual |
Set the destination to persist to.
[in] | location | Pathname to Boost XML file |
Implements lsst::daf::persistence::Storage.
Definition at line 74 of file XmlStorage.cc.
|
virtual |
Allow a Policy to be used to configure the Storage.
[in] | policy |
Implements lsst::daf::persistence::Storage.
Definition at line 68 of file XmlStorage.cc.
|
virtual |
Set the source to retrieve from.
[in] | location | Pathname to Boost XML file |
Implements lsst::daf::persistence::Storage.
Definition at line 83 of file XmlStorage.cc.
|
virtual |
Start a transaction. No transaction support for now.
Implements lsst::daf::persistence::Storage.
Definition at line 91 of file XmlStorage.cc.
|
private |
Boost XML input archive.
Definition at line 81 of file XmlStorage.h.
|
private |
Underlying input stream.
Definition at line 77 of file XmlStorage.h.
|
private |
Boost XML output archive.
Definition at line 79 of file XmlStorage.h.
|
private |
Underlying output stream.
Definition at line 75 of file XmlStorage.h.