2 #ifndef AFW_TABLE_BaseTable_h_INCLUDED
3 #define AFW_TABLE_BaseTable_h_INCLUDED
7 #include "ndarray/Manager.h"
198 template <
typename RecordT,
typename ...Args>
214 if (_metadata) _metadata = std::static_pointer_cast<daf::base::PropertyList>(_metadata->deepCopy());
244 ndarray::Manager::Ptr _manager;
ItemVariant const * other
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Mapping class that holds aliases for a Schema.
Column-wise view into a sequence of records that have been allocated contiguously.
Base class for all records.
Base class for all tables.
CatalogT< Record const > ConstCatalog
Template of CatalogT used to hold const records of the associated type.
void setMetadata(std::shared_ptr< daf::base::PropertyList > const &metadata)
Set the flexible metadata associated with the table. May be null.
std::shared_ptr< BaseRecord > makeRecord()
Default-construct an associated record.
virtual std::shared_ptr< BaseRecord > _makeRecord()
Default-construct an associated record (protected implementation).
virtual std::shared_ptr< io::FitsWriter > makeFitsWriter(fits::Fits *fitsfile, int flags) const
Schema getSchema() const
Return the table's schema.
std::shared_ptr< BaseTable > clone() const
Return a polymorphic deep copy of the table.
CatalogT< Record > Catalog
Template of CatalogT used to hold records of the associated type.
void preallocate(std::size_t nRecords)
Allocate contiguous space for new records in advance.
std::shared_ptr< RecordT > constructRecord(Args &&...args)
Helper function that must be used by all _makeRecord overrides to actually construct records.
std::shared_ptr< daf::base::PropertyList > popMetadata()
Return the metadata and set the internal metadata to a null pointer.
std::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
std::shared_ptr< daf::base::PropertyList > getMetadata() const
Return the flexible metadata associated with the table. May be null.
BaseTable & operator=(BaseTable &&other)=delete
BaseTable(BaseTable const &other)
Copy construct.
BaseTable(Schema const &schema)
Construct from a schema.
std::size_t getBufferSize() const
Return the number of additional records space has been already been allocated for.
BaseColumnView ColumnView
The associated ColumnView class.
BaseTable(BaseTable &&other)
BaseRecord Record
The associated record class.
static int nRecordsPerBlock
Number of records in each memory block.
static std::shared_ptr< BaseTable > make(Schema const &schema)
Construct a new table.
virtual void handleAliasChange(std::string const &alias)
BaseTable & operator=(BaseTable const &other)=delete
virtual std::shared_ptr< BaseTable > _clone() const
Clone implementation with noncovariant return types.
A custom container class for records, based on std::vector.
Defines the fields and offsets for a table.
A mapping between the keys of two Schemas, used to copy data between them.
Writer object for FITS binary tables.
A base class for image defects.
Helper struct that contains the information passed from BaseTable to BaseRecord at construction.
ndarray::Manager::Ptr manager
std::shared_ptr< BaseTable > table