synfig::Time Class Reference

#include <time.h>

List of all members.

Public Types

enum  Format {
  FORMAT_NORMAL = 0, FORMAT_NOSPACES = (1<<0), FORMAT_FULL = (1<<1), FORMAT_VIDEO = (1<<2),
  FORMAT_FRAMES = (1<<3), FORMAT_END = (1<<4)
}
typedef double value_type

Public Member Functions

 Time ()
 Time (const value_type &x)
 Time (int x)
 Time (int hour, int minute, float second)
 Time (const String &string, float fps=0)
 Constructs Time from the given string.
String get_string (float fps=0, Time::Format format=FORMAT_NORMAL) const
 Returns a string describing the current time value.
bool is_valid () const
Time round (float fps) const
 Rounds time to the nearest frame for the given frame rate, fps.
bool is_equal (const Time &rhs) const
bool is_less_than (const Time &rhs) const
bool is_more_than (const Time &rhs) const
 operator double () const
template<typename U>
bool operator< (const U &rhs) const
template<typename U>
bool operator> (const U &rhs) const
template<typename U>
bool operator<= (const U &rhs) const
template<typename U>
bool operator>= (const U &rhs) const
template<typename U>
bool operator== (const U &rhs) const
template<typename U>
bool operator!= (const U &rhs) const
bool operator< (const Time &rhs) const
bool operator> (const Time &rhs) const
bool operator<= (const Time &rhs) const
bool operator>= (const Time &rhs) const
bool operator== (const Time &rhs) const
bool operator!= (const Time &rhs) const
template<typename U>
const Timeoperator+= (const U &rhs)
template<typename U>
const Timeoperator-= (const U &rhs)
template<typename U>
const Timeoperator*= (const U &rhs)
template<typename U>
const Timeoperator/= (const U &rhs)
template<typename U>
Time operator+ (const U &rhs) const
template<typename U>
Time operator- (const U &rhs) const
template<typename U>
Time operator* (const U &rhs) const
template<typename U>
Time operator/ (const U &rhs) const
Time operator- () const

Static Public Member Functions

static const Time begin ()
 Marks the exclusive negative boundary of time.
static const Time end ()
 Marks the exclusive positive boundary of time.
static const Time zero ()
 Marks zero time.
static const Time epsilon ()
 The amount of allowable error in calculations.


Detailed Description

Todo:
writeme
See also:
TimeFormat, time_to_string(), string_to_time()

Member Typedef Documentation

typedef double synfig::Time::value_type


Member Enumeration Documentation

Todo:
writeme
See also:
Time, get_string()
Enumerator:
FORMAT_NORMAL  Represents the default method of printing the time.
FORMAT_NOSPACES  Remove any whitespace.
FORMAT_FULL  Do not remove units that have "zero" value.
FORMAT_VIDEO  Use the HH:MM:SS.FF format.
FORMAT_FRAMES  Use the FF format (frames only).
FORMAT_END 

For internal use only.

Not used


Constructor & Destructor Documentation

synfig::Time::Time (  )  [inline]

synfig::Time::Time ( const value_type x  )  [inline]

synfig::Time::Time ( int  x  )  [inline]

synfig::Time::Time ( int  hour,
int  minute,
float  second 
) [inline]

Time::Time ( const String string,
float  fps = 0 
)

Constructs Time from the given string.

Note:
If the string references frames, then the frame rate (fps) should be provided from the correct source. (Which is most likely the RendDesc of the current Canvas) The frame count will be ignored if the FPS is not given.

References begin(), end(), tolower, and synfig::warning().


Member Function Documentation

static const Time synfig::Time::begin (  )  [inline, static]

static const Time synfig::Time::end (  )  [inline, static]

static const Time synfig::Time::zero (  )  [inline, static]

Marks zero time.

static const Time synfig::Time::epsilon (  )  [inline, static]

The amount of allowable error in calculations.

Referenced by synfig::KeyframeList::find_prev().

String Time::get_string ( float  fps = 0,
Time::Format  format = FORMAT_NORMAL 
) const

bool Time::is_valid (  )  const

Todo:
This needs to be documented further.
Todo:
This needs to be documented further.

Time Time::round ( float  fps  )  const

Rounds time to the nearest frame for the given frame rate, fps.

References std::abs().

bool synfig::Time::is_equal ( const Time rhs  )  const [inline]

bool synfig::Time::is_less_than ( const Time rhs  )  const [inline]

bool synfig::Time::is_more_than ( const Time rhs  )  const [inline]

synfig::Time::operator double (  )  const [inline]

template<typename U>
bool synfig::Time::operator< ( const U &  rhs  )  const [inline]

template<typename U>
bool synfig::Time::operator> ( const U &  rhs  )  const [inline]

template<typename U>
bool synfig::Time::operator<= ( const U &  rhs  )  const [inline]

template<typename U>
bool synfig::Time::operator>= ( const U &  rhs  )  const [inline]

template<typename U>
bool synfig::Time::operator== ( const U &  rhs  )  const [inline]

template<typename U>
bool synfig::Time::operator!= ( const U &  rhs  )  const [inline]

bool synfig::Time::operator< ( const Time rhs  )  const [inline]

References is_less_than().

bool synfig::Time::operator> ( const Time rhs  )  const [inline]

References is_more_than().

bool synfig::Time::operator<= ( const Time rhs  )  const [inline]

References is_equal(), and is_less_than().

bool synfig::Time::operator>= ( const Time rhs  )  const [inline]

References is_equal(), and is_more_than().

bool synfig::Time::operator== ( const Time rhs  )  const [inline]

References is_equal().

bool synfig::Time::operator!= ( const Time rhs  )  const [inline]

References is_equal().

template<typename U>
const Time& synfig::Time::operator+= ( const U &  rhs  )  [inline]

template<typename U>
const Time& synfig::Time::operator-= ( const U &  rhs  )  [inline]

template<typename U>
const Time& synfig::Time::operator*= ( const U &  rhs  )  [inline]

template<typename U>
const Time& synfig::Time::operator/= ( const U &  rhs  )  [inline]

template<typename U>
Time synfig::Time::operator+ ( const U &  rhs  )  const [inline]

template<typename U>
Time synfig::Time::operator- ( const U &  rhs  )  const [inline]

template<typename U>
Time synfig::Time::operator* ( const U &  rhs  )  const [inline]

template<typename U>
Time synfig::Time::operator/ ( const U &  rhs  )  const [inline]

Time synfig::Time::operator- (  )  const [inline]


The documentation for this class was generated from the following files:

Generated on Fri Jul 31 00:01:59 2009 for synfig-core by  doxygen 1.5.6