LSST Applications 28.0.2,g0fba68d861+5b923b673a,g1fd858c14a+7a7b9dd5ed,g2c84ff76c0+5548bfee71,g30358e5240+f0e04ebe90,g35bb328faa+fcb1d3bbc8,g436fd98eb5+bdc6fcdd04,g4af146b050+742274f7cd,g4d2262a081+3efd3f8190,g4e0f332c67+cb09b8a5b6,g53246c7159+fcb1d3bbc8,g5a012ec0e7+477f9c599b,g5edb6fd927+826dfcb47f,g60b5630c4e+bdc6fcdd04,g67b6fd64d1+2218407a0c,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+f9ac2ab1bd,g8852436030+ebf28f0d95,g89139ef638+2218407a0c,g9125e01d80+fcb1d3bbc8,g989de1cb63+2218407a0c,g9f33ca652e+42fb53f4c8,g9f7030ddb1+11b9b6f027,ga2b97cdc51+bdc6fcdd04,gab72ac2889+bdc6fcdd04,gabe3b4be73+1e0a283bba,gabf8522325+3210f02652,gb1101e3267+9c79701da9,gb58c049af0+f03b321e39,gb89ab40317+2218407a0c,gcf25f946ba+ebf28f0d95,gd6cbbdb0b4+e8f9c9c900,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+a08f294619,ge278dab8ac+3ef3db156b,ge410e46f29+2218407a0c,gf67bdafdda+2218407a0c
LSST Data Management Base Package
|
An object passed to Persistable::write to allow it to persist itself. More...
#include <OutputArchive.h>
Public Member Functions | |
BaseCatalog | makeCatalog (Schema const &schema) |
Return a new, empty catalog with the given schema. | |
void | saveEmpty () |
Indicate that the object being persisted has no state, and hence will never call makeCatalog() or saveCatalog(). | |
void | saveCatalog (BaseCatalog const &catalog) |
Save a catalog in the archive. | |
~OutputArchiveHandle () | |
OutputArchiveHandle (const OutputArchiveHandle &)=delete | |
OutputArchiveHandle & | operator= (const OutputArchiveHandle &)=delete |
OutputArchiveHandle (OutputArchiveHandle &&)=delete | |
OutputArchiveHandle & | operator= (OutputArchiveHandle &&)=delete |
int | put (Persistable const *obj, bool permissive=false) |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive. | |
int | put (std::shared_ptr< Persistable const > obj, bool permissive=false) |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive. | |
int | put (Persistable const &obj, bool permissive=false) |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive. | |
Friends | |
class | OutputArchive::Impl |
An object passed to Persistable::write to allow it to persist itself.
OutputArchiveHandle provides an interface to add additional catalogs and save nested Persistables to the same archive.
Definition at line 118 of file OutputArchive.h.
|
default |
|
delete |
|
delete |
BaseCatalog lsst::afw::table::io::OutputArchiveHandle::makeCatalog | ( | Schema const & | schema | ) |
Return a new, empty catalog with the given schema.
All catalogs passed to saveCatalog should be originally created by makeCatalog, or at least share the same table.
Definition at line 228 of file OutputArchive.cc.
|
delete |
|
delete |
|
inline |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive.
If permissive is true and obj->isPersistable() is false, the object will not be saved but 0 will be returned instead of throwing an exception.
If the given pointer is null, the returned ID is always 0, which may be used to retrieve null pointers from an InputArchive.
It is expected that the shared_ptr
form will usually be used, as Persistables are typically held by shared_ptr
. We also provide a const reference overload for temporaries as well as a const raw pointer overload for temporaries that may be null.
If the shared_ptr form is used and the given pointer has already been saved, it will not be written again and the same ID will be returned as the first time it was saved.
Definition at line 146 of file OutputArchive.h.
int lsst::afw::table::io::OutputArchiveHandle::put | ( | Persistable const * | obj, |
bool | permissive = false ) |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive.
If permissive is true and obj->isPersistable() is false, the object will not be saved but 0 will be returned instead of throwing an exception.
If the given pointer is null, the returned ID is always 0, which may be used to retrieve null pointers from an InputArchive.
It is expected that the shared_ptr
form will usually be used, as Persistables are typically held by shared_ptr
. We also provide a const reference overload for temporaries as well as a const raw pointer overload for temporaries that may be null.
If the shared_ptr form is used and the given pointer has already been saved, it will not be written again and the same ID will be returned as the first time it was saved.
Definition at line 237 of file OutputArchive.cc.
int lsst::afw::table::io::OutputArchiveHandle::put | ( | std::shared_ptr< Persistable const > | obj, |
bool | permissive = false ) |
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive.
If permissive is true and obj->isPersistable() is false, the object will not be saved but 0 will be returned instead of throwing an exception.
If the given pointer is null, the returned ID is always 0, which may be used to retrieve null pointers from an InputArchive.
It is expected that the shared_ptr
form will usually be used, as Persistables are typically held by shared_ptr
. We also provide a const reference overload for temporaries as well as a const raw pointer overload for temporaries that may be null.
If the shared_ptr form is used and the given pointer has already been saved, it will not be written again and the same ID will be returned as the first time it was saved.
Definition at line 243 of file OutputArchive.cc.
void lsst::afw::table::io::OutputArchiveHandle::saveCatalog | ( | BaseCatalog const & | catalog | ) |
Save a catalog in the archive.
The catalog must have been created using makeCatalog, or be a shallow copy or subset of such a catalog.
Definition at line 232 of file OutputArchive.cc.
void lsst::afw::table::io::OutputArchiveHandle::saveEmpty | ( | ) |
Indicate that the object being persisted has no state, and hence will never call makeCatalog() or saveCatalog().
Definition at line 230 of file OutputArchive.cc.
|
friend |
Definition at line 160 of file OutputArchive.h.