23 #ifndef AFW_TABLE_Simple_h_INCLUDED 24 #define AFW_TABLE_Simple_h_INCLUDED 130 Schema r = getMinimalSchema().schema;
158 static Key<RecordId> getIdKey() {
return getMinimalSchema().id; }
198 struct MinimalSchema {
207 static MinimalSchema& getMinimalSchema();
232 #endif // !AFW_TABLE_Simple_h_INCLUDED Defines the fields and offsets for a table.
Point in an unspecified spherical coordinate system.
Writer object for FITS binary tables.
void setRa(Angle ra)
Convenience accessors for the keys in the minimal reference schema.
static Schema makeMinimalSchema()
Return a minimal schema for Simple tables and records.
RecordId getId() const
Convenience accessors for the keys in the minimal reference schema.
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SimpleTable schema.
A mapping between the keys of two Schemas, used to copy data between them.
SortedCatalogT< Record const > ConstCatalog
std::shared_ptr< SimpleRecord > copyRecord(BaseRecord const &other, SchemaMapper const &mapper)
Deep-copy a record, requiring that it have the same schema as this table.
static Key< RecordId > getIdKey()
Get keys for standard fields shared by all references.
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Angle getRa() const
Convenience accessors for the keys in the minimal reference schema.
std::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
void setIdFactory(std::shared_ptr< IdFactory > f)
Switch to a new IdFactory – object that generates IDs for the table (may be null).
SortedCatalogT< Record > Catalog
SpherePoint getCoord() const
Convenience accessors for the keys in the minimal reference schema.
Table class that must contain a unique ID field and a celestial coordinate field. ...
A class representing an angle.
A base class for image defects.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
std::shared_ptr< SimpleRecord > copyRecord(BaseRecord const &other)
Deep-copy a record, requiring that it have the same schema as this table.
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
static std::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
std::shared_ptr< IdFactory const > getIdFactory() const
Return the object that generates IDs for the table (may be null).
void setCoord(SpherePoint const &coord)
Convenience accessors for the keys in the minimal reference schema.
void setDec(Angle dec)
Convenience accessors for the keys in the minimal reference schema.
T static_pointer_cast(T... args)
ColumnViewT< SimpleRecord > ColumnView
ColumnViewT< SimpleRecord > ColumnView
SimpleRecord & operator=(const SimpleRecord &)=delete
Key< geom::Angle > getDec() const
Return a constituent Key.
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
std::shared_ptr< SimpleTable const > getTable() const
SortedCatalogT< SimpleRecord > Catalog
Base class for all records.
std::shared_ptr< SimpleTable > clone() const
Return a polymorphic deep copy of the table.
A class used as a handle to a particular field in a table.
std::shared_ptr< SimpleRecord > makeRecord()
Default-construct an associated record.
Record class that must contain a unique ID field and a celestial coordinate field.
void setId(RecordId id)
Convenience accessors for the keys in the minimal reference schema.
Angle getDec() const
Convenience accessors for the keys in the minimal reference schema.
Key< geom::Angle > getRa() const
Return a constituent Key.
static CoordKey getCoordKey()
Key for the celestial coordinates.
std::shared_ptr< IdFactory > getIdFactory()
Return the object that generates IDs for the table (may be null).
SortedCatalogT< SimpleRecord const > ConstCatalog
Base class for all tables.
SimpleRecord(const SimpleRecord &)=delete
A FunctorKey used to get or set celestial coordinates from a pair of Angle keys.
static std::shared_ptr< SimpleTable > make(Schema const &schema)
Construct a new table.