32 :
Channel(astChannel(detail::
source, detail::
sink,
"%s", options.c_str()), stream) {
37 :
Object(reinterpret_cast<AstObject *>(chan)), _stream(stream) {
53 AstObject *rawRet =
reinterpret_cast<AstObject *
>(astRead(
getRawPtr()));
58 return Object::fromAstObject<Object>(rawRet,
false);
68 AstKeyMap *rawKeyMap =
69 reinterpret_cast<AstKeyMap *
>(astWarnings(reinterpret_cast<AstChannel const *>(
getRawPtr())));
71 return rawKeyMap ?
KeyMap(rawKeyMap) : KeyMap();
void sink(const char *cstr)
Sink function that allows astChannel to sink to a Stream.
KeyMap is used to store a set of values with associated keys which identify the values.
AstObject const * getRawPtr() const
Get the raw AST pointer.
void setIsFits(bool isFits)
set isFits
bool hasStdStream()
Return true if this Stream has an input or output std::stream.
AST wrapper classes and functions.
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.
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...
int write(Object const &object)
Write an object to a channel.
const char * source()
Source function that allows astChannel to source from a Stream.
Abstract base class for all AST objects.
std::shared_ptr< Object > read()
Read an object from a channel.
A stream for ast::Channel.