lsst.astshim
21.0.0-2-g45278ab+64c1bc5aa5
|
#include <XmlChan.h>
Public Member Functions | |
XmlChan (Stream &stream, std::string const &options="") | |
virtual | ~XmlChan () |
XmlChan (XmlChan const &)=delete | |
XmlChan (XmlChan &&)=default | |
XmlChan & | operator= (XmlChan const &)=delete |
XmlChan & | operator= (XmlChan &&)=default |
std::string | getXmlFormat () const |
Get XmlFormat System for formatting Objects as XML. More... | |
int | getXmlLength () const |
Get XmlLength: controls output buffer length. More... | |
std::string | getXmlPrefix () |
Get XmlPrefix: the namespace prefix to use when writing. More... | |
void | setXmlFormat (std::string const &format) |
Set XmlFormat System for formatting Objects as XML. More... | |
void | setXmlLength (int len) |
Set XmlLength: controls output buffer length; 0 for no limit. More... | |
void | setXmlPrefix (std::string const &prefix) |
Set XmlPrefix: the namespace prefix to use when writing. More... | |
![]() | |
Channel (Stream &stream, std::string const &options="") | |
virtual | ~Channel () |
Channel (Channel const &)=delete | |
Channel (Channel &&)=default | |
Channel & | operator= (Channel const &)=delete |
Channel & | operator= (Channel &&)=default |
std::shared_ptr< Channel > | copy () const |
Return a deep copy of this object. More... | |
bool | getComment () const |
Get Comment: include textual comments in output? More... | |
int | getFull () const |
Get Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose. More... | |
int | getIndent () const |
Get Indent: indentation increment between objects. More... | |
int | getReportLevel () const |
Get ReportLevel: report level. More... | |
bool | getSkip () const |
Get Skip: skip irrelevant data on input? More... | |
bool | getStrict () const |
Get Strict: generate errors instead of warnings? More... | |
std::shared_ptr< Object > | read () |
Read an object from a channel. More... | |
void | setComment (bool skip) |
Set Comment: include textual comments in output? More... | |
void | setFull (int full) |
Set Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose. More... | |
void | setIndent (int indent) |
Set Indent: indentation increment between objects. More... | |
void | setReportLevel (int level) |
void | setSkip (bool skip) |
Set Skip: skip irrelevant data on input? More... | |
void | setStrict (bool strict) |
Set Strict: generate errors instead of warnings? More... | |
KeyMap | warnings () const |
int | write (Object const &object) |
Write an object to a channel. More... | |
![]() | |
virtual | ~Object () |
Object (Object const &object) | |
Copy constructor: make a deep copy. More... | |
Object (Object &&)=default | |
Object & | operator= (Object const &)=delete |
Object & | operator= (Object &&)=default |
bool | operator== (Object const &rhs) const |
bool | operator!= (Object const &rhs) const |
std::shared_ptr< Object > | copy () const |
Return a deep copy of this object. More... | |
void | clear (std::string const &attrib) |
bool | hasAttribute (std::string const &attrib) const |
std::string | getClassName () const |
std::string | getID () const |
Get ID: object identification string that is not copied. More... | |
std::string | getIdent () const |
Get Ident: object identification string that is copied. More... | |
int | getNObject () const |
int | getObjSize () const |
Get ObjSize: the in-memory size of the AST object in bytes. More... | |
int | getRefCount () const |
bool | getUseDefs () const |
Get UseDefs: allow use of default values for Object attributes? More... | |
void | lock (bool wait) |
bool | same (Object const &other) const |
void | setID (std::string const &id) |
Set ID: object identification string that is not copied. More... | |
void | setIdent (std::string const &ident) |
Set Ident: object identification string that is copied. More... | |
void | setUseDefs (bool usedefs) |
Set UseDefs: allow use of default values for Object attributes? More... | |
void | show (std::ostream &os, bool showComments=true) const |
std::string | show (bool showComments=true) const |
bool | test (std::string const &attrib) const |
void | unlock (bool report=false) |
AstObject const * | getRawPtr () const |
AstObject * | getRawPtr () |
Additional Inherited Members | |
![]() | |
using | ObjectPtr = std::unique_ptr< AstObject, Deleter > |
unique pointer holding an AST raw pointer More... | |
![]() | |
static std::shared_ptr< Object > | fromString (std::string const &str) |
template<typename Class > | |
static std::shared_ptr< Class > | fromAstObject (AstObject *rawObj, bool copy) |
![]() | |
virtual std::shared_ptr< Object > | copyPolymorphic () const override |
Channel (AstChannel *chan, Stream &stream, bool isFits=false) | |
Channel (AstChannel *chan) | |
![]() | |
Object (AstObject *object) | |
template<typename T , typename AstT > | |
std::shared_ptr< T > | copyImpl () const |
bool | getB (std::string const &attrib) const |
std::string const | getC (std::string const &attrib) const |
double | getD (std::string const &attrib) const |
float | getF (std::string const &attrib) const |
int | getI (std::string const &attrib) const |
long int | getL (std::string const &attrib) const |
void | set (std::string const &setting) |
void | setB (std::string const &attrib, bool value) |
void | setC (std::string const &attrib, std::string const &value) |
void | setD (std::string const &attrib, double value) |
void | setF (std::string const &attrib, float value) |
void | setI (std::string const &attrib, int value) |
void | setL (std::string const &attrib, long int value) |
![]() | |
template<typename ShimT , typename AstT > | |
static std::shared_ptr< ShimT > | makeShim (AstObject *p) |
XmlChan provides input/output of AST objects.
Writing an Object to a XmlChan will generate a textual representation of that Object, and reading from a XmlChan will create a new Object from its textual representation.
XmlChan provides the following attributes, in addition to those provided by Channel and Object
XmlFormat: system for formatting Objects as XML. XmlLength: controls output buffer length; 0 for no limit. XmlPrefix: the namespace prefix to use when writing.
|
inlineexplicit |
Construct a channel that uses a provided Stream
[in] | stream | Stream for channel I/O:
|
[in] | options | Comma-separated list of attribute assignments. |
|
inlinevirtual |
|
delete |
|
default |
|
inline |
Get XmlFormat System for formatting Objects as XML.
|
inline |
Get XmlLength: controls output buffer length.
|
inline |
Get XmlPrefix: the namespace prefix to use when writing.
|
inline |
Set XmlFormat System for formatting Objects as XML.
|
inline |
Set XmlLength: controls output buffer length; 0 for no limit.
|
inline |
Set XmlPrefix: the namespace prefix to use when writing.