lsst.afw  15.0-29-ga12a2b06e
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | 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< SimpleRecord > ColumnView
 
typedef SortedCatalogT< SimpleRecord > Catalog
 
typedef SortedCatalogT< SimpleRecord const > ConstCatalog
 
typedef unsigned long memId
 
typedef memId(* memNewCallback) (const memId cid)
 
typedef memId(* memCallback) (const Citizen *ptr)
 

Public Member Functions

std::shared_ptr< SimpleTable const > getTable () const
 
 SimpleRecord (const SimpleRecord &)=delete
 
SimpleRecord & operator= (const SimpleRecord &)=delete
 
 SimpleRecord (SimpleRecord &&)=delete
 
SimpleRecord & operator= (SimpleRecord &&)=delete
 
 ~SimpleRecord ()
 
Schema getSchema () const
 Return the Schema that holds this record's fields and keys. 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 Ref >
Ref operator[] (ReferenceFunctorKey< Ref > const &key)
 
template<typename ConstRef >
ConstRef operator[] (ConstReferenceFunctorKey< ConstRef > const &key) const
 
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 >
T get (OutputFunctorKey< T > const &key) const
 Compute a calculated or aggregate field. 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 , typename U >
void set (InputFunctorKey< T > const &key, U const &value)
 Set a calculated or aggregate field. More...
 
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
 
std::string repr () const
 
void markPersistent (void)
 
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...
 
SpherePoint getCoord () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setCoord (SpherePoint 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...
 

Static Public Member Functions

static bool hasBeenCorrupted ()
 
static memId getNextMemId ()
 
static int init ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static memId setNewCallbackId (memId id)
 
static memId setNewCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memNewCallback setNewCallback (memNewCallback func)
 
static memCallback setDeleteCallback (memCallback func)
 
static memCallback setCorruptionCallback (memCallback func)
 

Public Attributes

 magicSentinel
 

Protected Member Functions

 SimpleRecord (std::shared_ptr< SimpleTable > const &table)
 
virtual void _assign (BaseRecord const &other)
 Called by assign() after transferring fields to allow subclass data members to be copied. More...
 
virtual void _stream (std::ostream &os) const
 Called by operator<<. More...
 

Friends

class SimpleTable
 

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 48 of file Simple.h.

Member Typedef Documentation

◆ Catalog

Definition at line 52 of file Simple.h.

◆ ColumnView

Definition at line 51 of file Simple.h.

◆ ConstCatalog

Definition at line 53 of file Simple.h.

◆ Table

Definition at line 50 of file Simple.h.

Constructor & Destructor Documentation

◆ SimpleRecord() [1/3]

lsst::afw::table::SimpleRecord::SimpleRecord ( const SimpleRecord &  )
delete

◆ SimpleRecord() [2/3]

lsst::afw::table::SimpleRecord::SimpleRecord ( SimpleRecord &&  )
delete

◆ ~SimpleRecord()

lsst::afw::table::SimpleRecord::~SimpleRecord ( )
default

◆ SimpleRecord() [3/3]

lsst::afw::table::SimpleRecord::SimpleRecord ( std::shared_ptr< SimpleTable > const &  table)
explicitprotected

Definition at line 73 of file Simple.cc.

Member Function Documentation

◆ _assign()

virtual void lsst::afw::table::BaseRecord::_assign ( BaseRecord const &  other)
inlineprotectedvirtualinherited

Called by assign() after transferring fields to allow subclass data members to be copied.

Reimplemented in lsst::afw::table::SourceRecord, and lsst::afw::table::ExposureRecord.

Definition at line 183 of file BaseRecord.h.

◆ _stream()

void lsst::afw::table::BaseRecord::_stream ( std::ostream &  os) const
protectedvirtualinherited

Called by operator<<.

Overrides should call the base class implementation and append additional fields on new lines, with the syntax "%(name)s: %(value)s".

Definition at line 96 of file BaseRecord.cc.

◆ assign() [1/2]

void lsst::afw::table::BaseRecord::assign ( BaseRecord const &  other)
inherited

Copy all field values from other to this, requiring that they have equal schemas.

Definition at line 74 of file BaseRecord.cc.

◆ assign() [2/2]

void lsst::afw::table::BaseRecord::assign ( BaseRecord const &  other,
SchemaMapper const &  mapper 
)
inherited

Copy field values from other to this, using a mapper.

Definition at line 82 of file BaseRecord.cc.

◆ get() [1/2]

template<typename T >
Field<T>::Value lsst::afw::table::BaseRecord::get ( Key< T > const &  key) const
inlineinherited

Return the value of a field for the given key.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 125 of file BaseRecord.h.

◆ get() [2/2]

template<typename T >
T lsst::afw::table::BaseRecord::get ( OutputFunctorKey< T > const &  key) const
inlineinherited

Compute a calculated or aggregate field.

Definition at line 146 of file BaseRecord.h.

◆ getCoord()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 220 of file Simple.h.

◆ getDec()

Angle lsst::afw::table::SimpleRecord::getDec ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 226 of file Simple.h.

◆ getElement() [1/2]

template<typename T >
Field<T>::Element* lsst::afw::table::BaseRecord::getElement ( Key< T > const &  key)
inlineinherited

Return a pointer to the underlying elements of a field (non-const).

This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.

Definition at line 67 of file BaseRecord.h.

◆ getElement() [2/2]

template<typename T >
Field<T>::Element const* lsst::afw::table::BaseRecord::getElement ( Key< T > const &  key) const
inlineinherited

Return a pointer to the underlying elements of a field (const).

This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.

Definition at line 85 of file BaseRecord.h.

◆ getId()

RecordId lsst::afw::table::SimpleRecord::getId ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 217 of file Simple.h.

◆ getManager()

ndarray::Manager::Ptr lsst::afw::table::BaseRecord::getManager ( ) const
inlineinherited

Definition at line 174 of file BaseRecord.h.

◆ getRa()

Angle lsst::afw::table::SimpleRecord::getRa ( ) const
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 223 of file Simple.h.

◆ getSchema()

Schema lsst::afw::table::BaseRecord::getSchema ( ) const
inlineinherited

Return the Schema that holds this record's fields and keys.

Definition at line 54 of file BaseRecord.h.

◆ getTable()

std::shared_ptr<SimpleTable const> lsst::afw::table::SimpleRecord::getTable ( ) const
inline

Definition at line 55 of file Simple.h.

◆ operator=() [1/2]

SimpleRecord& lsst::afw::table::SimpleRecord::operator= ( const SimpleRecord &  )
delete

◆ operator=() [2/2]

SimpleRecord& lsst::afw::table::SimpleRecord::operator= ( SimpleRecord &&  )
delete

◆ operator[]() [1/4]

template<typename T >
Field<T>::Reference lsst::afw::table::BaseRecord::operator[] ( Key< T > const &  key)
inlineinherited

Return a reference (or reference-like type) to the field's value.

Some field types (Point, Moments, Flag, Covariance, and SpherePoint) do not support reference access.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 103 of file BaseRecord.h.

◆ operator[]() [2/4]

template<typename T >
Field<T>::ConstReference lsst::afw::table::BaseRecord::operator[] ( Key< T > const &  key) const
inlineinherited

Return a const reference (or const-reference-like type) to the field's value.

Some field types (Point, Moments, Flag, Covariance, and SpherePoint) do not support reference access.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 115 of file BaseRecord.h.

◆ operator[]() [3/4]

template<typename Ref >
Ref lsst::afw::table::BaseRecord::operator[] ( ReferenceFunctorKey< Ref > const &  key)
inlineinherited

Definition at line 159 of file BaseRecord.h.

◆ operator[]() [4/4]

template<typename ConstRef >
ConstRef lsst::afw::table::BaseRecord::operator[] ( ConstReferenceFunctorKey< ConstRef > const &  key) const
inlineinherited

Definition at line 164 of file BaseRecord.h.

◆ set() [1/2]

template<typename T , typename U >
void lsst::afw::table::BaseRecord::set ( Key< T > const &  key,
U const &  value 
)
inlineinherited

Set value of a field for the given key.

This method has an additional template parameter because some fields accept and convert different types to the stored field type.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 138 of file BaseRecord.h.

◆ set() [2/2]

template<typename T , typename U >
void lsst::afw::table::BaseRecord::set ( InputFunctorKey< T > const &  key,
U const &  value 
)
inlineinherited

Set a calculated or aggregate field.

Definition at line 154 of file BaseRecord.h.

◆ setCoord()

void lsst::afw::table::SimpleRecord::setCoord ( SpherePoint const &  coord)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 221 of file Simple.h.

◆ setDec()

void lsst::afw::table::SimpleRecord::setDec ( Angle  dec)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 227 of file Simple.h.

◆ setId()

void lsst::afw::table::SimpleRecord::setId ( RecordId  id)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 218 of file Simple.h.

◆ setRa()

void lsst::afw::table::SimpleRecord::setRa ( Angle  ra)
inline

Convenience accessors for the keys in the minimal reference schema.

Definition at line 224 of file Simple.h.

Friends And Related Function Documentation

◆ SimpleTable

friend class SimpleTable
friend

Definition at line 81 of file Simple.h.


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