2007-08-08 04:50:02 +02:00
|
|
|
/*
|
|
|
|
|
TIME.hpp - unified representation of a time point, including conversion functions
|
|
|
|
|
|
|
|
|
|
Copyright (C) CinelerraCV
|
2007-11-27 03:19:35 +01:00
|
|
|
2007, Hermann Vosseler <Ichthyostega@web.de>
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CINELERRA_TIME_H
|
|
|
|
|
#define CINELERRA_TIME_H
|
|
|
|
|
|
2007-11-12 02:05:39 +01:00
|
|
|
#include <boost/operators.hpp>
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace cinelerra
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* denotes a temporal position (time point), based on timeline start.
|
|
|
|
|
*
|
2007-09-27 04:45:06 +02:00
|
|
|
* @todo currently (9/07) this is a dummy implementation to find out
|
|
|
|
|
* what interface the Proc layer needs. Cehteh has already written
|
|
|
|
|
* elaborate timehandling functions in the backend and the goal
|
|
|
|
|
* is for class Time to be just a thin wrapper!
|
2007-08-08 04:50:02 +02:00
|
|
|
*/
|
2007-11-12 02:05:39 +01:00
|
|
|
class Time : boost::totally_ordered<Time>
|
2007-09-27 04:45:06 +02:00
|
|
|
{
|
2007-10-22 05:15:08 +02:00
|
|
|
long dummy;
|
2007-09-27 04:45:06 +02:00
|
|
|
public:
|
2007-10-22 05:15:08 +02:00
|
|
|
Time(long dum=0) : dummy(dum) {}
|
|
|
|
|
operator long () { return dummy; }
|
2007-11-12 02:05:39 +01:00
|
|
|
|
|
|
|
|
bool operator< (const Time& ot) const { return dummy < ot.dummy; }
|
|
|
|
|
bool operator== (const Time& ot) const { return dummy == ot.dummy; }
|
|
|
|
|
|
|
|
|
|
static const Time MAX ;
|
|
|
|
|
static const Time MIN ;
|
2007-09-27 04:45:06 +02:00
|
|
|
};
|
2007-11-12 02:05:39 +01:00
|
|
|
|
|
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2007-11-12 02:05:39 +01:00
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
} // namespace cinelerra
|
|
|
|
|
#endif
|