LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
A class used as a handle to a particular field in a table. More...
#include <fwd.h>
Public Member Functions | |
int | getOffset () const |
Return the offset (in bytes) of this field within a record. More... | |
bool | isValid () const |
Return true if the key was initialized to valid offset. More... | |
Key () | |
Default construct a field. More... | |
template<typename OtherT > | |
bool | operator== (Key< OtherT > const &other) const |
Equality comparison. More... | |
template<typename OtherT > | |
bool | operator!= (Key< OtherT > const &other) const |
Equality comparison. More... | |
bool | operator== (Key const &other) const |
Equality comparison. More... | |
bool | operator!= (Key const &other) const |
Equality comparison. More... | |
Public Member Functions inherited from lsst.afw.table::FieldBase< T > | |
int | getElementCount () const |
Return the number of subfield elements (always one for scalars). More... | |
FieldBase () | |
FieldBase (int) | |
Private Member Functions | |
Key (int offset, FieldBase< T > const &fb=FieldBase< T >()) | |
Private Attributes | |
int | _offset |
Friends | |
class | detail::Access |
class | BaseRecord |
std::ostream & | operator<< (std::ostream &os, Key< T > const &key) |
Stringification. More... | |
Additional Inherited Members | |
Public Types inherited from lsst.afw.table::FieldBase< T > | |
typedef T | Value |
the type returned by BaseRecord::get More... | |
typedef T & | Reference |
the type returned by BaseRecord::operator[] (non-const) More... | |
typedef T const & | ConstReference |
the type returned by BaseRecord::operator[] (const) More... | |
typedef T | Element |
the type of subfields (the same as the type itself for scalars) More... | |
Static Public Member Functions inherited from lsst.afw.table::FieldBase< T > | |
static std::string | getTypeString () |
Return a string description of the field type. More... | |
Static Public Attributes inherited from lsst.afw.table::KeyBase< T > | |
static bool const | HAS_NAMED_SUBFIELDS = false |
Protected Member Functions inherited from lsst.afw.table::FieldBase< T > | |
void | stream (std::ostream &os) const |
Defines how Fields are printed. More... | |
Reference | getReference (Element *p, ndarray::Manager::Ptr const &) const |
Used to implement RecordBase::operator[] (non-const). More... | |
ConstReference | getConstReference (Element const *p, ndarray::Manager::Ptr const &) const |
Used to implement RecordBase::operator[] (const). More... | |
Value | getValue (Element const *p, ndarray::Manager::Ptr const &) const |
Used to implement RecordBase::get. More... | |
void | setValue (Element *p, ndarray::Manager::Ptr const &, Value v) const |
Used to implement RecordBase::set. More... | |
Static Protected Member Functions inherited from lsst.afw.table::FieldBase< T > | |
static FieldBase | makeDefault () |
Needed to allow Keys to be default-constructed. More... | |
A class used as a handle to a particular field in a table.
All access to table data ultimately goes through Key objects, which know (via an internal offset) how to address and cast the internal data buffer of a record or table.
Keys can be obtained from a Schema by name:
and are also returned when a new field is added. Compound and array keys also provide accessors to retrieve scalar keys to their elements (see the documentation for the KeyBase specializations), even though these element keys do not correspond to a field that exists in any Schema. For example:
Key inherits from FieldBase to allow a key for a dynamically-sized field to know its size without needing to specialize Key itself or hold a full Field object.
|
inline |
Default construct a field.
The new field will be invalid until a valid Key is assigned to it.
Definition at line 90 of file Key.h.
|
inlineexplicitprivate |
|
inline |
|
inline |
|
inline |
Equality comparison.
Two keys with different types are never equal. Keys with the same type are equal if they point to the same location in a table, regardless of what Schema they were constructed from (for instance, if a field has a different name in one Schema than another, but is otherwise the same, the two keys will be equal).
|
inline |
Equality comparison.
Two keys with different types are never equal. Keys with the same type are equal if they point to the same location in a table, regardless of what Schema they were constructed from (for instance, if a field has a different name in one Schema than another, but is otherwise the same, the two keys will be equal).
Definition at line 69 of file Key.h.
|
inline |
Equality comparison.
Two keys with different types are never equal. Keys with the same type are equal if they point to the same location in a table, regardless of what Schema they were constructed from (for instance, if a field has a different name in one Schema than another, but is otherwise the same, the two keys will be equal).
|
inline |
Equality comparison.
Two keys with different types are never equal. Keys with the same type are equal if they point to the same location in a table, regardless of what Schema they were constructed from (for instance, if a field has a different name in one Schema than another, but is otherwise the same, the two keys will be equal).
Definition at line 66 of file Key.h.
|
friend |
|
friend |
|
friend |
|
private |