22 #ifndef ASTSHIM_CMPFRAME_H 23 #define ASTSHIM_CMPFRAME_H 29 #include "astshim/base.h" 30 #include "astshim/Frame.h" 75 :
Frame(reinterpret_cast<AstFrame *>(astCmpFrame(const_cast<AstObject *>(frame1.
getRawPtr()),
76 const_cast<AstObject *>(frame2.
getRawPtr()),
77 "%s", options.c_str()))) {}
95 std::shared_ptr<Frame>
operator[](
int i)
const {
return decompose<Frame>(i,
false); }
99 return copyImpl<CmpFrame, AstCmpFrame>();
104 explicit CmpFrame(AstCmpFrame *rawptr) :
Frame(reinterpret_cast<AstFrame *>(rawptr)) {
106 std::ostringstream os;
107 os <<
"this is a " <<
getClassName() <<
", which is not a CmpFrame";
108 throw std::invalid_argument(os.str());
Definition: CmpFrame.h:60
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: CmpFrame.h:98
AstObject const * getRawPtr() const
Definition: Object.h:286
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
CmpFrame(Frame const &frame1, Frame const &frame2, std::string const &options="")
Definition: CmpFrame.h:74
std::string getClassName() const
Definition: Object.h:133
CmpFrame(AstCmpFrame *rawptr)
Definition: CmpFrame.h:104
std::shared_ptr< CmpFrame > copy() const
Return a deep copy of this object.
Definition: CmpFrame.h:87
std::shared_ptr< Frame > operator[](int i) const
Definition: CmpFrame.h:95