Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shevek_relative_time(3) [debian man page]

shevek::relative_time(3)				     Library Functions Manual					  shevek::relative_time(3)

NAME
shevek::relative_time - Time interval. SYNOPSIS
#include <time.hh> Public Member Functions relative_time () The default constructor creates an interval of 0. relative_time (timetype days, int hours, int minutes, int seconds, int nanoseconds=0) Construct an interval of a given size. relative_time (timetype seconds, unsigned nanoseconds) Fast constructor. relative_time operator+ (relative_time that) const Add two intervals. absolute_time operator+ (absolute_time that) const Add an interval to a moment. relative_time operator- (relative_time that) const Subtract two intervals. relative_time operator- () const Negate an interval. relative_time operator* (float c) const Scale an interval. relative_time operator/ (float c) const Scale an interval. relative_time operator% (relative_time that) const Modulo operator for two intervals. double operator/ (relative_time that) const Division of two intervals. relative_time & operator+= (relative_time that) Add an interval. relative_time & operator-= (relative_time that) Subtract an interval. relative_time & operator*= (float c) Scale the interval. relative_time & operator/= (float c) Scale the interval. relative_time & operator%= (relative_time that) Modulo. bool operator< (relative_time that) const Compare with another interval. bool operator> (relative_time that) const Compare with another interval. bool operator<= (relative_time that) const Compare with another interval. bool operator>= (relative_time that) const Compare with another interval. bool operator== (relative_time that) const bool operator!= (relative_time that) const unsigned nanoseconds () const Number of nanoseconds. unsigned seconds () const Number of seconds. unsigned minutes () const Number of minutes. unsigned hours () const Number of hours. unsigned days () const Number of days. bool isnegative () const Is this a negative interval? timetype total () const Total number of seconds, as encoded. Static Public Member Functions static void set_digits (unsigned num) Set number of digits to use when printing (for fractions of seconds). static unsigned get_digits () Get the number of digits that is used when printing. Friends std::ostream & operator<< (std::ostream &s, relative_time t) Write the interval to a std::ostream. Detailed Description Time interval. Constructor &; Destructor Documentation shevek::relative_time::relative_time (timetypeseconds, unsignednanoseconds) Fast constructor. This directly fills the members and is therefore slightly faster than the other constructors. However, the others aren't really slow either. Member Function Documentation bool shevek::relative_time::operator!= (relative_timethat) const Compare two intervals. Note that this is rarely a useful operation, because minor errors may be introduced by computations. bool shevek::relative_time::operator== (relative_timethat) const Compare two intervals. Note that this is rarely a useful operation, because minor errors may be introduced by computations. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::relative_time(3)

Check Out this Related Man Page

QwtDoubleInterval(3)						 Qwt User's Guide					      QwtDoubleInterval(3)

NAME
QwtDoubleInterval - A class representing an interval. SYNOPSIS
#include <qwt_double_interval.h> Public Types enum BorderMode { IncludeBorders = 0, ExcludeMinimum = 1, ExcludeMaximum = 2, ExcludeBorders = ExcludeMinimum | ExcludeMaximum } Public Member Functions int borderFlags () const bool contains (double value) const QwtDoubleInterval extend (double value) const QwtDoubleInterval intersect (const QwtDoubleInterval &) const bool intersects (const QwtDoubleInterval &) const void invalidate () QwtDoubleInterval inverted () const bool isNull () const bool isValid () const QwtDoubleInterval limited (double minValue, double maxValue) const double maxValue () const double minValue () const QwtDoubleInterval normalized () const int operator!= (const QwtDoubleInterval &) const QwtDoubleInterval operator& (const QwtDoubleInterval &) const QwtDoubleInterval & operator&= (const QwtDoubleInterval &) int operator== (const QwtDoubleInterval &) const QwtDoubleInterval operator| (double) const QwtDoubleInterval operator| (const QwtDoubleInterval &) const QwtDoubleInterval & operator|= (double) QwtDoubleInterval & operator|= (const QwtDoubleInterval &) QwtDoubleInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) QwtDoubleInterval () void setBorderFlags (int) void setInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) void setMaxValue (double) void setMinValue (double) QwtDoubleInterval symmetrize (double value) const QwtDoubleInterval unite (const QwtDoubleInterval &) const double width () const Detailed Description A class representing an interval. The interval is represented by 2 doubles, the lower and the upper limit. Member Enumeration Documentation enum QwtDoubleInterval::BorderMode Flag indicating if a border is included/excluded from an interval o IncludeBorders min/max values are inside the interval o ExcludeMinimum min value is not included in the interval o ExcludeMaximum max value is not included in the interval o ExcludeBorders min/max values are not included in the interval See also: setBorderMode(), testBorderMode() Constructor &; Destructor Documentation QwtDoubleInterval::QwtDoubleInterval () [inline] Default Constructor. Creates an invalid interval [0.0, -1.0] See also: setInterval(), isValid() QwtDoubleInterval::QwtDoubleInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Constructor Build an interval with from min/max values Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders Member Function Documentation int QwtDoubleInterval::borderFlags () const [inline] Returns: Border flags See also: setBorderFlags() bool QwtDoubleInterval::contains (doublevalue) const Test if a value is inside an interval Parameters: value Value Returns: true, if value >= minValue() && value <= maxValue() QwtDoubleInterval QwtDoubleInterval::extend (doublevalue) const Extend the interval If value is below minValue, value becomes the lower limit. If value is above maxValue, value becomes the upper limit. extend has no effect for invalid intervals Parameters: value Value See also: isValid() QwtDoubleInterval QwtDoubleInterval::intersect (const QwtDoubleInterval &other) const Intersect 2 intervals. bool QwtDoubleInterval::intersects (const QwtDoubleInterval &other) const Test if two intervals overlap void QwtDoubleInterval::invalidate () [inline] Invalidate the interval The limits are set to interval [0.0, -1.0] See also: isValid() QwtDoubleInterval QwtDoubleInterval::inverted () const Invert the limits of the interval Returns: Inverted interval See also: normalized() bool QwtDoubleInterval::isNull () const [inline] Returns: true, if isValid() && (minValue() >= maxValue()) bool QwtDoubleInterval::isValid () const [inline] A interval is valid when minValue() <= maxValue(). In case of QwtDoubleInterval::ExcludeBorders it is true when minValue() < maxValue() QwtDoubleInterval QwtDoubleInterval::limited (doublelowerBound, doubleupperBound) const Limit the interval, keeping the border modes Parameters: lowerBound Lower limit upperBound Upper limit Returns: Limited interval double QwtDoubleInterval::maxValue () const [inline] Returns: Upper limit of the interval double QwtDoubleInterval::minValue () const [inline] Returns: Lower limit of the interval QwtDoubleInterval QwtDoubleInterval::normalized () const Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted. Returns: Normalized interval See also: isValid(), inverted() int QwtDoubleInterval::operator!= (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator& (const QwtDoubleInterval &interval) const [inline] Intersection of two intervals See also: intersect() QwtDoubleInterval & QwtDoubleInterval::operator&= (const QwtDoubleInterval &interval) Intersects this interval with the given interval. int QwtDoubleInterval::operator== (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator| (const QwtDoubleInterval &interval) const [inline] Union of two intervals See also: unite() QwtDoubleInterval QwtDoubleInterval::operator| (doublevalue) const [inline] Extend an interval See also: extend() QwtDoubleInterval & QwtDoubleInterval::operator|= (const QwtDoubleInterval &interval) Unites this interval with the given interval. void QwtDoubleInterval::setBorderFlags (intborderFlags) [inline] Change the border flags Parameters: borderFlags Or'd BorderMode flags See also: borderFlags() void QwtDoubleInterval::setInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Assign the limits of the interval Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders void QwtDoubleInterval::setMaxValue (doublemaxValue) [inline] Assign the upper limit of the interval Parameters: maxValue Maximum value void QwtDoubleInterval::setMinValue (doubleminValue) [inline] Assign the lower limit of the interval Parameters: minValue Minimum value QwtDoubleInterval QwtDoubleInterval::symmetrize (doublevalue) const Adjust the limit that is closer to value, so that value becomes the center of the interval. Parameters: value Center Returns: Interval with value as center QwtDoubleInterval QwtDoubleInterval::unite (const QwtDoubleInterval &other) const Unite 2 intervals. double QwtDoubleInterval::width () const [inline] Return the width of an interval The width of invalid intervals is 0.0, otherwise the result is maxValue() - minValue(). See also: isValid() Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtDoubleInterval(3)
Man Page