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
|
a list of supported Policy formats. It can be used to determine the format type for a Policy data stream. More...
#include <SupportedFormats.h>
Public Types | |
typedef boost::shared_ptr < SupportedFormats > | Ptr |
Public Member Functions | |
SupportedFormats () | |
void | registerFormat (const PolicyParserFactory::Ptr &factory) |
const std::string & | recognizeType (const std::string &leaders) const |
bool | supports (const std::string &name) const |
PolicyParserFactory::Ptr | getFactory (const std::string &name) const |
int | size () |
Static Public Member Functions | |
static void | initDefaultFormats (SupportedFormats &sf) |
Private Types | |
typedef std::map< std::string, PolicyParserFactory::Ptr > | Lookup |
Private Attributes | |
Lookup | _formats |
a list of supported Policy formats. It can be used to determine the format type for a Policy data stream.
Definition at line 52 of file SupportedFormats.h.
|
private |
Definition at line 99 of file SupportedFormats.h.
typedef boost::shared_ptr<SupportedFormats> lsst::pex::policy::SupportedFormats::Ptr |
Definition at line 55 of file SupportedFormats.h.
|
inline |
Definition at line 59 of file SupportedFormats.h.
PolicyParserFactory::Ptr lsst::pex::policy::SupportedFormats::getFactory | ( | const std::string & | name | ) | const |
get a pointer to a factory with a given name. A null pointer is returned if the name is not recognized.
Definition at line 80 of file SupportedFormats.cc.
|
static |
initialize a given SupportFormats instance with the formats known by default.
Definition at line 40 of file SupportedFormats.cc.
const std::string & lsst::pex::policy::SupportedFormats::recognizeType | ( | const std::string & | leaders | ) | const |
analyze the given string assuming contains the leading characters from the data stream and return true if it is recognized as being in the format supported by this parser. If it is, return the name of the this format;
analyze the given string assuming contains the leading characters from the data stream and determine if it is recognized as being in the format supported by this parser. If it is, return the name of the this format; if not return an empty string.
Definition at line 64 of file SupportedFormats.cc.
void lsst::pex::policy::SupportedFormats::registerFormat | ( | const PolicyParserFactory::Ptr & | factory | ) |
register a factory method for policy format parsers
Definition at line 47 of file SupportedFormats.cc.
|
inline |
|
inline |
return true if the name resolves to a registered format
Definition at line 77 of file SupportedFormats.h.
|
private |
Definition at line 100 of file SupportedFormats.h.