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 Policy file in the installation directory of an LSST product, referred to using a URN. More...
#include <UrnPolicyFile.h>
Public Member Functions | |
UrnPolicyFile (const std::string &urn, bool strictUrn=false, bool strictLoads=true) | |
Public Member Functions inherited from lsst::pex::policy::DefaultPolicyFile | |
DefaultPolicyFile (const char *const productName, const std::string &filepath, const std::string &repos="", bool strict=true) | |
virtual boost::filesystem::path | getInstallPath (const char *const productName) |
const boost::filesystem::path & | getRepositoryPath () const |
virtual void | load (Policy &policy) const |
Public Member Functions inherited from lsst::pex::policy::PolicyFile | |
PolicyFile (const SupportedFormats::Ptr &fmts=defaultFormats) | |
const std::string | getPath () const |
bool | exists () const |
virtual const std::string & | getFormatName () |
const std::string & | getFormatName () const |
PolicyFile (const std::string &filepath, const SupportedFormats::Ptr &fmts=defaultFormats) | |
PolicyFile (const char *filepath, const SupportedFormats::Ptr &fmts=defaultFormats) | |
PolicyFile (const boost::filesystem::path &filepath, const SupportedFormats::Ptr &fmts=defaultFormats) | |
PolicyFile (const std::string &filepath, const PolicyParserFactory::Ptr &parserFactory) | |
PolicyFile (const boost::filesystem::path &filepath, const PolicyParserFactory::Ptr &parserFactory) | |
PolicyFile (const std::string &filepath, const boost::filesystem::path &reposDir, const SupportedFormats::Ptr &fmts=defaultFormats) | |
PolicyFile (const boost::filesystem::path &filepath, const boost::filesystem::path &reposDir, const SupportedFormats::Ptr &fmts=defaultFormats) | |
PolicyFile (const std::string &filepath, const boost::filesystem::path &reposDir, const PolicyParserFactory::Ptr &parserFactory) | |
PolicyFile (const boost::filesystem::path &filepath, const boost::filesystem::path &reposDir, const PolicyParserFactory::Ptr &parserFactory) | |
virtual void | load (Policy &policy) |
Public Member Functions inherited from lsst::pex::policy::PolicySource | |
PolicySource (SupportedFormats::Ptr fmts=defaultFormats) | |
virtual | ~PolicySource () |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Public Member Functions inherited from lsst::daf::base::Persistable | |
Persistable (void) | |
virtual | ~Persistable (void) |
template<class Archive > | |
void | serialize (Archive &, unsigned int const) |
Static Public Member Functions | |
static std::string | productNameFromUrn (const std::string &urn, bool strictUrn=false) |
static std::string | filePathFromUrn (const std::string &urn, bool strictUrn=false) |
static std::string | reposFromUrn (const std::string &urn, bool strictUrn=false) |
static bool | looksLikeUrn (const std::string &s, bool strict=false) |
Static Public Member Functions inherited from lsst::pex::policy::DefaultPolicyFile | |
static boost::filesystem::path | installPathFor (const char *const productName) |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Static Public Attributes | |
static const std::string | URN_PREFIX |
static const std::string | URN_PREFIX_ABBREV |
Static Public Attributes inherited from lsst::pex::policy::PolicyFile | |
static const std::string | EXT_PAF |
static const std::string | EXT_XML |
the PAF file extension, ".paf" More... | |
static const boost::regex | SPACE_RE |
the XML file extension, ".xml" More... | |
static const boost::regex | COMMENT |
reg-exp for an empty line More... | |
static const boost::regex | CONTENTID |
reg-exp for the start of a comment More... | |
Static Public Attributes inherited from lsst::pex::policy::PolicySource | |
static SupportedFormats::Ptr | defaultFormats |
Private Attributes | |
const std::string | _urn |
Additional Inherited Members | |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Public Types inherited from lsst::daf::base::Persistable | |
typedef boost::shared_ptr < Persistable > | Ptr |
Protected Attributes inherited from lsst::pex::policy::PolicyFile | |
boost::filesystem::path | _file |
Protected Attributes inherited from lsst::pex::policy::PolicySource | |
SupportedFormats::Ptr | _formats |
A Policy file in the installation directory of an LSST product, referred to using a URN.
For use of URN references in PAF-formatted policy files, see Policy Authoring Format.
The syntax is urn:eupspkg:[PRODUCT_NAME][:REPOSITORY]:PATH, although "urn:eupspkg:" may optionally be abbreviated with "@". PRODUCT_NAME is the name of an LSST product (see DefaultPolicyFile for more details on LSST product installation dirs), and REPOSITORY is a subdirectory, which other references within the Policy will be relative to (see Policy for more details on repositories).
For example:
Caveat: Only supports Dictionary's "DictionaryFile" directive if the value is prefixed like a normal URN reference with "@urn:eupspkg:" or "@@".
Definition at line 68 of file UrnPolicyFile.h.
|
inlineexplicit |
Construct a new policy file reference from a URN. Basically, the only required element is a colon, separating the product directory from the local path.
urn | The URN of the policy file. A prefix such as "urn:eupspkg:" or "@" is optional. |
strictUrn | if true, the URN must strictly begin with "@urn:eupspkg:" or "urn:eupspkg:". |
strictLoads | if true (default), load() will throw an exception if it encounters recoverable parsing errors in the underlying file (or any of the files it references). Otherwise, the loaded Policy will be incomplete. This is identical to the strict argument to Policy's loadPolicyFiles(). |
Definition at line 85 of file UrnPolicyFile.h.
|
static |
Extract the local file path from a URN. For example,
|
static |
Does s
look like a URN? That is, does it start with URN_PREFIX or URN_PREFIX_ABBREV?
s | the string to be tested |
strict | if false, "@" will be accepted as a substitute for "urn:eupspkg:"; if true, urn:eupspkg must be present. |
|
static |
Extract the product name from a URN. For example,
|
static |
Extract the repository name from a URN, or "" if none. For example,
|
private |
Definition at line 140 of file UrnPolicyFile.h.
|
static |
The prefix that a Policy URN starts with. May be abbreviated as "@".
Definition at line 125 of file UrnPolicyFile.h.
|
static |
The prefix that a Policy URN starts with. May be abbreviated as "@".
Definition at line 126 of file UrnPolicyFile.h.