put asside the existing "lumitime" to build a new hierarchy from scratch
existing code will still use lumitime.hpp for now while we're about to reorganise time handling altogether
This commit is contained in:
parent
7a5ed1220d
commit
09d400d5bc
6 changed files with 32 additions and 34 deletions
|
|
@ -24,6 +24,8 @@
|
|||
#ifndef LIB_TIME_QUANTISER_H
|
||||
#define LIB_TIME_QUANTISER_H
|
||||
|
||||
#include "lib/time/timevalue.hpp"
|
||||
|
||||
//#include <boost/operators.hpp>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#ifndef LIB_TIME_TIMECODE_H
|
||||
#define LIB_TIME_TIMECODE_H
|
||||
|
||||
#include "lib/time/timevalue.hpp"
|
||||
|
||||
//#include <boost/operators.hpp>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ extern "C" {
|
|||
namespace lib {
|
||||
namespace time {
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/**
|
||||
* fixed format time specification.
|
||||
|
|
@ -45,15 +43,15 @@ namespace time {
|
|||
* @todo WIP-WIP-WIP
|
||||
*/
|
||||
class TimeValue
|
||||
: boost::totally_ordered<Time,
|
||||
boost::totally_ordered<Time, gavl_time_t> >
|
||||
: boost::totally_ordered<TimeValue,
|
||||
boost::totally_ordered<TimeValue, gavl_time_t> >
|
||||
{
|
||||
protected:
|
||||
gavl_time_t t_;
|
||||
|
||||
public:
|
||||
static const Time MAX ;
|
||||
static const Time MIN ;
|
||||
static const TimeValue MAX ;
|
||||
static const TimeValue MIN ;
|
||||
|
||||
explicit
|
||||
TimeValue (gavl_time_t val=0)
|
||||
|
|
@ -100,21 +98,21 @@ namespace time {
|
|||
/**
|
||||
* Lumiera's internal time value datatype
|
||||
*/
|
||||
//class Time
|
||||
// : public TimeValue
|
||||
// {
|
||||
// public:
|
||||
// explicit
|
||||
// Time (TimeValue val=0)
|
||||
// : TimeValue(val)
|
||||
// { }
|
||||
//
|
||||
// Time ( long millis
|
||||
// , uint secs
|
||||
// , uint mins =0
|
||||
// , uint hours=0
|
||||
// );
|
||||
// };
|
||||
class Time
|
||||
: public TimeValue
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
Time (TimeValue val= TimeValue(0))
|
||||
: TimeValue(val)
|
||||
{ }
|
||||
|
||||
Time ( long millis
|
||||
, uint secs
|
||||
, uint mins =0
|
||||
, uint hours=0
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
class Offset
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ namespace lib {
|
|||
namespace time{
|
||||
namespace test{
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/********************************************************
|
||||
* @test verify handling of grid aligned timecode values.
|
||||
|
|
@ -56,7 +54,7 @@ namespace test{
|
|||
{
|
||||
long refval= isnil(arg)? 1 : lexical_cast<long> (arg[1]);
|
||||
|
||||
Time ref (refval);
|
||||
TimeValue ref (refval);
|
||||
|
||||
checkBasics (ref);
|
||||
checkComparisons (ref);
|
||||
|
|
@ -65,13 +63,13 @@ namespace test{
|
|||
|
||||
|
||||
void
|
||||
checkBasics (Time const& ref)
|
||||
checkBasics (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
checkComparisons (Time const& ref)
|
||||
checkComparisons (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ namespace lib {
|
|||
namespace time{
|
||||
namespace test{
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/********************************************************
|
||||
* @test verify handling of time values, time intervals.
|
||||
|
|
@ -56,7 +54,7 @@ namespace test{
|
|||
{
|
||||
long refval= isnil(arg)? 1 : lexical_cast<long> (arg[1]);
|
||||
|
||||
Time ref (refval);
|
||||
TimeValue ref (refval);
|
||||
|
||||
checkBasics (ref);
|
||||
checkComparisons (ref);
|
||||
|
|
@ -65,13 +63,13 @@ namespace test{
|
|||
|
||||
|
||||
void
|
||||
checkBasics (Time const& ref)
|
||||
checkBasics (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
checkComparisons (Time const& ref)
|
||||
checkComparisons (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace test{
|
|||
{
|
||||
long refval= isnil(arg)? 1 : lexical_cast<long> (arg[1]);
|
||||
|
||||
Time ref (refval);
|
||||
TimeValue ref (refval);
|
||||
|
||||
checkBasics (ref);
|
||||
checkComparisons (ref);
|
||||
|
|
@ -63,13 +63,13 @@ namespace test{
|
|||
|
||||
|
||||
void
|
||||
checkBasics (Time const& ref)
|
||||
checkBasics (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
checkComparisons (Time const& ref)
|
||||
checkComparisons (TimeValue ref)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue