22 #ifndef ASTSHIM_TIMEFRAME_H 23 #define ASTSHIM_TIMEFRAME_H 90 :
Frame(reinterpret_cast<AstFrame *>(astTimeFrame(
"%s",
options.c_str()))) {
155 return copyImpl<TimeFrame, AstTimeFrame>();
159 explicit TimeFrame(AstTimeFrame *rawptr) :
Frame(reinterpret_cast<AstFrame *>(rawptr)) {
162 os <<
"this is a " <<
getClassName() <<
", which is not a TimeFrame";
double getLTOffset() const
Get LTOffset: the offset of Local Time from UTC, in hours.
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
AstObject const * getRawPtr() const
Get the raw AST pointer.
TimeFrame & operator=(TimeFrame const &)=delete
TimeFrame(AstTimeFrame *rawptr)
Construct a TimeFrame from a raw AST pointer.
AST wrapper classes and functions.
std::string getAlignTimeScale() const
Get AlignTimeScale: time scale in which to align TimeFrames.
std::string getClassName() const
Get Class: the name of the class (e.g.
def scale(algorithm, min, max=None, frame=None)
double currentTime() const
Get the current system time.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
std::string getTimeScale() const
Get TimeScale: the timescale used by the TimeFrame.
void setTimeOrigin(double origin)
Set TimeOrigin: the zero point for TimeFrame axis values.
Frame is used to represent a coordinate system.
void setC(std::string const &attrib, std::string const &value)
Set the value of an attribute as a string.
void setAlignTimeScale(std::string const &scale)
Set AlignTimeScale: time scale in which to align TimeFrames.
T static_pointer_cast(T... args)
PointD offset(PointD point1, PointD point2, double offset) const
Find the point which is offset a specified distance along the geodesic curve between two other points...
void setLTOffset(double offset)
Set LTOffset: the offset of Local Time from UTC, in hours.
TimeFrame(std::string const &options="")
Construct a TimeFrame.
double getTimeOrigin() const
Get TimeOrigin: the zero point for TimeFrame axis values.
void setD(std::string const &attrib, double value)
Set the value of an attribute as a double.
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
double safeDouble(double val)
Return a double value after checking status and replacing AST__BAD with nan
std::string const getC(std::string const &attrib) const
Get the value of an attribute as a string.
A TimeFrame is a specialised form of one-dimensional Frame which represents various coordinate system...
Abstract base class for all AST objects.
std::shared_ptr< TimeFrame > copy() const
Return a deep copy of this object.
void setTimeScale(std::string const &scale)
Set TimeScale: the timescale used by the TimeFrame.