2 #ifndef AFW_TABLE_IO_OutputArchive_h_INCLUDED
3 #define AFW_TABLE_IO_OutputArchive_h_INCLUDED
14 template <
typename RecordT>
21 class OutputArchiveHandle;
74 int put(std::shared_ptr<Persistable const> obj,
bool permissive =
false) {
75 return put(obj.get(), permissive);
103 std::shared_ptr<Impl> _impl;
137 int put(std::shared_ptr<Persistable const> obj,
bool permissive =
false) {
138 return put(obj.get(), permissive);
156 std::shared_ptr<OutputArchive::Impl> impl);
162 std::shared_ptr<OutputArchive::Impl> _impl;
169 #endif // !AFW_TABLE_IO_OutputArchive_h_INCLUDED
Defines the fields and offsets for a table.
int put(Persistable const *obj, bool permissive=false)
Save a nested Persistable to the same archive.
std::string const & _name
OutputArchive()
Construct an empty OutputArchive containing no objects.
OutputArchiveHandle(const OutputArchiveHandle &)=delete
CatalogT< BaseRecord > BaseCatalog
An object passed to Persistable::write to allow it to persist itself.
A custom container class for records, based on std::vector.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
A base class for objects that can be persisted via afw::table::io Archive classes.
A multi-catalog archive object used to save table::io::Persistable objects.
void writeFits(fits::Fits &fitsfile) const
Write the archive to an already-open FITS object.
table::Key< std::string > name
friend class OutputArchive::Impl
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
OutputArchiveHandle & operator=(const OutputArchiveHandle &)=delete
int countCatalogs() const
Return the total number of catalogs, including the index.
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 InputArc...
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 InputArc...
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
BaseCatalog const & getCatalog(int n) const
Return the nth catalog. Catalog 0 is always the index catalog.
BaseCatalog const & getIndexCatalog() const
Return the index catalog that specifies where objects are stored in the data catalogs.
afw::table::Schema schema
OutputArchive & operator=(OutputArchive const &other)
Assign from another OutputArchive. Saved objects are not deep-copied.
int put(std::shared_ptr< Persistable const > obj, bool permissive=false)
Save a nested Persistable to the same archive.