nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nds_epoch.hh
Go to the documentation of this file.
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 
12 namespace 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
epoch(const std::string &name, buffer::gps_second_type start, buffer::gps_second_type stop)
Definition: nds_epoch.hh:30
epoch(buffer::gps_second_type start, buffer::gps_second_type stop)
Definition: nds_epoch.hh:26
buffer::gps_second_type gps_stop
Definition: nds_epoch.hh:21
epoch(const std::string &name)
Definition: nds_epoch.hh:24
long gps_second_type
Type second portion of a gps time.
Definition: nds_buffer.hh:33
std::vector< epoch > epochs_type
Definition: nds_epoch.hh:56
std::string name
Definition: nds_epoch.hh:19
epoch()
Definition: nds_epoch.hh:23
buffer::gps_second_type gps_start
Definition: nds_epoch.hh:20
std::ostream & operator<<(std::ostream &os, const segment &obj)
Definition: nds_availability.cc:72
Definition: nds_epoch.hh:16