LSSTApplications
11.0-22-g33de520,13.0+153,14.0+52,14.0+57,14.0-1-g013352c+36,14.0-1-g13ef843+9,14.0-1-g4b114ac+14,14.0-1-g7257b6a+12,14.0-1-g8b7e855+51,14.0-13-g7a60b79+2,14.0-14-g87d16e8+10,14.0-14-gbf7a6f8a,14.0-17-g4f4ea82+5,14.0-2-g319577b+11,14.0-2-ga5af9b6+10,14.0-22-gc48c03f+3,14.0-3-g20413be+3,14.0-46-g76222d5f+3,14.0-47-g0a51fac97,14.0-5-g744ff5f+2,14.0-5-g86eb1bd+31,14.0-6-gd5b81a9+6,14.0-6-ge2c9487+42,14.0-8-g7f6dd6b+6,14.0-8-gb81b6e9+4,14.0-9-g11010eb,14.0-9-g330837b+5
LSSTDataManagementBasePackage
|
Class implementing persistence and retrieval for Wcs objects. More...
#include <WcsFormatter.h>
Public Types | |
typedef std::shared_ptr< Formatter > | Ptr |
typedef Ptr(* | FactoryPtr) (lsst::pex::policy::Policy::Ptr) |
Pointer to a (static) factory function for a Formatter subclass. More... | |
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) |
Static Public Member Functions | |
static std::shared_ptr< lsst::daf::base::PropertyList > | generatePropertySet (lsst::afw::image::Wcs const &wcs) |
static std::shared_ptr< lsst::daf::persistence::Formatter > | createInstance (std::shared_ptr< lsst::pex::policy::Policy > policy) |
template<class Archive > | |
static void | delegateSerialize (Archive &ar, int const version, lsst::daf::base::Persistable *persistable) |
static Formatter::Ptr | lookupFormatter (std::string const &persistableType, lsst::pex::policy::Policy::Ptr policy) |
Lookup Formatter subclass by name of Persistable subclass. More... | |
static Formatter::Ptr | lookupFormatter (std::type_info const &persistableType, lsst::pex::policy::Policy::Ptr policy) |
Lookup Formatter subclass by its type_info from typeid(). More... | |
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... | |
Census | |
Provide a list of current Citizens | |
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... | |
callbackIDs | |
Set callback Ids. The old Id is returned | |
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... | |
callbacks | |
Set the New/Delete callback functions; in each case the previously installed callback is returned. These callback functions return a value which is Added to the previously registered id. The default callback functions are called default{New,Delete}Callback; you may want to set a break point in these callbacks from your favourite debugger | |
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... | |
Private Member Functions | |
WcsFormatter (std::shared_ptr< lsst::pex::policy::Policy > policy) | |
Static Private Attributes | |
static lsst::daf::persistence::FormatterRegistration | registration |
Class implementing persistence and retrieval for Wcs objects.
Definition at line 45 of file WcsFormatter.h.
|
inherited |
Pointer to a (static) factory function for a Formatter subclass.
Definition at line 85 of file Formatter.h.
|
inherited |
|
inherited |
Definition at line 81 of file Formatter.h.
|
virtualdefault |
|
default |
|
default |
|
explicitprivate |
Definition at line 71 of file WcsFormatter.cc.
|
staticinherited |
How many active Citizens are there?
startingMemId | Don't print Citizens with lower IDs |
Definition at line 267 of file Citizen.cc.
|
staticinherited |
Print a list of all active Citizens to stream, sorted by ID.
stream | stream to print to |
startingMemId | Don't print Citizens with lower IDs |
Definition at line 290 of file Citizen.cc.
|
staticinherited |
Return a (newly allocated) std::vector of active Citizens sorted by ID.
You are responsible for deleting it; or you can say std::unique_ptr<std::vector<Citizen const*> const> leaks(Citizen::census()); and not bother (that becomes std::unique_ptr in C++11)
Definition at line 322 of file Citizen.cc.
|
static |
Definition at line 232 of file WcsFormatter.cc.
|
static |
Definition at line 171 of file WcsFormatter.cc.
|
static |
Definition at line 128 of file WcsFormatter.cc.
|
inherited |
|
staticinherited |
Return the memId of the next object to be allocated.
Definition at line 229 of file Citizen.cc.
|
staticinherited |
Check all allocated blocks for corruption.
Definition at line 353 of file Citizen.cc.
|
staticinherited |
Called once when the memory system is being initialised.
Definition at line 214 of file Citizen.cc.
|
staticinherited |
Lookup Formatter subclass by name of Persistable subclass.
[in] | name | Name of Persistable subclass |
[in] | policy | Policy for configuring the Formatter |
Returned pointer is not owned and should not be deleted.
Definition at line 84 of file Formatter.cc.
|
staticinherited |
Lookup Formatter subclass by its type_info from typeid().
[in] | type | std::type_info of Formatter subclass from typeid() |
[in] | policy | Policy for configuring the Formatter |
Definition at line 94 of file Formatter.cc.
|
inherited |
Mark a Citizen as persistent and not destroyed until process end.
Definition at line 254 of file Citizen.cc.
|
default |
|
default |
|
virtual |
Definition at line 99 of file WcsFormatter.cc.
|
pure virtualinherited |
Read a Persistable instance from a FormatterStorage instance.
[in] | storage | Pointer to the FormatterStorage instance. |
[in] | additionalData | Additional data used to find the proper instance within the FormatterStorage. |
|
inherited |
Return a string representation of a Citizen.
Definition at line 245 of file Citizen.cc.
|
staticinherited |
Set the CorruptionCallback function.
func | function be called when block is found to be corrupted |
Definition at line 432 of file Citizen.cc.
|
staticinherited |
Set the DeleteCallback function.
func | function be called when desired block is deleted |
Definition at line 422 of file Citizen.cc.
|
staticinherited |
Call the current DeleteCallback when block is deleted.
id | Desired ID |
Definition at line 387 of file Citizen.cc.
|
staticinherited |
Set the NewCallback function.
func | The new function to be called when a designated block is allocated |
Definition at line 412 of file Citizen.cc.
|
staticinherited |
Call the NewCallback when block is allocated.
id | Desired ID |
Definition at line 376 of file Citizen.cc.
|
virtual |
Definition at line 123 of file WcsFormatter.cc.
|
pure virtualinherited |
Update an existing Persistable instance with information from an additional FormatterStorage instance.
[in,out] | persistable | Pointer to the Persistable instance. |
[in] | storage | Shared pointer to the additional FormatterStorage instance. |
[in] | additionalData | Additional data used to find the proper instance within the FormatterStorage. |
|
virtual |
Definition at line 80 of file WcsFormatter.cc.
|
pure virtualinherited |
Write a Persistable instance to a FormatterStorage instance.
[in] | persistable | Pointer to the Persistable instance. |
[in] | storage | Shared pointer to the FormatterStorage instance. |
[in] | additionalData | Additional data used to find the proper place to put the instance into the FormatterStorage. |
|
staticprivate |
Definition at line 74 of file WcsFormatter.h.