22 #ifndef ASTSHIM_WINMAP_H 23 #define ASTSHIM_WINMAP_H 64 :
Mapping(reinterpret_cast<AstMapping *>(_makeRawWinMap(ina, inb, outa, outb,
options))) {}
79 return copyImpl<WinMap, AstWinMap>();
83 explicit WinMap(AstWinMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
86 os <<
"this is a " <<
getClassName() <<
", which is not a WinMap";
95 auto const ncoord = ina.
size();
96 if (inb.
size() != ncoord) {
98 os <<
"inb.size() = " << inb.
size() <<
" != " << ncoord <<
" = ina.size()";
101 if (outa.
size() != ncoord) {
103 os <<
"outa.size() = " << outa.
size() <<
" != " << ncoord <<
" = ina.size()";
106 if (outb.
size() != ncoord) {
108 os <<
"outb.size() = " << outb.
size() <<
" != " << ncoord <<
" = ina.size()";
111 auto result = astWinMap(static_cast<int>(ncoord), ina.
data(), inb.
data(), outa.
data(),
AstObject const * getRawPtr() const
Get the raw AST pointer.
WinMap(AstWinMap *rawptr)
Construct a WinMap from a raw AST pointer.
AST wrapper classes and functions.
WinMap(std::vector< double > const &ina, std::vector< double > const &inb, std::vector< double > const &outa, std::vector< double > const &outb, std::string const &options="")
Create a WinMap from the coordinates of two opposite corners (A and B) of the window in both the inpu...
std::string getClassName() const
Get Class: the name of the class (e.g.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
An abstract base class for objects which transform one set of coordinates to another.
WinMap & operator=(WinMap const &)=delete
A WinMap is a linear Mapping which transforms a rectangular window in one coordinate system into a si...
T static_pointer_cast(T... args)
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
std::shared_ptr< WinMap > copy() const
Return a deep copy of this object.
Abstract base class for all AST objects.