lsst.astshim
21.0.0-2-g45278ab+4fcf437b75
|
Go to the documentation of this file.
22 #ifndef ASTSHIM_TIMEMAP_H
23 #define ASTSHIM_TIMEMAP_H
56 explicit TimeMap(std::string
const &options =
"")
57 :
Mapping(reinterpret_cast<AstMapping *>(astTimeMap(0,
"%s", options.c_str()))) {
70 std::shared_ptr<TimeMap>
copy()
const {
return std::static_pointer_cast<TimeMap>(
copyPolymorphic()); }
183 void add(std::string
const &cvt, std::vector<double>
const &args) {
184 astTimeAdd(
getRawPtr(), cvt.c_str(), args.size(), args.data());
190 return copyImpl<TimeMap, AstTimeMap>();
194 explicit TimeMap(AstTimeMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
196 std::ostringstream os;
197 os <<
"this is a " <<
getClassName() <<
", which is not a TimeMap";
198 throw std::invalid_argument(os.str());
virtual ~TimeMap()
Definition: TimeMap.h:61
std::shared_ptr< TimeMap > copy() const
Return a deep copy of this object.
Definition: TimeMap.h:70
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49
TimeMap(TimeMap const &)=default
Copy constructor: make a deep copy.
void add(std::string const &cvt, std::vector< double > const &args)
Definition: TimeMap.h:183
TimeMap(std::string const &options="")
Definition: TimeMap.h:56
TimeMap(TimeMap &&)=default
std::string getClassName() const
Definition: Object.h:139
TimeMap(AstTimeMap *rawptr)
Construct a TimeMap from a raw AST pointer.
Definition: TimeMap.h:194
TimeMap & operator=(TimeMap const &)=delete
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: TimeMap.h:189
AstObject const * getRawPtr() const
Definition: Object.h:292
TimeMap & operator=(TimeMap &&)=default