Go to the documentation of this file.
22 #ifndef ASTSHIM_CHANNEL_H
23 #define ASTSHIM_CHANNEL_H
74 explicit Channel(
Stream &stream, std::string
const &options =
"");
84 std::shared_ptr<Channel>
copy()
const {
85 throw std::logic_error(
86 "Channel cannot be deep copied because its contained stream cannot be deep copied");
108 std::shared_ptr<Object>
read();
126 if ((level < 0) || (level > 3)) {
127 std::ostringstream os;
128 os <<
"level = " << level <<
" not in range [0, 3]";
129 throw std::invalid_argument(os.str());
131 setI(
"ReportLevel", level);
159 virtual std::shared_ptr<Object>
copyPolymorphic()
const override {
return std::shared_ptr<Object>(); }
170 explicit Channel(AstChannel *chan,
Stream &stream,
bool isFits=
false);
177 explicit Channel(AstChannel *chan);
Channel(Channel const &)=delete
void setStrict(bool strict)
Set Strict: generate errors instead of warnings?
Definition: Channel.h:138
void setI(std::string const &attrib, int value)
Definition: Object.h:500
KeyMap warnings() const
Definition: Channel.cc:67
Channel(Stream &stream, std::string const &options="")
Definition: Channel.cc:31
Channel(Channel &&)=default
bool getComment() const
Get Comment: include textual comments in output?
Definition: Channel.h:90
Channel & operator=(Channel const &)=delete
void setComment(bool skip)
Set Comment: include textual comments in output?
Definition: Channel.h:111
int write(Object const &object)
Write an object to a channel.
Definition: Channel.cc:61
void setIndent(int indent)
Set Indent: indentation increment between objects.
Definition: Channel.h:117
bool getSkip() const
Get Skip: skip irrelevant data on input?
Definition: Channel.h:102
void setB(std::string const &attrib, bool value)
Definition: Object.h:452
Channel & operator=(Channel &&)=default
bool getB(std::string const &attrib) const
Definition: Object.h:348
void setFull(int full)
Set Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose.
Definition: Channel.h:114
int getI(std::string const &attrib) const
Definition: Object.h:400
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
void setReportLevel(int level)
Definition: Channel.h:125
std::shared_ptr< Channel > copy() const
Return a deep copy of this object.
Definition: Channel.h:84
bool getStrict() const
Get Strict: generate errors instead of warnings?
Definition: Channel.h:105
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: Channel.h:159
int getFull() const
Get Full: level of output detail; one of -1: minimum, 0: normal, 1: verbose.
Definition: Channel.h:93
void setSkip(bool skip)
Set Skip: skip irrelevant data on input?
Definition: Channel.h:135
int getReportLevel() const
Get ReportLevel: report level.
Definition: Channel.h:99
virtual ~Channel()
Definition: Channel.cc:45
std::shared_ptr< Object > read()
Read an object from a channel.
Definition: Channel.cc:52
int getIndent() const
Get Indent: indentation increment between objects.
Definition: Channel.h:96