LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
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.