Go to the documentation of this file.
22 #ifndef ASTSHIM_CMPMAP_H
23 #define ASTSHIM_CMPMAP_H
78 :
Mapping(reinterpret_cast<AstMapping *>(astCmpMap(const_cast<AstObject *>(map1.
getRawPtr()),
79 const_cast<AstObject *>(map2.
getRawPtr()),
80 series,
"%s", options.c_str()))) {
101 std::shared_ptr<Mapping>
operator[](
int i)
const {
return decompose<Mapping>(i,
false); };
108 return copyImpl<CmpMap, AstCmpMap>();
113 explicit CmpMap(AstCmpMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
115 std::ostringstream os;
116 os <<
"this is a " <<
getClassName() <<
", which is not a CmpMap";
117 throw std::invalid_argument(os.str());
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49
std::string getClassName() const
Definition: Object.h:139
CmpMap & operator=(CmpMap const &)=delete
virtual ~CmpMap()
Definition: CmpMap.h:84
CmpMap(AstCmpMap *rawptr)
Definition: CmpMap.h:113
std::shared_ptr< CmpMap > copy() const
Return a deep copy of this object.
Definition: CmpMap.h:93
AstObject const * getRawPtr() const
Definition: Object.h:292
bool isSeries(AstCmpMap const *cmpMap)
Definition: utils.cc:47
CmpMap(CmpMap &&)=default
bool getSeries()
Return True if the map is in series.
Definition: CmpMap.h:104
CmpMap(Mapping const &map1, Mapping const &map2, bool series, std::string const &options="")
Definition: CmpMap.h:77
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: CmpMap.h:107
std::shared_ptr< Mapping > operator[](int i) const
Definition: CmpMap.h:101
CmpMap & operator=(CmpMap &&)=default
CmpMap(CmpMap const &)=default
Copy constructor: make a deep copy.