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
Public Member Functions | Protected Attributes | List of all members
lsst::pex::policy::paf::PAFWriter Class Reference

#include <PAFWriter.h>

Inheritance diagram for lsst::pex::policy::paf::PAFWriter:
lsst::pex::policy::PolicyWriter

Public Member Functions

 PAFWriter (std::ostream *out=0)
 
 PAFWriter (std::ostream *out, const std::string indent)
 
virtual ~PAFWriter ()
 
 PAFWriter (const std::string &file)
 
 PAFWriter (const char *file)
 
virtual void writeBools (const std::string &name, const Policy::BoolArray &values)
 
virtual void writeInts (const std::string &name, const Policy::IntArray &values)
 
virtual void writeDoubles (const std::string &name, const Policy::DoubleArray &values)
 
virtual void writeStrings (const std::string &name, const Policy::StringArray &values)
 
virtual void writePolicies (const std::string &name, const Policy::PolicyPtrArray &values)
 
virtual void writeFiles (const std::string &name, const Policy::FilePtrArray &values)
 
- Public Member Functions inherited from lsst::pex::policy::PolicyWriter
 PolicyWriter (std::ostream *out=0)
 
 PolicyWriter (const std::string &file, bool append=false)
 
virtual ~PolicyWriter ()
 
virtual void write (const Policy &policy, bool doDecl=false)
 
void close ()
 
std::string toString ()
 
virtual void writeBool (const std::string &name, bool value)
 
virtual void writeInt (const std::string &name, int value)
 
virtual void writeDouble (const std::string &name, double value)
 
virtual void writeString (const std::string &name, const std::string &value)
 
virtual void writePolicy (const std::string &name, const Policy &value)
 
virtual void writeFile (const std::string &name, const PolicyFile &value)
 

Protected Attributes

std::string _indent
 
- Protected Attributes inherited from lsst::pex::policy::PolicyWriter
std::ostream * _os
 

Detailed Description

An abstract interface for writing policy data to streams

Definition at line 44 of file PAFWriter.h.

Constructor & Destructor Documentation

lsst::pex::policy::paf::PAFWriter::PAFWriter ( std::ostream *  out = 0)
inlineexplicit

create a writer attached to an output stream

Parameters
outthe output stream to write data to

Definition at line 51 of file PAFWriter.h.

52  : PolicyWriter(out), _indent() { }
PolicyWriter(std::ostream *out=0)
lsst::pex::policy::paf::PAFWriter::PAFWriter ( std::ostream *  out,
const std::string  indent 
)
inline

create a writer attached to an output stream

Parameters
outthe output stream to write data to
indenta string (of spaces) to used as indentation for each line printed out.

Definition at line 60 of file PAFWriter.h.

61  : PolicyWriter(out), _indent(indent)
62  { }
PolicyWriter(std::ostream *out=0)
lsst::pex::policy::paf::PAFWriter::PAFWriter ( const std::string &  file)
inlineexplicit

create a writer attached to an output file

Parameters
filethe output file

Definition at line 69 of file PAFWriter.h.

lsst::pex::policy::paf::PAFWriter::PAFWriter ( const char *  file)
inlineexplicit

create a writer attached to an output file

Parameters
filethe output file

Definition at line 71 of file PAFWriter.h.

virtual lsst::pex::policy::paf::PAFWriter::~PAFWriter ( )
virtual

delete this writer

Member Function Documentation

virtual void lsst::pex::policy::paf::PAFWriter::writeBools ( const std::string &  name,
const Policy::BoolArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

virtual void lsst::pex::policy::paf::PAFWriter::writeDoubles ( const std::string &  name,
const Policy::DoubleArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

virtual void lsst::pex::policy::paf::PAFWriter::writeFiles ( const std::string &  name,
const Policy::FilePtrArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

virtual void lsst::pex::policy::paf::PAFWriter::writeInts ( const std::string &  name,
const Policy::IntArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

virtual void lsst::pex::policy::paf::PAFWriter::writePolicies ( const std::string &  name,
const Policy::PolicyPtrArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

virtual void lsst::pex::policy::paf::PAFWriter::writeStrings ( const std::string &  name,
const Policy::StringArray values 
)
virtual

write an array of property values with a given name

Parameters
namethe name to save the values as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception.
valuesthe values to save under that name.

Implements lsst::pex::policy::PolicyWriter.

Member Data Documentation

std::string lsst::pex::policy::paf::PAFWriter::_indent
protected

the indentation string

Definition at line 108 of file PAFWriter.h.


The documentation for this class was generated from the following file: