lsst.daf.persistence  13.0-31-g48013df+4
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::daf::persistence::FormatterStorage Class Referenceabstract

Abstract base class for FormatterStorage implementations. More...

#include <FormatterStorage.h>

Inheritance diagram for lsst::daf::persistence::FormatterStorage:
lsst::daf::persistence::BoostStorage lsst::daf::persistence::DbStorage lsst::daf::persistence::FitsStorage lsst::daf::persistence::XmlStorage lsst::daf::persistence::DbTsvStorage

Public Types

typedef std::shared_ptr< FormatterStoragePtr
 
typedef std::vector< PtrList
 

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...
 

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...
 

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...
 

Detailed Description

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.

Member Typedef Documentation

◆ List

Definition at line 63 of file FormatterStorage.h.

◆ Ptr

Definition at line 62 of file FormatterStorage.h.

Constructor & Destructor Documentation

◆ ~FormatterStorage()

lsst::daf::persistence::FormatterStorage::~FormatterStorage ( void  )
virtual

Minimal destructor.

Definition at line 65 of file FormatterStorage.cc.

◆ FormatterStorage()

lsst::daf::persistence::FormatterStorage::FormatterStorage ( std::type_info const &  type)
explicitprotected

Constructor.

Parameters
[in]typetypeid() of subclass

Definition at line 60 of file FormatterStorage.cc.

Member Function Documentation

◆ createInstance()

FormatterStorage::Ptr lsst::daf::persistence::FormatterStorage::createInstance ( std::string const &  name,
LogicalLocation const &  location,
bool  persist,
lsst::pex::policy::Policy::Ptr  policy 
)
static

Create and configure a FormatterStorage subclass instance.

Parameters
[in]nameName of subclass
[in]locationLocation to persist to or retrieve from
[in]persistTrue if persisting, false if retrieving
[in]policyPolicy used to configure the FormatterStorage
Returns
Shared pointer to FormatterStorage subclass instance

Definition at line 75 of file FormatterStorage.cc.

◆ endTransaction()

virtual void lsst::daf::persistence::FormatterStorage::endTransaction ( void  )
pure virtual

◆ setPersistLocation()

virtual void lsst::daf::persistence::FormatterStorage::setPersistLocation ( LogicalLocation const &  location)
pure virtual

Set the destination for persistence.

Parameters
[in]locationLocation to persist to.

Exclusive with setRetrieveLocation().

Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.

◆ setPolicy()

virtual void lsst::daf::persistence::FormatterStorage::setPolicy ( lsst::pex::policy::Policy::Ptr  policy)
pure virtual

Allow a Policy to be used to configure the FormatterStorage.

Parameters
[in]policyShould be called first, after construction.

Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.

◆ setRetrieveLocation()

virtual void lsst::daf::persistence::FormatterStorage::setRetrieveLocation ( LogicalLocation const &  location)
pure virtual

◆ startTransaction()

virtual void lsst::daf::persistence::FormatterStorage::startTransaction ( void  )
pure virtual

◆ verifyPathName()

void lsst::daf::persistence::FormatterStorage::verifyPathName ( std::string const &  name)
protected

Ensure that all directories along a path exist, creating them if necessary.

Parameters
[in]namePathname to file to be created

Definition at line 93 of file FormatterStorage.cc.


The documentation for this class was generated from the following files: