|
LSSTApplications
1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
|
an class for printing the values associated with a name in a PropertySet. More...
#include <PropertyPrinter.h>
Public Types | |
| typedef PrinterList::iterator | iterator |
Public Member Functions | |
| PropertyPrinter (const lsst::daf::base::PropertySet &prop, const std::string &name, const PrinterFactory &fact=defaultPrinterFactory) | |
| iterator | begin () |
| iterator | last () |
| size_t | valueCount () |
Static Public Attributes | |
| static PrinterFactory | defaultPrinterFactory |
Private Attributes | |
| boost::shared_ptr< PrinterList > | _list |
an class for printing the values associated with a name in a PropertySet.
This class is vital if one needs to print out all the values in a PropertySet without knowing the data types associated with the names. In particular, it gives one the ability to write each value associated with a name individually and it any order. A typical use looks like this:
A PropertyPrinter is constructed for a particular name found in the PropertySet. (If a property with that name doesn't exist, a pex::exceptions::NotFoundError is thrown.) The PropertyPrinter is wrapped around the array of values associated with the name. One can get an Iterator for the values and send each one to a stream.
A PropertyPrinter can only print out property types that it has been configured for via the PrinterFactory instance that is passed in during construction. If one is not provided, a default is set which supports the following types:
* short char float * int signed char double * long unsigned char bool * long long string DateTime *
Other types can be supported by passing the name of factory function that can create a printer instance to a PrinterFactory that will eventually be used with a PropertyPrinter (see PrinterFactory for details.
Definition at line 451 of file PropertyPrinter.h.
the iterator type used for iterating through values.
Definition at line 457 of file PropertyPrinter.h.
| lsst.pex::logging::PropertyPrinter::PropertyPrinter | ( | const lsst::daf::base::PropertySet & | prop, |
| const std::string & | name, | ||
| const PrinterFactory & | fact = defaultPrinterFactory |
||
| ) |
create the PropertyPrinter for a given name
| iterator lsst.pex::logging::PropertyPrinter::begin | ( | ) |
return an iterator set at the start of the list of values
| iterator lsst.pex::logging::PropertyPrinter::last | ( | ) |
return an iterator set at the last of the list of values
|
inline |
return the number of values associated with the property
Definition at line 485 of file PropertyPrinter.h.
|
private |
Definition at line 489 of file PropertyPrinter.h.
|
static |
the default look-up table for creating iterators for different types. Users are allowsd add new printers. See PropertyFactory for more details.
Definition at line 464 of file PropertyPrinter.h.
1.8.5