22 #ifndef ASTSHIM_UNITMAP_H
23 #define ASTSHIM_UNITMAP_H
27 #include "astshim/base.h"
28 #include "astshim/Mapping.h"
53 explicit UnitMap(
int ncoord, std::string
const & options=
"") :
54 Mapping(reinterpret_cast<AstMapping *>(astUnitMap(ncoord, options.c_str())))
65 std::shared_ptr<UnitMap>
copy()
const {
71 return _copyImpl<UnitMap, AstUnitMap>();
76 Mapping(reinterpret_cast<AstMapping *>(rawptr))
79 std::ostringstream os;
80 os <<
"this is a " <<
getClass() <<
", which is not a UnitMap";
81 throw std::invalid_argument(os.str());
std::shared_ptr< UnitMap > copy() const
Return a deep copy of this object.
Definition: UnitMap.h:65
std::string getClass() const
Definition: Object.h:117
virtual std::shared_ptr< Object > _copyPolymorphic() const override
Definition: UnitMap.h:70
UnitMap(AstUnitMap *rawptr)
Construct a UnitMap from a raw AST pointer.
Definition: UnitMap.h:75
UnitMap(int ncoord, std::string const &options="")
Definition: UnitMap.h:53
AstObject const * getRawPtr() const
Definition: Object.h:260