2 #ifndef AFW_TABLE_BaseTable_h_INCLUDED
3 #define AFW_TABLE_BaseTable_h_INCLUDED
5 #include "boost/enable_shared_from_this.hpp"
13 namespace lsst {
namespace afw {
46 :
public boost::enable_shared_from_this<BaseTable>,
168 template <typename Derived>
170 return boost::static_pointer_cast<Derived>(shared_from_this());
174 template <
typename Derived>
176 return boost::static_pointer_cast<Derived
const>(shared_from_this());
235 #endif // !AFW_TABLE_BaseTable_h_INCLUDED
Defines the fields and offsets for a table.
Column-wise view into a sequence of records that have been allocated contiguously.
Writer object for FITS binary tables.
boost::shared_ptr< BaseRecord > makeRecord()
Default-construct an associated record.
A custom container class for records, based on std::vector.
Class for storing ordered metadata with comments.
A mapping between the keys of two Schemas, used to copy data between them.
boost::shared_ptr< daf::base::PropertyList > getMetadata() const
Return the flexible metadata associated with the table. May be null.
boost::shared_ptr< Derived > getSelf()
Convenience function for static-casting shared_from_this for use by derived classes.
Mapping class that holds aliases for a Schema.
void _initialize(BaseRecord &record)
Definition of Manager, which manages the ownership of array data.
virtual boost::shared_ptr< BaseTable > _clone() const =0
Clone implementation with noncovariant return types.
void _destroy(BaseRecord &record)
BaseRecord Record
The associated record class.
virtual boost::shared_ptr< BaseRecord > _makeRecord()=0
Default-construct an associated record (protected implementation).
CatalogT< Record const > ConstCatalog
Template of CatalogT used to hold const records of the associated type.
static boost::shared_ptr< BaseTable > make(Schema const &schema)
Construct a new 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.
boost::shared_ptr< BaseTable > clone() const
Return a polymorphic deep copy of the table.
virtual boost::shared_ptr< io::FitsWriter > makeFitsWriter(fits::Fits *fitsfile, int flags) const
BaseColumnView ColumnView
The associated ColumnView class.
static int nRecordsPerBlock
Number of records in each memory block.
void setMetadata(boost::shared_ptr< daf::base::PropertyList > const &metadata)
Set the flexible metadata associated with the table. May be null.
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
boost::shared_ptr< daf::base::PropertyList > popMetadata()
Return the metadata and set the internal metadata to a null pointer.
virtual void handleAliasChange(std::string const &alias)
std::size_t getBufferSize() const
Return the number of additional records space has been already been allocated for.
boost::shared_ptr< daf::base::PropertyList > _metadata
ndarray::Manager::Ptr _manager
Base class for all records.
Schema getSchema() const
Return the table's schema.
Citizen(const std::type_info &)
void operator=(BaseTable const &other)
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
Base class for all tables.