lsst.pex.policy
19.0.0-2-g3b2f90d+4
|
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... | |
PAFWriter (const std::string &file) | |
create a writer attached to an output file More... | |
PAFWriter (const char *file) | |
virtual | ~PAFWriter () |
delete this writer 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) |
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) |
virtual void | write (const Policy &policy, bool doDecl=false) |
write the contents of a policy the attached stream. 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) |
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) |
void | close () |
close the output stream. More... | |
std::string | toString () |
return the written data as a string. 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 |
Definition at line 71 of file PAFWriter.h.
|
virtual |
delete this writer
|
inherited |
close the output stream.
This has no effect if the attached stream is not a file stream.
|
inherited |
return the written data as a string.
This string will be non-empty only if this class was was instantiated without an attached stream.
|
virtualinherited |
write the contents of a policy the attached stream.
Each top-level parameter will be recursively printed.
policy | the policy data to write |
doDecl | if true, precede the data with the appropriate file format type. |
|
virtualinherited |
write the given property out as policy data
name | the name to save the property as. This may be a hierarchical name; however, an implementation is not guaranteed to support it. If it cannot, it should raise an exception. |
value | the value to save under that name. |
|
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.
|
virtualinherited |
|
virtual |
Implements lsst::pex::policy::PolicyWriter.
|
virtualinherited |
|
virtual |
Implements lsst::pex::policy::PolicyWriter.
|
virtualinherited |
|
virtual |
Implements lsst::pex::policy::PolicyWriter.
|
virtual |
Implements lsst::pex::policy::PolicyWriter.
|
virtualinherited |
|
virtualinherited |
|
virtual |
Implements lsst::pex::policy::PolicyWriter.
|
protected |
the indentation string
Definition at line 108 of file PAFWriter.h.
|
protectedinherited |