LSSTApplications  19.0.0+10,19.0.0+80,19.0.0-1-g20d9b18+31,19.0.0-1-g49a97f9+4,19.0.0-1-g8c57eb9+31,19.0.0-1-g9a028c0+13,19.0.0-1-ga72da6b+3,19.0.0-1-gb77924a+15,19.0.0-1-gbfe0924+66,19.0.0-1-gc3516c3,19.0.0-1-gefe1d0d+49,19.0.0-1-gf8cb8b4+3,19.0.0-14-g7511ce4+6,19.0.0-16-g3dc1a33c+6,19.0.0-17-g59f0e8a+4,19.0.0-17-g9c22e3c+9,19.0.0-18-g35bb99870+2,19.0.0-19-g2772d4a+9,19.0.0-2-g260436e+53,19.0.0-2-g31cdcee,19.0.0-2-g9675b69+3,19.0.0-2-gaa2795f,19.0.0-2-gbcc4de1,19.0.0-2-gd6f004e+6,19.0.0-2-gde8e5e3+5,19.0.0-2-gff6972b+15,19.0.0-21-ge306cd8,19.0.0-21-gf122e69+2,19.0.0-3-g2d43a51+2,19.0.0-3-gf3b1435+6,19.0.0-4-g56feb96,19.0.0-4-gac56cce+17,19.0.0-49-gce872c1+1,19.0.0-5-g66946eb+6,19.0.0-5-gd8897ba+6,19.0.0-51-gfc4a647e,19.0.0-7-g686a884+5,19.0.0-7-g886f805+5,19.0.0-8-g305ff64,w.2020.17
LSSTDataManagementBasePackage
Classes | Namespaces | Macros | Functions
Policy.h File Reference
#include <string>
#include <vector>
#include <list>
#include <map>
#include <memory>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include "lsst/daf/base/Persistable.h"
#include "lsst/daf/base/PropertySet.h"
#include "lsst/pex/policy/exceptions.h"

Go to the source code of this file.

Classes

class  lsst::pex::policy::Policy
 a container for holding hierarchical configuration data in memory. More...
 

Namespaces

 lsst
 A base class for image defects.
 
 lsst::pex
 
 lsst::pex::policy
 

Macros

#define POL_GETSCALAR(name, type, vtype)
 
#define POL_GETLIST(name, type, vtype)
 
#define POL_ADD(name, value)
 

Functions

std::ostreamlsst::pex::policy::operator<< (std::ostream &os, const Policy &p)
 
template<>
std::string lsst::pex::policy::Policy::getValue< std::string > (const std::string &name) const
 
template<>
Policy::FilePtr lsst::pex::policy::Policy::getValue< Policy::FilePtr > (const std::string &name) const
 
template<>
Policy::ConstPtr lsst::pex::policy::Policy::getValue< Policy::ConstPtr > (const std::string &name) const
 
template<>
std::vector< std::stringlsst::pex::policy::Policy::getValueArray< std::string > (const std::string &name) const
 
template<>
Policy::FilePtrArray lsst::pex::policy::Policy::getValueArray< Policy::FilePtr > (const std::string &name) const
 
template<>
Policy::PolicyPtrArray lsst::pex::policy::Policy::getValueArray< Policy::Ptr > (const std::string &name) const
 
template<>
Policy::ConstPolicyPtrArray lsst::pex::policy::Policy::getValueArray< Policy::ConstPtr > (const std::string &name) const
 
template<>
Policy::ValueType lsst::pex::policy::Policy::getValueType< std::string > ()
 
template<>
Policy::ValueType lsst::pex::policy::Policy::getValueType< Policy::FilePtr > ()
 
template<>
Policy::ValueType lsst::pex::policy::Policy::getValueType< Policy::Ptr > ()
 
template<>
Policy::ValueType lsst::pex::policy::Policy::getValueType< Policy::ConstPtr > ()
 
template<>
void lsst::pex::policy::Policy::setValue< std::string > (const std::string &name, const std::string &value)
 
template<>
void lsst::pex::policy::Policy::setValue< Policy::Ptr > (const std::string &name, const Policy::Ptr &value)
 
template<>
void lsst::pex::policy::Policy::setValue< Policy::FilePtr > (const std::string &name, const Policy::FilePtr &value)
 
template<>
void lsst::pex::policy::Policy::addValue< std::string > (const std::string &name, const std::string &value)
 
template<>
void lsst::pex::policy::Policy::addValue< Policy::Ptr > (const std::string &name, const Policy::Ptr &value)
 
template<>
void lsst::pex::policy::Policy::addValue< Policy::FilePtr > (const std::string &name, const Policy::FilePtr &value)
 

Macro Definition Documentation

◆ POL_ADD

#define POL_ADD (   name,
  value 
)
Value:
try { \
_data->add(name, value); \
throw LSST_EXCEPT(TypeError, name, getTypeName(name)); \
}
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167

Definition at line 1000 of file Policy.h.

◆ POL_GETLIST

#define POL_GETLIST (   name,
  type,
  vtype 
)
Value:
try { \
return _data->getArray<type>(name); \
throw LSST_EXCEPT(NameNotFound, name); \
throw LSST_EXCEPT(TypeError, name, std::string(typeName[vtype])); \
} catch (boost::bad_any_cast&) { \
throw LSST_EXCEPT(TypeError, name, std::string(typeName[vtype])); \
}
STL class.
Reports attempts to access elements using an invalid key.
Definition: Runtime.h:151
table::Key< int > type
Definition: Detector.cc:163
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167

Definition at line 62 of file Policy.h.

◆ POL_GETSCALAR

#define POL_GETSCALAR (   name,
  type,
  vtype 
)
Value:
try { \
return _data->get<type>(name); \
throw LSST_EXCEPT(NameNotFound, name); \
throw LSST_EXCEPT(TypeError, name, std::string(typeName[vtype])); \
} catch (boost::bad_any_cast&) { \
throw LSST_EXCEPT(TypeError, name, std::string(typeName[vtype])); \
}
STL class.
Reports attempts to access elements using an invalid key.
Definition: Runtime.h:151
table::Key< int > type
Definition: Detector.cc:163
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167

Definition at line 51 of file Policy.h.