22 #ifndef ASTSHIM_XMLCHAN_H 23 #define ASTSHIM_XMLCHAN_H 59 :
Channel(reinterpret_cast<AstChannel *>(
void setXmlPrefix(std::string const &prefix)
Set XmlPrefix: the namespace prefix to use when writing.
void sink(const char *cstr)
Sink function that allows astChannel to sink to a Stream.
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
AST wrapper classes and functions.
XmlChan(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
Channel provides input/output of AST objects.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
void setC(std::string const &attrib, std::string const &value)
Set the value of an attribute as a string.
std::string getXmlFormat() const
Get XmlFormat System for formatting Objects as XML.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
const char * source()
Source function that allows astChannel to source from a Stream.
std::string getXmlPrefix()
Get XmlPrefix: the namespace prefix to use when writing.
XmlChan & operator=(XmlChan const &)=delete
XmlChan provides input/output of AST objects.
void setI(std::string const &attrib, int value)
Set the value of an attribute as an int.
std::string const getC(std::string const &attrib) const
Get the value of an attribute as a string.
int getXmlLength() const
Get XmlLength: controls output buffer length.
void setXmlLength(int len)
Set XmlLength: controls output buffer length; 0 for no limit.
A stream for ast::Channel.
void setXmlFormat(std::string const &format)
Set XmlFormat System for formatting Objects as XML.