BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/eformat/include/eformat/DateAndTime.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
3
/**
4
* @file eformat/DateAndTime.h
5
* @author <a href="mailto:Andre.dos.Anjos@cern.ch">Andre DOS ANJOS</a>
6
* $Author: zhangy $
7
* $Revision: 1.1.1.1 $
8
* $Date: 2009/06/19 07:35:41 $
9
*
10
* @brief Describes how to create and interpret a date and time field.
11
*/
12
13
#ifndef EFORMAT_HELPER_DATEANDTIME_H
14
#define EFORMAT_HELPER_DATEANDTIME_H
15
16
#include <stdint.h>
17
#include <string>
18
19
namespace
eformat
{
20
21
namespace
helper
{
22
23
/**
24
* Interprets and composes a date and time field (32-bit unsigned integer)
25
*/
26
class
DateAndTime
{
27
28
public
:
// interface
29
/**
30
* Default constructor, it means, now
31
*/
32
DateAndTime
();
33
34
/**
35
* Build from an existing date in time
36
*
37
* @param val The value of the compiled date and time field
38
*/
39
DateAndTime
( uint32_t val );
40
41
/**
42
* Get the current representation
43
*/
44
inline
uint32_t
code
(
void
)
const
{
return
m_val; }
45
46
/**
47
* Returns a string that represents the time in ISO8601
48
*/
49
std::string
iso8601
(
void
)
const
;
50
51
/**
52
* Returns a string that represents the time in a human readable format
53
*/
54
std::string
human
(
void
)
const
;
55
56
private
:
// implementation
57
uint32_t m_val;
///< my current value
58
};
59
60
}
// namespace helper
61
62
}
// namespace eformat
63
64
#endif
/* EFORMAT_HELPER_DATEANDTIME_H */
eformat::helper::DateAndTime::iso8601
std::string iso8601(void) const
Definition
DateAndTime.cxx:20
eformat::helper::DateAndTime::code
uint32_t code(void) const
Definition
Event/eformat/include/eformat/DateAndTime.h:44
eformat::helper::DateAndTime::DateAndTime
DateAndTime()
Definition
DateAndTime.cxx:16
eformat::helper::DateAndTime::human
std::string human(void) const
Definition
DateAndTime.cxx:29
eformat::helper
Definition
Event/eformat/include/eformat/DateAndTime.h:21
eformat
Definition
Event/eformat/include/eformat/BadVersionIssue.h:20
8.0.0
BOSS_Source
Event
eformat
include
eformat
DateAndTime.h
Generated by
1.16.1