lsst.pex.policy
13.0-1-g47a359c+17
|
An abstract interface for writing policy data to streams. More...
#include <PAFWriter.h>
Public Member Functions | |
PAFWriter (std::ostream *out=0) | |
create a writer attached to an output stream More... | |
PAFWriter (std::ostream *out, const std::string indent) | |
create a writer attached to an output stream More... | |
virtual | ~PAFWriter () |
delete this writer More... | |
PAFWriter (const std::string &file) | |
create a writer attached to an output file More... | |
PAFWriter (const char *file) | |
create a writer attached to an output file More... | |
virtual void | writeBools (const std::string &name, const Policy::BoolArray &values) |
write an array of property values with a given name More... | |
virtual void | writeInts (const std::string &name, const Policy::IntArray &values) |
write an array of property values with a given name More... | |
virtual void | writeDoubles (const std::string &name, const Policy::DoubleArray &values) |
write an array of property values with a given name More... | |
virtual void | writeStrings (const std::string &name, const Policy::StringArray &values) |
write an array of property values with a given name More... | |
virtual void | writePolicies (const std::string &name, const Policy::PolicyPtrArray &values) |
write an array of property values with a given name More... | |
virtual void | writeFiles (const std::string &name, const Policy::FilePtrArray &values) |
write an array of property values with a given name More... | |
![]() | |
PolicyWriter (std::ostream *out=0) | |
create a writer attached to an output stream. More... | |
PolicyWriter (const std::string &file, bool append=false) | |
create a writer attached to a file. More... | |
virtual | ~PolicyWriter () |
delete this writer More... | |
virtual void | write (const Policy &policy, bool doDecl=false) |
write the contents of a policy the attached stream. More... | |
void | close () |
close the output stream. More... | |
std::string | toString () |
return the written data as a string. More... | |
virtual void | writeBool (const std::string &name, bool value) |
write the given property out as policy data More... | |
virtual void | writeInt (const std::string &name, int value) |
write the given property out as policy data More... | |
virtual void | writeDouble (const std::string &name, double value) |
write the given property out as policy data More... | |
virtual void | writeString (const std::string &name, const std::string &value) |
write the given property out as policy data More... | |
virtual void | writePolicy (const std::string &name, const Policy &value) |
write the given property out as policy data More... | |
virtual void | writeFile (const std::string &name, const PolicyFile &value) |
write the given property out as policy data More... | |
Protected Attributes | |
std::string | _indent |
the indentation string More... | |
![]() | |
std::ostream * | _os |
the output stream. More... | |
An abstract interface for writing policy data to streams.
Definition at line 44 of file PAFWriter.h.
|
inlineexplicit |
create a writer attached to an output stream
out | the output stream to write data to |
Definition at line 51 of file PAFWriter.h.
|
inline |
create a writer attached to an output stream
out | the output stream to write data to |
indent | a string (of spaces) to used as indentation for each line printed out. |
Definition at line 60 of file PAFWriter.h.
|
inlineexplicit |
create a writer attached to an output file
file | the output file |
Definition at line 69 of file PAFWriter.h.
|
inlineexplicit |
create a writer attached to an output file
file | the output file |
Definition at line 71 of file PAFWriter.h.
|
virtual |
delete this writer
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
write an array of property values with a given name
name | the 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. |
values | the values to save under that name. |
Implements lsst::pex::policy::PolicyWriter.
|
protected |
the indentation string
Definition at line 108 of file PAFWriter.h.