22 #ifndef ASTSHIM_RATEMAP_H
23 #define ASTSHIM_RATEMAP_H
27 #include "astshim/base.h"
28 #include "astshim/Mapping.h"
70 explicit RateMap(
Mapping const &map,
int ax1,
int ax2, std::string
const &options =
"")
71 :
Mapping(reinterpret_cast<AstMapping *>(
72 astRateMap(const_cast<AstObject *>(map.
getRawPtr()), ax1, ax2, options.c_str()))) {}
82 std::shared_ptr<RateMap>
copy()
const {
88 return _copyImpl<RateMap, AstRateMap>();
93 Mapping(reinterpret_cast<AstMapping *>(rawptr))
96 std::ostringstream os;
97 os <<
"this is a " <<
getClass() <<
", which is not a RateMap";
98 throw std::invalid_argument(os.str());
RateMap(Mapping const &map, int ax1, int ax2, std::string const &options="")
Definition: RateMap.h:70
std::string getClass() const
Definition: Object.h:117
std::shared_ptr< RateMap > copy() const
Return a deep copy of this object.
Definition: RateMap.h:82
virtual std::shared_ptr< Object > _copyPolymorphic() const override
Definition: RateMap.h:87
RateMap(AstRateMap *rawptr)
Construct a RateMap from a raw AST pointer.
Definition: RateMap.h:92
AstObject const * getRawPtr() const
Definition: Object.h:260