37 :
Object(reinterpret_cast<AstObject *>(chan)), _stream(stream) {
39 _stream.setIsFits(isFits);
46 if (_stream.hasStdStream()) {
53 AstObject *rawRet =
reinterpret_cast<AstObject *
>(astRead(
getRawPtr()));
68 AstKeyMap *rawKeyMap =
69 reinterpret_cast<AstKeyMap *
>(astWarnings(
reinterpret_cast<AstChannel
const *
>(
getRawPtr())));
KeyMap warnings() const
Return a KeyMap holding the text of any warnings issued as a result of the previous invocation of rea...
Channel(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
std::shared_ptr< Object > read()
Read an object from a channel.
int write(Object const &object)
Write an object to a channel.
KeyMap is used to store a set of values with associated keys which identify the values.
static std::shared_ptr< Class > fromAstObject(AstObject *rawObj, bool copy)
Given a bare AST object pointer return a shared pointer to an ast::Object of the correct type.
AstObject const * getRawPtr() const
Get the raw AST pointer.
A stream for ast::Channel.
AST wrapper classes and functions.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.