22#ifndef ASTSHIM_UNITMAP_H
23#define ASTSHIM_UNITMAP_H
55 :
Mapping(reinterpret_cast<AstMapping *>(astUnitMap(ncoord,
"%s", options.c_str()))) {
72 return copyImpl<UnitMap, AstUnitMap>();
76 explicit UnitMap(AstUnitMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
79 os <<
"this is a " <<
getClassName() <<
", which is not a UnitMap";
An abstract base class for objects which transform one set of coordinates to another.
Abstract base class for all AST objects.
std::string getClassName() const
Get Class: the name of the class (e.g.
AstObject const * getRawPtr() const
Get the raw AST pointer.
A UnitMap is a unit (null) Mapping that has no effect on the coordinates supplied to it.
UnitMap & operator=(UnitMap &&)=default
UnitMap(UnitMap const &)=default
Copy constructor: make a deep copy.
UnitMap(int ncoord, std::string const &options="")
Construct a UnitMap.
UnitMap(UnitMap &&)=default
UnitMap(AstUnitMap *rawptr)
Construct a UnitMap from a raw AST pointer.
std::shared_ptr< UnitMap > copy() const
Return a deep copy of this object.
UnitMap & operator=(UnitMap const &)=delete
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
AST wrapper classes and functions.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.