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 | Public Attributes | List of all members
lsst::pex::logging::RecordProperty< T > Class Template Reference

a container for a named data property for a LogRecord More...

#include <LogRecord.h>

Inheritance diagram for lsst::pex::logging::RecordProperty< T >:
lsst::pex::logging::Prop< T >

Public Types

typedef T ValueType
 

Public Member Functions

 RecordProperty (const std::string &pname, const T &pvalue)
 
void addTo (lsst::daf::base::PropertySet &set)
 

Public Attributes

const std::string name
 
const T & value
 

Detailed Description

template<class T>
class lsst::pex::logging::RecordProperty< T >

a container for a named data property for a LogRecord

This light-weight container is meant to facilitate adding an arbitrary named data item to a LogRecord. The value will be stored as a reference to original item passed in; thus, this should be used only in the same scope as the arguments.

This class is usually accessed by applications via RecData, a typedef defined in Log.h.

Definition at line 62 of file LogRecord.h.

Member Typedef Documentation

template<class T>
typedef T lsst::pex::logging::RecordProperty< T >::ValueType

Definition at line 64 of file LogRecord.h.

Constructor & Destructor Documentation

template<class T>
lsst::pex::logging::RecordProperty< T >::RecordProperty ( const std::string &  pname,
const T &  pvalue 
)
inline

wrap a name and value. The value will be stored as a reference to original item passed in; thus, this should be used only in the same scope as the arguments

Definition at line 71 of file LogRecord.h.

72  : name(pname), value(pvalue) { }

Member Function Documentation

template<class T>
void lsst::pex::logging::RecordProperty< T >::addTo ( lsst::daf::base::PropertySet set)
inline

add the name-value pair to a PropertySet

Definition at line 77 of file LogRecord.h.

77 { set.add(this->name, this->value); }
void add(std::string const &name, T const &value)
Definition: PropertySet.cc:619

Member Data Documentation

template<class T>
const std::string lsst::pex::logging::RecordProperty< T >::name

Definition at line 79 of file LogRecord.h.

template<class T>
const T& lsst::pex::logging::RecordProperty< T >::value

Definition at line 80 of file LogRecord.h.


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