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