LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
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.