22 #ifndef ASTSHIM_SHIFTMAP_H 23 #define ASTSHIM_SHIFTMAP_H 49 explicit ShiftMap(std::vector<double>
const &shift, std::string
const &options =
"")
50 :
Mapping(reinterpret_cast<AstMapping *>(
51 astShiftMap(shift.size(), shift.data(),
"%s", options.c_str()))) {}
66 return copyImpl<ShiftMap, AstShiftMap>();
70 explicit ShiftMap(AstShiftMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
72 std::ostringstream os;
73 os <<
"this is a " <<
getClassName() <<
", which is not a ShiftMap";
74 throw std::invalid_argument(os.str());
AstObject const * getRawPtr() const
Definition: Object.h:291
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: ShiftMap.h:65
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
std::string getClassName() const
Definition: Object.h:138
Definition: ShiftMap.h:40
virtual ~ShiftMap()
Definition: ShiftMap.h:53
ShiftMap(std::vector< double > const &shift, std::string const &options="")
Definition: ShiftMap.h:49
ShiftMap(AstShiftMap *rawptr)
Construct a ShiftMap from a raw AST pointer.
Definition: ShiftMap.h:70
ShiftMap & operator=(ShiftMap const &)=delete
std::shared_ptr< ShiftMap > copy() const
Return a deep copy of this object.
Definition: ShiftMap.h:62