fix compilation problems with draft code
This commit is contained in:
parent
c1be39eacb
commit
784b094fa7
4 changed files with 39 additions and 32 deletions
|
|
@ -36,6 +36,8 @@ extern "C" {
|
|||
namespace lib {
|
||||
namespace time {
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/**
|
||||
* fixed format time specification.
|
||||
|
|
@ -46,6 +48,7 @@ namespace time {
|
|||
: boost::totally_ordered<Time,
|
||||
boost::totally_ordered<Time, gavl_time_t> >
|
||||
{
|
||||
protected:
|
||||
gavl_time_t t_;
|
||||
|
||||
public:
|
||||
|
|
@ -62,11 +65,11 @@ namespace time {
|
|||
operator gavl_time_t () const { return t_; }
|
||||
|
||||
// Supporting totally_ordered
|
||||
friend bool operator< (Time const& t1, Time const& t2) { return t1.t_ < t2.t_; }
|
||||
friend bool operator< (Time const& t1, gavl_time_t t2) { return t1.t_ < t2 ; }
|
||||
friend bool operator> (Time const& t1, gavl_time_t t2) { return t1.t_ > t2 ; }
|
||||
friend bool operator== (Time const& t1, Time const& t2) { return t1.t_ == t2.t_; }
|
||||
friend bool operator== (Time const& t1, gavl_time_t t2) { return t1.t_ == t2 ; }
|
||||
friend bool operator< (TimeValue const& t1, TimeValue const& t2) { return t1.t_ < t2.t_; }
|
||||
friend bool operator< (TimeValue const& t1, gavl_time_t t2) { return t1.t_ < t2 ; }
|
||||
friend bool operator> (TimeValue const& t1, gavl_time_t t2) { return t1.t_ > t2 ; }
|
||||
friend bool operator== (TimeValue const& t1, TimeValue const& t2) { return t1.t_ == t2.t_; }
|
||||
friend bool operator== (TimeValue const& t1, gavl_time_t t2) { return t1.t_ == t2 ; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -97,21 +100,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=0)
|
||||
// : TimeValue(val)
|
||||
// { }
|
||||
//
|
||||
// Time ( long millis
|
||||
// , uint secs
|
||||
// , uint mins =0
|
||||
// , uint hours=0
|
||||
// );
|
||||
// };
|
||||
|
||||
|
||||
class Offset
|
||||
|
|
@ -128,9 +131,9 @@ namespace time {
|
|||
inline Offset
|
||||
operator- (Time const& end, Time const& start)
|
||||
{
|
||||
TimeVar distance(end);
|
||||
distance -= start;
|
||||
return Offset(distance);
|
||||
// TimeVar distance(end);
|
||||
// distance -= start;
|
||||
// return Offset(distance);
|
||||
}
|
||||
|
||||
typedef const Offset TimeDistance;
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
#include "lib/time/timecode.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
//#include <boost/lexical_cast.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
//#include <iostream>
|
||||
//#include <cstdlib>
|
||||
|
||||
//using boost::lexical_cast;
|
||||
//using util::isnil;
|
||||
using boost::lexical_cast;
|
||||
using util::isnil;
|
||||
//using std::rand;
|
||||
//using std::cout;
|
||||
//using std::endl;
|
||||
|
|
@ -40,6 +40,8 @@ namespace lib {
|
|||
namespace time{
|
||||
namespace test{
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/********************************************************
|
||||
* @test verify handling of grid aligned timecode values.
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
#include "lib/time/quantiser.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
//#include <boost/lexical_cast.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
//#include <iostream>
|
||||
//#include <cstdlib>
|
||||
|
||||
//using boost::lexical_cast;
|
||||
//using util::isnil;
|
||||
using boost::lexical_cast;
|
||||
using util::isnil;
|
||||
//using std::rand;
|
||||
//using std::cout;
|
||||
//using std::endl;
|
||||
|
|
@ -40,6 +40,8 @@ namespace lib {
|
|||
namespace time{
|
||||
namespace test{
|
||||
|
||||
using lumiera::Time;
|
||||
|
||||
|
||||
/********************************************************
|
||||
* @test verify handling of time values, time intervals.
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
#include "lib/time/timevalue.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
//#include <boost/lexical_cast.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
//#include <iostream>
|
||||
//#include <cstdlib>
|
||||
|
||||
//using boost::lexical_cast;
|
||||
//using util::isnil;
|
||||
using boost::lexical_cast;
|
||||
using util::isnil;
|
||||
//using std::rand;
|
||||
//using std::cout;
|
||||
//using std::endl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue