LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Protected Member Functions | List of all members
lsst::afw::table::SimpleRecord Class Reference

Record class that must contain a unique ID field and a celestial coordinate field. More...

#include <Simple.h>

Inheritance diagram for lsst::afw::table::SimpleRecord:
lsst::afw::table::BaseRecord lsst::daf::base::Citizen lsst::afw::table::SourceRecord

Public Types

typedef SimpleTable Table
 
typedef ColumnViewT< SimpleRecordColumnView
 
typedef SortedCatalogT
< SimpleRecord
Catalog
 
typedef SortedCatalogT
< SimpleRecord const > 
ConstCatalog
 
- Public Types inherited from lsst::afw::table::BaseRecord
typedef BaseTable Table
 The associated table class. More...
 
typedef BaseColumnView ColumnView
 The associated ColumnView class. More...
 
typedef CatalogT< BaseRecordCatalog
 Template of CatalogT used to hold records of this type. More...
 
typedef CatalogT< BaseRecord
const > 
ConstCatalog
 Template of CatalogT used to hold const records of this type. More...
 
- Public Types inherited from lsst::daf::base::Citizen
enum  { magicSentinel = 0xdeadbeef }
 
typedef unsigned long memId
 Type of the block's ID. More...
 
typedef memId(* memNewCallback )(const memId cid)
 A function used to register a callback. More...
 
typedef memId(* memCallback )(const Citizen *ptr)
 

Public Member Functions

boost::shared_ptr< SimpleTable
const > 
getTable () const
 
RecordId getId () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setId (RecordId id)
 Convenience accessors for the keys in the minimal reference schema. More...
 
IcrsCoord getCoord () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setCoord (IcrsCoord const &coord)
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setCoord (Coord const &coord)
 Convenience accessors for the keys in the minimal reference schema. More...
 
Angle getRa () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setRa (Angle ra)
 Convenience accessors for the keys in the minimal reference schema. More...
 
Angle getDec () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setDec (Angle dec)
 Convenience accessors for the keys in the minimal reference schema. More...
 
- Public Member Functions inherited from lsst::afw::table::BaseRecord
Schema getSchema () const
 Return the Schema that holds this record's fields and keys. More...
 
boost::shared_ptr< BaseTable
const > 
getTable () const
 Return the table this record is associated with. More...
 
template<typename T >
Field< T >::Element * getElement (Key< T > const &key)
 Return a pointer to the underlying elements of a field (non-const). More...
 
template<typename T >
Field< T >::Element const * getElement (Key< T > const &key) const
 Return a pointer to the underlying elements of a field (const). More...
 
template<typename T >
Field< T >::Reference operator[] (Key< T > const &key)
 Return a reference (or reference-like type) to the field's value. More...
 
template<typename T >
Field< T >::ConstReference operator[] (Key< T > const &key) const
 Return a const reference (or const-reference-like type) to the field's value. More...
 
template<typename T >
Field< T >::Value get (Key< T > const &key) const
 Return the value of a field for the given key. More...
 
template<typename T , typename U >
void set (Key< T > const &key, U const &value)
 Set value of a field for the given key. More...
 
template<typename T >
get (OutputFunctorKey< T > const &key) const
 Compute a calculated or aggregate field. More...
 
template<typename T , typename U >
void set (InputFunctorKey< T > const &key, U const &value)
 Set a calculated or aggregate field. More...
 
template<typename Ref >
Ref operator[] (ReferenceFunctorKey< Ref > const &key)
 
template<typename ConstRef >
ConstRef operator[] (ConstReferenceFunctorKey< ConstRef > const &key) const
 
void assign (BaseRecord const &other)
 Copy all field values from other to this, requiring that they have equal schemas. More...
 
void assign (BaseRecord const &other, SchemaMapper const &mapper)
 Copy field values from other to this, using a mapper. More...
 
ndarray::Manager::Ptr getManager () const
 
virtual ~BaseRecord ()
 
- Public Member Functions inherited from lsst::daf::base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (Citizen const &)
 
std::string repr () const
 Return a string representation of a Citizen. More...
 
void markPersistent (void)
 Mark a Citizen as persistent and not destroyed until process end. More...
 
memId getId () const
 Return the Citizen's ID. More...
 

Protected Member Functions

 SimpleRecord (boost::shared_ptr< SimpleTable > const &table)
 
- Protected Member Functions inherited from lsst::afw::table::BaseRecord
virtual void _assign (BaseRecord const &other)
 Called by assign() after transferring fields to allow subclass data members to be copied. More...
 
 BaseRecord (boost::shared_ptr< BaseTable > const &table)
 Construct a record with uninitialized data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lsst::daf::base::Citizen
static bool hasBeenCorrupted ()
 Check all allocated blocks for corruption. More...
 
static memId getNextMemId ()
 Return the memId of the next object to be allocated. More...
 
static int init ()
 Called once when the memory system is being initialised. More...
 
static int census (int, memId startingMemId=0)
 How many active Citizens are there? More...
 
static void census (std::ostream &stream, memId startingMemId=0)
 Print a list of all active Citizens to stream, sorted by ID. More...
 
static const std::vector
< const Citizen * > * 
census ()
 Return a (newly allocated) std::vector of active Citizens sorted by ID. More...
 
static memId setNewCallbackId (memId id)
 Call the NewCallback when block is allocated. More...
 
static memId setDeleteCallbackId (memId id)
 Call the current DeleteCallback when block is deleted. More...
 
static memNewCallback setNewCallback (memNewCallback func)
 Set the NewCallback function. More...
 
static memCallback setDeleteCallback (memCallback func)
 Set the DeleteCallback function. More...
 
static memCallback setCorruptionCallback (memCallback func)
 Set the CorruptionCallback function. More...
 

Detailed Description

Record class that must contain a unique ID field and a celestial coordinate field.

SimpleTable / SimpleRecord are intended to be the base class for records representing astronomical objects. In additional to the minimal schema and the convenience accessors it allows, a SimpleTable may hold an IdFactory object that is used to assign unique IDs to new records.

Definition at line 46 of file Simple.h.

Member Typedef Documentation

Definition at line 51 of file Simple.h.

Definition at line 50 of file Simple.h.

Definition at line 52 of file Simple.h.

Definition at line 49 of file Simple.h.

Constructor & Destructor Documentation

lsst::afw::table::SimpleRecord::SimpleRecord ( boost::shared_ptr< SimpleTable > const &  table)
protected

Member Function Documentation

IcrsCoord lsst::afw::table::SimpleRecord::getCoord ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 207 of file Simple.h.

207 { return get(SimpleTable::getCoordKey()); }
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
Angle lsst::afw::table::SimpleRecord::getDec ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 214 of file Simple.h.

214 { return get(SimpleTable::getCoordKey().getDec()); }
Key< geom::Angle > getDec() const
Return a constituent Key.
Definition: aggregates.h:171
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
RecordId lsst::afw::table::SimpleRecord::getId ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 204 of file Simple.h.

204 { return get(SimpleTable::getIdKey()); }
static Key< RecordId > getIdKey()
Key for the unique ID.
Definition: Simple.h:153
Angle lsst::afw::table::SimpleRecord::getRa ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 211 of file Simple.h.

211 { return get(SimpleTable::getCoordKey().getRa()); }
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
Key< geom::Angle > getRa() const
Return a constituent Key.
Definition: aggregates.h:170
boost::shared_ptr< SimpleTable const> lsst::afw::table::SimpleRecord::getTable ( ) const
inline

Definition at line 54 of file Simple.h.

54  {
55  return boost::static_pointer_cast<SimpleTable const>(BaseRecord::getTable());
56  }
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:51
void lsst::afw::table::SimpleRecord::setCoord ( IcrsCoord const &  coord)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 208 of file Simple.h.

208 { set(SimpleTable::getCoordKey(), coord); }
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
void lsst::afw::table::SimpleRecord::setCoord ( Coord const &  coord)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 209 of file Simple.h.

209 { SimpleTable::getCoordKey().set(*this, coord); }
virtual void set(BaseRecord &record, coord::IcrsCoord const &value) const
Set an IcrsCoord in the given record.
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
void lsst::afw::table::SimpleRecord::setDec ( Angle  dec)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 215 of file Simple.h.

215 { set(SimpleTable::getCoordKey().getDec(), dec); }
Angle getDec() const
Convenience accessors for the keys in the minimal reference schema.
Definition: Simple.h:214
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155
void lsst::afw::table::SimpleRecord::setId ( RecordId  id)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 205 of file Simple.h.

205 { set(SimpleTable::getIdKey(), id); }
static Key< RecordId > getIdKey()
Key for the unique ID.
Definition: Simple.h:153
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
void lsst::afw::table::SimpleRecord::setRa ( Angle  ra)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 212 of file Simple.h.

212 { set(SimpleTable::getCoordKey().getRa(), ra); }
Angle getRa() const
Convenience accessors for the keys in the minimal reference schema.
Definition: Simple.h:211
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:155

The documentation for this class was generated from the following file: