an abstract factory class for creating PolicyParser instances. This class is used by the PolicySource class to determine the format of a stream of serialized Policy data and then parse it into a Policy instance. It is intended that for supported each format there is an implementation of this class and a corresponding PolicyParser class.
More...
#include <PolicyParserFactory.h>
an abstract factory class for creating PolicyParser instances. This class is used by the PolicySource class to determine the format of a stream of serialized Policy data and then parse it into a Policy instance. It is intended that for supported each format there is an implementation of this class and a corresponding PolicyParser class.
Definition at line 58 of file PolicyParserFactory.h.
lsst::pex::policy::PolicyParserFactory::PolicyParserFactory |
( |
| ) |
|
|
inline |
lsst::pex::policy::PolicyParserFactory::~PolicyParserFactory |
( |
| ) |
|
|
virtual |
virtual PolicyParser* lsst::pex::policy::PolicyParserFactory::createParser |
( |
Policy & |
policy, |
|
|
bool |
strict = true |
|
) |
| const |
|
pure virtual |
create a new PolicyParser class and return a pointer to it. The caller is responsible for destroying the pointer.
- Parameters
-
policy | the Policy object that data should be loaded into. |
strict | if true, be strict in reporting errors in file contents and syntax. If false, errors will be ignored if possible; often, such errors will result in some data not getting loaded. The default is true. |
Implemented in lsst::pex::policy::paf::PAFParserFactory.
const std::string & lsst::pex::policy::PolicyParserFactory::getFormatName |
( |
| ) |
|
|
virtual |
virtual bool lsst::pex::policy::PolicyParserFactory::isRecognized |
( |
const std::string & |
leaders | ) |
const |
|
pure virtual |
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;
Implemented in lsst::pex::policy::paf::PAFParserFactory.
const std::string lsst::pex::policy::PolicyParserFactory::UNRECOGNIZED |
|
static |
The documentation for this class was generated from the following files: