base_constr.cc 902 Bytes
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* this is <base_constr.cc>
 * ----------------------------------------------------------------------------
 *
 * $Id: base_constr.cc,v 1.1 2000-08-09 21:05:18 thof Exp $
 *
 * 09/08/2000 by Thomas Forbriger (IfG Stuttgart)
 *
 * TBaseClassTime constructor
 *
 * REVISIONS and CHANGES
 *    09/08/2000   V1.0   Thomas Forbriger
 *
 * ============================================================================
 */

#include "libtime++.h"
#include <cstring>
#include <iostream>

namespace time {

TBaseClassTime::TBaseClassTime(const string &Itimestring)
{
  char Istring[TIME_SLEN+2];
  std::strncpy(Istring, Itimestring.c_str(), TIME_SLEN+1);
  if (time_kernel::time_read(&Mtime_Ts, Istring)!=EXIT_SUCCESS)
  {
    std::cerr << "TBaseClassTime could initialize time structure from string:\n"
              << Itimestring << "\n";
    std::abort();
  }
}

};
 
/* ----- END OF base_constr.cc ----- */