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
|
Field base class specialization for strings. More...
#include <FieldBase.h>
Public Types | |
typedef std::string | Value |
the type returned by BaseRecord::get More... | |
typedef char * | Reference |
the type returned by BaseRecord::operator[] More... | |
typedef char const * | ConstReference |
the type returned by BaseRecord::operator[] (const) More... | |
typedef char | Element |
the type of subfields and array elements More... | |
Public Member Functions | |
FieldBase (int size=-1) | |
Construct a FieldBase with the given size. More... | |
int | getElementCount () const |
Return the number of subfield elements (equal to the size of the string, including a null terminator). More... | |
int | getSize () const |
Return the maximum length of the string, including a null terminator (equal to the number of subfield elements). More... | |
Static Public Member Functions | |
static std::string | getTypeString () |
Return a string description of the field type. More... | |
Protected Member Functions | |
void | stream (std::ostream &os) const |
Defines how Fields are printed. More... | |
Reference | getReference (Element *p, ndarray::Manager::Ptr const &m) const |
Used to implement RecordBase::operator[] (non-const). More... | |
ConstReference | getConstReference (Element const *p, ndarray::Manager::Ptr const &m) const |
Used to implement RecordBase::operator[] (const). More... | |
Value | getValue (Element const *p, ndarray::Manager::Ptr const &m) const |
Used to implement RecordBase::get. More... | |
void | setValue (Element *p, ndarray::Manager::Ptr const &, std::string const &value) const |
Used to implement RecordBase::set. More... | |
Static Protected Member Functions | |
static FieldBase | makeDefault () |
Needed to allow Keys to be default-constructed. More... | |
Private Attributes | |
int | _size |
Field base class specialization for strings.
Definition at line 230 of file FieldBase.h.
typedef char const* lsst::afw::table::FieldBase< std::string >::ConstReference |
the type returned by BaseRecord::operator[] (const)
Definition at line 238 of file FieldBase.h.
typedef char lsst::afw::table::FieldBase< std::string >::Element |
the type of subfields and array elements
Definition at line 240 of file FieldBase.h.
typedef char* lsst::afw::table::FieldBase< std::string >::Reference |
the type returned by BaseRecord::operator[]
Definition at line 235 of file FieldBase.h.
typedef std::string lsst::afw::table::FieldBase< std::string >::Value |
the type returned by BaseRecord::get
Definition at line 232 of file FieldBase.h.
lsst::afw::table::FieldBase< std::string >::FieldBase | ( | int | size = -1 | ) |
Construct a FieldBase with the given size.
This constructor is implicit and has an invalid default so it can be used in the Field constructor (as if it were an int argument) without specializing Field. In other words, it allows one to construct a 25-character string field like this:
...even though the third argument to the Field constructor takes a FieldBase, not an int.
|
inlineprotected |
Used to implement RecordBase::operator[] (const).
Definition at line 280 of file FieldBase.h.
|
inline |
Return the number of subfield elements (equal to the size of the string, including a null terminator).
Definition at line 260 of file FieldBase.h.
|
inlineprotected |
Used to implement RecordBase::operator[] (non-const).
Definition at line 275 of file FieldBase.h.
|
inline |
Return the maximum length of the string, including a null terminator (equal to the number of subfield elements).
Definition at line 264 of file FieldBase.h.
|
static |
Return a string description of the field type.
|
protected |
Used to implement RecordBase::get.
|
inlinestaticprotected |
Needed to allow Keys to be default-constructed.
Definition at line 269 of file FieldBase.h.
|
protected |
Used to implement RecordBase::set.
|
inlineprotected |
|
private |
Definition at line 291 of file FieldBase.h.