LUMIERA.clone/src/lib/lumitime-fmt.hpp

71 lines
1.9 KiB
C++
Raw Normal View History

2009-07-11 19:23:20 +02:00
/*
2009-07-11 20:06:35 +02:00
LUMITIME-FMT.hpp - output and formatting of time(code) values
2009-07-11 19:23:20 +02:00
Copyright (C) Lumiera.org
2009-07-11 20:06:35 +02:00
2009, Hermann Vosseler <Ichthyostega@web.de>
2009-07-11 19:23:20 +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.
*/
2009-07-11 20:06:35 +02:00
/** @file lumitime-fmt.hpp
** Extension to the lumiera::Time wrapper, adding output and specific
** time formats. For now (7/09) this header serves the purpose to add
** the (not so lightweight) includes necessary for formatting. For later
** the intention is to have "format aware" time values (as a subclass),
** carrying the additional information about current framerate and
** other time-format preferences
**
** @todo this should be a mixed C/C++ header and really add the handling
** of multiple timecode-formats :-P
**
** @see time.h
** @see lumitime.hpp
**
*/
2009-07-11 19:23:20 +02:00
2009-07-11 20:06:35 +02:00
#ifndef LUMIERA_LUMITIME_FMT_H
#define LUMIERA_LUMITIME_FMT_H
#include "lib/lumitime.hpp"
2009-07-11 19:23:20 +02:00
extern "C" {
2009-07-11 20:06:35 +02:00
#include "lib/time.h"
2009-07-11 19:23:20 +02:00
}
2009-07-11 20:06:35 +02:00
#include <iostream>
2009-07-11 19:23:20 +02:00
namespace lumiera {
2009-07-11 20:06:35 +02:00
/** writes time value, formatted as HH:MM:SS:mmm
* @see lumiera_tmpbuf_print_time */
inline std::ostream&
operator<< (std::ostream& os, Time const& t)
2009-07-11 19:23:20 +02:00
{
2009-07-11 20:06:35 +02:00
return os << lumiera_tmpbuf_print_time(t);
}
2009-07-11 19:23:20 +02:00
} // namespace lumiera
#endif