LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
59 _myos->exceptions(std::ofstream::failbit | std::ofstream::badbit);
64 if (_myos)
delete _myos;
73 if (ss)
return ss->
str();
92 if (doDecl) (*_os) <<
"#<?cfg paf policy ?>" <<
std::endl;
95 Policy::StringArray::const_iterator ni;
96 for (ni = names.begin(); ni != names.end(); ++ni) {
99 if (tp ==
typeid(
bool)) {
101 }
else if (tp ==
typeid(
int)) {
103 }
else if (tp ==
typeid(
double)) {
114 }
catch (NameNotFound&) {
static std::type_info const & typeOfT()
Get type info for the specified class.
virtual void writeBool(const std::string &name, bool value)
write the given property out as policy data
virtual void writeInts(const std::string &name, const Policy::IntArray &values)=0
virtual void write(const Policy &policy, bool doDecl=false)
write the contents of a policy the attached stream.
std::vector< std::string > StringArray
std::shared_ptr< FrameSet > append(FrameSet const &first, FrameSet const &second)
Construct a FrameSet that performs two transformations in series.
the definition of the PolicyWriter class
virtual void writeFiles(const std::string &name, const Policy::FilePtrArray &values)=0
std::string toString()
return the written data as a string.
PolicyWriter(std::ostream *out=0)
create a writer attached to an output stream.
std::shared_ptr< Policy > Ptr
std::shared_ptr< PolicyFile > FilePtr
virtual void writeString(const std::string &name, const std::string &value)
Reports errors in the logical structure of the program.
virtual ~PolicyWriter()
delete this writer
definition of the PolicyFile class
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
virtual void writeFile(const std::string &name, const PolicyFile &value)
virtual void writePolicies(const std::string &name, const Policy::PolicyPtrArray &values)=0
virtual void writeStrings(const std::string &name, const Policy::StringArray &values)=0
virtual void writeBools(const std::string &name, const Policy::BoolArray &values)=0
write an array of property values with a given name
Base class for all persistable classes.
Class for storing generic metadata.
virtual void writeDoubles(const std::string &name, const Policy::DoubleArray &values)=0
std::ostream * _os
the output stream.
void close()
close the output stream.
virtual void writeDouble(const std::string &name, double value)
virtual void writeInt(const std::string &name, int value)
virtual void writePolicy(const std::string &name, const Policy &value)