nds2-client - User 0.16.7
Loading...
Searching...
No Matches
nds_epoch.hh
1#ifndef SWIG__COMMON__NDS_EPOCH_HH
2#define SWIG__COMMON__NDS_EPOCH_HH
3
4#include <memory>
5#include <string>
6#include <ostream>
7#include <utility>
8#include <vector>
9
10#include <iostream>
11
12namespace NDS
13{
14 inline namespace abi_0
15 {
16 class epoch
17 {
18 public:
19 std::string name;
22
23 epoch( ) : name( "" ), gps_start( 0 ), gps_stop( 0 ){};
24 epoch( const std::string& name )
25 : name( name ), gps_start( 0 ), gps_stop( 0 ){};
27 : name( "" ), gps_start( start ), gps_stop( stop )
28 {
29 }
30 epoch( const std::string& name,
33 : name( name ), gps_start( start ), gps_stop( stop ){};
34 epoch( const epoch& other ) = default;
35 ;
36 ~epoch( ) = default;
37 ;
38 };
39
40 inline std::ostream&
41 operator<<( std::ostream& os, const epoch& obj )
42 {
43 os << "< epoch ";
44 if ( obj.name == "" )
45 {
46 os << obj.gps_start << "-" << obj.gps_stop;
47 }
48 else
49 {
50 os << obj.name;
51 }
52 os << " >";
53 return os;
54 }
55
56 typedef std::vector< epoch > epochs_type;
57
58 inline std::ostream&
59 operator<<( std::ostream& os, const epochs_type& obj )
60 {
61 os << "(";
62 epochs_type::const_iterator cur = obj.begin( );
63 for ( ; cur != obj.end( ); ++cur )
64 {
65 os << " " << *cur << ",";
66 }
67 os << " )";
68 return os;
69 }
70 }
71}
72
73#endif
long gps_second_type
Type second portion of a gps time.
Definition nds_buffer.hh:33
The NDS client namespace.
Definition debug_stream.cc:18