LSSTApplications  19.0.0-14-gb0260a2+492360823e,20.0.0+1c463ce1c5,20.0.0+332b39b81b,20.0.0+34a42eae2c,20.0.0+41b643067b,20.0.0+6e3b0e79d6,20.0.0+8558dd3f48,20.0.0+90990fb0e1,20.0.0+b0de6306d8,20.0.0+b290a576ab,20.0.0+b2ea66fa67,20.0.0+c2e041a55f,20.0.0+dcf29472a8,20.0.0+f45b7d88f4,20.0.0+fd13e6d5b6,20.0.0-1-g10df615+0d65e0fd03,20.0.0-1-g253301a+dcf29472a8,20.0.0-1-g498fb60+ff88705a28,20.0.0-1-g4d801e7+20a86399e6,20.0.0-1-g8a53f90+2817c06967,20.0.0-1-gc96f8cb+41b643067b,20.0.0-1-gd1c87d7+2817c06967,20.0.0-1-gdb27ee5+0eaf4f30a3,20.0.0-11-gda4966f+0cec7fe7b8,20.0.0-17-g98646ba4+f780282b58,20.0.0-2-g25c5319+ec537bc764,20.0.0-2-gec03fae+3bc057fb2a,20.0.0-27-g22bab1b+96b59cb0f5,20.0.0-3-gd2e950e+f45b7d88f4,20.0.0-4-g4a2362f+f45b7d88f4,20.0.0-5-gac0d578b1+6c871ee35c,20.0.0-5-gfcebe35+d7a723b4eb,20.0.0-6-g01203fff+106a5fd355,20.0.0-7-g3c4151b+2efbc3ed6b,20.0.0-8-g9573cbd+0eaf4f30a3,20.0.0-8-gc2abeef+41b643067b,w.2020.32
LSSTDataManagementBasePackage
Public Member Functions | Protected Attributes | List of all members
lsst::pex::policy::paf::PAFParser Class Reference

a parser for reading PAF-formatted data into a Policy object More...

#include <PAFParser.h>

Inheritance diagram for lsst::pex::policy::paf::PAFParser:
lsst::pex::policy::PolicyParser

Public Member Functions

 PAFParser (Policy &policy)
 create a parser to load a Policy More...
 
 PAFParser (Policy &policy, bool strict)
 create a parser to load a Policy More...
 
virtual ~PAFParser ()
 delete this parser More...
 
virtual int parse (std::istream &is)
 parse the data found on the given stream More...
 
bool isStrict ()
 return true if this parser will be strict in adhering to syntax rules. More...
 
void setStrict (bool strict)
 set whether this parser will be strict in adhering to syntax rules. More...
 
PolicygetPolicy ()
 return the policy object More...
 
const PolicygetPolicy () const
 

Protected Attributes

Policy_pol
 
bool _strict
 

Detailed Description

a parser for reading PAF-formatted data into a Policy object

Definition at line 53 of file PAFParser.h.

Constructor & Destructor Documentation

◆ PAFParser() [1/2]

lsst::pex::policy::paf::PAFParser::PAFParser ( Policy policy)

create a parser to load a Policy

Parameters
policythe Policy object to load the parsed data into

◆ PAFParser() [2/2]

lsst::pex::policy::paf::PAFParser::PAFParser ( Policy policy,
bool  strict 
)

create a parser to load a Policy

Parameters
policythe Policy object to load the parsed data into
strictif 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 (set by PolicyParser) is true.

◆ ~PAFParser()

virtual lsst::pex::policy::paf::PAFParser::~PAFParser ( )
virtual

delete this parser

Member Function Documentation

◆ getPolicy() [1/2]

Policy& lsst::pex::policy::PolicyParser::getPolicy ( )
inlineinherited

return the policy object

Definition at line 90 of file PolicyParser.h.

90 { return _pol; }

◆ getPolicy() [2/2]

const Policy& lsst::pex::policy::PolicyParser::getPolicy ( ) const
inlineinherited

Definition at line 91 of file PolicyParser.h.

91 { return _pol; }

◆ isStrict()

bool lsst::pex::policy::PolicyParser::isStrict ( )
inlineinherited

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.

68 { return _strict; }

◆ parse()

virtual int lsst::pex::policy::paf::PAFParser::parse ( std::istream is)
virtual

parse the data found on the given stream

Parameters
isthe stream to read PAF-encoded data from
Returns
int the number of parameters values loaded. This does not include sub-Policy objects.

Implements lsst::pex::policy::PolicyParser.

◆ setStrict()

void lsst::pex::policy::PolicyParser::setStrict ( bool  strict)
inlineinherited

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.

75 { _strict = strict; }

Member Data Documentation

◆ _pol

Policy& lsst::pex::policy::PolicyParser::_pol
protectedinherited

Definition at line 95 of file PolicyParser.h.

◆ _strict

bool lsst::pex::policy::PolicyParser::_strict
protectedinherited

Definition at line 96 of file PolicyParser.h.


The documentation for this class was generated from the following file:
lsst::pex::policy::PolicyParser::_pol
Policy & _pol
Definition: PolicyParser.h:95
lsst::pex::policy::PolicyParser::_strict
bool _strict
Definition: PolicyParser.h:96