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
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
lsst::pex::policy::paf::PAFParserFactory Class Reference

#include <PAFParserFactory.h>

Inheritance diagram for lsst::pex::policy::paf::PAFParserFactory:
lsst::pex::policy::PolicyParserFactory

Public Member Functions

 PAFParserFactory (const boost::regex &contIdPatt=CONTENTID)
 
virtual PolicyParsercreateParser (Policy &policy, bool strict=true) const
 
virtual bool isRecognized (const std::string &leaders) const
 
virtual const std::string & getFormatName ()
 
- Public Member Functions inherited from lsst::pex::policy::PolicyParserFactory
 PolicyParserFactory ()
 
virtual ~PolicyParserFactory ()
 

Static Public Attributes

static const std::string FORMAT_NAME
 
static const boost::regex LEADER_PATTERN
 
static const boost::regex CONTENTID
 
- Static Public Attributes inherited from lsst::pex::policy::PolicyParserFactory
static const std::string UNRECOGNIZED
 

Private Attributes

boost::regex contentid
 

Additional Inherited Members

- Public Types inherited from lsst::pex::policy::PolicyParserFactory
typedef boost::shared_ptr
< PolicyParserFactory
Ptr
 

Detailed Description

a class for creating PAFParser objects

Definition at line 53 of file PAFParserFactory.h.

Constructor & Destructor Documentation

lsst::pex::policy::paf::PAFParserFactory::PAFParserFactory ( const boost::regex &  contIdPatt = CONTENTID)
inline

create a new factory

Parameters
contIdPattthe pattern to use for recognizing a content identifier. A content ID is encoded in a (#-leading) comment as the first line of the file. The default is "<?cfg JSON ... ?>"

Definition at line 63 of file PAFParserFactory.h.

Member Function Documentation

virtual PolicyParser* lsst::pex::policy::paf::PAFParserFactory::createParser ( Policy policy,
bool  strict = true 
) const
virtual

create a new PolicyParser class and return a pointer to it. The caller is responsible for destroying the pointer.

Parameters
policythe Policy object that data should be loaded into.
strictif true (default), make the returned PolicyParser 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.

Implements lsst::pex::policy::PolicyParserFactory.

virtual const std::string& lsst::pex::policy::paf::PAFParserFactory::getFormatName ( )
virtual

return the name for the format supported by the parser

Reimplemented from lsst::pex::policy::PolicyParserFactory.

virtual bool lsst::pex::policy::paf::PAFParserFactory::isRecognized ( const std::string &  leaders) const
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;

Implements lsst::pex::policy::PolicyParserFactory.

Member Data Documentation

const boost::regex lsst::pex::policy::paf::PAFParserFactory::CONTENTID
static

a default pattern for the content identifier. The content ID is encoded in a (#-leading) comment as the first line of the file. This default is "<?cfg PAF ... ?>"

Definition at line 108 of file PAFParserFactory.h.

boost::regex lsst::pex::policy::paf::PAFParserFactory::contentid
private

Definition at line 111 of file PAFParserFactory.h.

const std::string lsst::pex::policy::paf::PAFParserFactory::FORMAT_NAME
static

a name for the format

Definition at line 96 of file PAFParserFactory.h.

const boost::regex lsst::pex::policy::paf::PAFParserFactory::LEADER_PATTERN
static

a pattern for the leading data characters for this format

Definition at line 101 of file PAFParserFactory.h.


The documentation for this class was generated from the following file: