an abstract class for parsing serialized Policy data and loading it into a Policy object.
More...
#include <PolicyParser.h>
an abstract class for parsing serialized Policy data and loading it into a Policy object.
Definition at line 46 of file PolicyParser.h.
◆ PolicyParser()
lsst::pex::policy::PolicyParser::PolicyParser |
( |
Policy & |
policy, |
|
|
bool |
strict = true |
|
) |
| |
|
inline |
Create a Parser attached to a policy object to be loaded.
- Parameters
-
policy | the Policy object to load the parsed data 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. |
Definition at line 56 of file PolicyParser.h.
◆ ~PolicyParser()
lsst::pex::policy::PolicyParser::~PolicyParser |
( |
| ) |
|
|
virtual |
◆ getPolicy() [1/2]
Policy& lsst::pex::policy::PolicyParser::getPolicy |
( |
| ) |
|
|
inline |
◆ getPolicy() [2/2]
const Policy& lsst::pex::policy::PolicyParser::getPolicy |
( |
| ) |
const |
|
inline |
◆ isStrict()
bool lsst::pex::policy::PolicyParser::isStrict |
( |
| ) |
|
|
inline |
return true if this parser will be strict in adhering to syntax rules.
In this case, exceptions will be thrown if any syntax errors are detected. Otherwise, some syntax errors may be ignored.
Definition at line 68 of file PolicyParser.h.
◆ parse()
virtual int lsst::pex::policy::PolicyParser::parse |
( |
std::istream & |
is | ) |
|
|
pure virtual |
parse data from the input stream and load results into the attached Policy.
- Parameters
-
is | the stream to read encoded data from |
- Returns
- int the number of parameters values loaded. This does not include sub-Policy objects.
Implemented in lsst::pex::policy::paf::PAFParser.
◆ setStrict()
void lsst::pex::policy::PolicyParser::setStrict |
( |
bool |
strict | ) |
|
|
inline |
set whether this parser will be strict in adhering to syntax rules.
If set to true, exceptions will be thrown if any syntax errors are detected. Otherwise, some syntax errors may be ignored.
Definition at line 75 of file PolicyParser.h.
◆ _pol
Policy& lsst::pex::policy::PolicyParser::_pol |
|
protected |
◆ _strict
bool lsst::pex::policy::PolicyParser::_strict |
|
protected |
The documentation for this class was generated from the following files:
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/pex_policy/20.0.0/include/lsst/pex/policy/PolicyParser.h
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/pex_policy/20.0.0/src/PolicyParser.cc