22 #ifndef ASTSHIM_CHANNEL_H 23 #define ASTSHIM_CHANNEL_H 86 "Channel cannot be deep copied because its contained stream cannot be deep copied");
126 if ((level < 0) || (level > 3)) {
128 os <<
"level = " << level <<
" not in range [0, 3]";
131 setI(
"ReportLevel", level);
177 explicit Channel(AstChannel *chan);
void setSkip(bool skip)
Set Skip: skip irrelevant data on input?
KeyMap is used to store a set of values with associated keys which identify the values.
void setB(std::string const &attrib, bool value)
Set the value of an attribute as a bool.
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
Channel & operator=(Channel const &)=delete
AST wrapper classes and functions.
Channel provides input/output of AST objects.
void setReportLevel(int level)
Set ReportLevel: report level; an integer in the range [0, 3] where 0 is the most verbose...
bool getStrict() const
Get Strict: generate errors instead of warnings?
void setIndent(int indent)
Set Indent: indentation increment between objects.
int getFull() const
Get Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose.
Channel(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
KeyMap warnings() const
Return a KeyMap holding the text of any warnings issued as a result of the previous invocation of rea...
bool getComment() const
Get Comment: include textual comments in output?
bool getB(std::string const &attrib) const
Get the value of an attribute as a bool.
int write(Object const &object)
Write an object to a channel.
int getIndent() const
Get Indent: indentation increment between objects.
std::shared_ptr< Channel > copy() const
Return a deep copy of this object.
int getReportLevel() const
Get ReportLevel: report level.
void setFull(int full)
Set Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose.
void setStrict(bool strict)
Set Strict: generate errors instead of warnings?
bool getSkip() const
Get Skip: skip irrelevant data on input?
void setI(std::string const &attrib, int value)
Set the value of an attribute as an int.
Abstract base class for all AST objects.
std::shared_ptr< Object > read()
Read an object from a channel.
A stream for ast::Channel.
void setComment(bool skip)
Set Comment: include textual comments in output?
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.