23 #ifndef AFW_TABLE_Simple_h_INCLUDED 24 #define AFW_TABLE_Simple_h_INCLUDED 55 std::shared_ptr<SimpleTable const>
getTable()
const {
78 explicit SimpleRecord(std::shared_ptr<SimpleTable>
const& table);
103 static std::shared_ptr<SimpleTable> make(
Schema const&
schema,
104 std::shared_ptr<IdFactory>
const&
idFactory);
125 Schema r = getMinimalSchema().schema;
142 std::shared_ptr<IdFactory const>
getIdFactory()
const {
return _idFactory; }
153 static Key<RecordId> getIdKey() {
return getMinimalSchema().id; }
160 std::shared_ptr<SimpleTable>
clone()
const {
return std::static_pointer_cast<
SimpleTable>(_clone()); }
164 return std::static_pointer_cast<
SimpleRecord>(_makeRecord());
182 std::shared_ptr<BaseTable> _clone()
const override;
184 std::shared_ptr<BaseRecord> _makeRecord()
override;
188 struct MinimalSchema {
197 static MinimalSchema& getMinimalSchema();
202 std::shared_ptr<io::FitsWriter> makeFitsWriter(
fits::Fits* fitsfile,
int flags)
const override;
204 std::shared_ptr<IdFactory> _idFactory;
223 #endif // !AFW_TABLE_Simple_h_INCLUDED std::int64_t RecordId
Type used for unique IDs for records.
Defines the fields and offsets for a table.
IcrsCoord getCoord() const
Convenience accessors for the keys in the minimal reference schema.
Writer object for FITS binary tables.
virtual void set(BaseRecord &record, coord::IcrsCoord const &value) const
Set an IcrsCoord in the given record.
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.
afw::table::Schema 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
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 setDec(Angle dec)
Convenience accessors for the keys in the minimal reference schema.
ColumnViewT< SimpleRecord > ColumnView
ColumnViewT< SimpleRecord > ColumnView
Key< geom::Angle > getDec() const
Return a constituent Key.
SimpleRecord(std::shared_ptr< SimpleTable > const &table)
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.
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.
This is the base class for spherical coordinates.
Key< geom::Angle > getRa() const
Return a constituent Key.
void setCoord(IcrsCoord const &coord)
Convenience accessors for the keys in the minimal reference schema.
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).
A class to handle Icrs coordinates (inherits from Coord)
SortedCatalogT< SimpleRecord const > ConstCatalog
Base class for all tables.
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.