22 #ifndef ASTSHIM_SHIFTMAP_H
23 #define ASTSHIM_SHIFTMAP_H
28 #include "astshim/base.h"
29 #include "astshim/Mapping.h"
48 explicit ShiftMap(std::vector<double>
const & shift, std::string
const & options=
"") :
49 Mapping(reinterpret_cast<AstMapping *>(astShiftMap(shift.size(), shift.data(), options.c_str())))
60 std::shared_ptr<ShiftMap>
copy()
const {
66 return _copyImpl<ShiftMap, AstShiftMap>();
71 Mapping(reinterpret_cast<AstMapping *>(rawptr))
74 std::ostringstream os;
75 os <<
"this is a " <<
getClass() <<
", which is not a ShiftMap";
76 throw std::invalid_argument(os.str());
virtual std::shared_ptr< Object > _copyPolymorphic() const override
Definition: ShiftMap.h:65
ShiftMap(AstShiftMap *rawptr)
Construct a ShiftMap from a raw AST pointer.
Definition: ShiftMap.h:70
std::string getClass() const
Definition: Object.h:117
Definition: ShiftMap.h:40
ShiftMap(std::vector< double > const &shift, std::string const &options="")
Definition: ShiftMap.h:48
std::shared_ptr< ShiftMap > copy() const
Return a deep copy of this object.
Definition: ShiftMap.h:60
AstObject const * getRawPtr() const
Definition: Object.h:260