Last change
on this file since 2743 was 2659, checked in by ansari, 20 years ago |
Ajout programme test des PPF wrappers des vecteurs de STL (tstppfwrapstl.cc ) des classes SegmentedDataBlock (tstsegdb.cc) et modifications mineurs ds ttimestamp.cc - Reza 7 Avril 2005
|
File size:
1.6 KB
|
Line | |
---|
1 | #include "sopnamsp.h"
|
---|
2 | #include "machdefs.h"
|
---|
3 | #include <stdio.h>
|
---|
4 | #include <stdlib.h>
|
---|
5 | #include "math.h"
|
---|
6 | #include <iostream>
|
---|
7 | #include <string>
|
---|
8 |
|
---|
9 | #include <typeinfo>
|
---|
10 | #include "timing.h"
|
---|
11 | #include "timestamp.h"
|
---|
12 | #include "histinit.h"
|
---|
13 | #include "pexceptions.h"
|
---|
14 |
|
---|
15 | /* Programme test de la classe TimeStamp */
|
---|
16 | /* SOPHYA - R. Ansari (LAL) - Mars 2005 */
|
---|
17 |
|
---|
18 | int main(int narg, char* arg[])
|
---|
19 | {
|
---|
20 | cout << " ---- Programme ttimestamp.cc - Test classe TimeStamp --- " << endl;
|
---|
21 | int rc = 0;
|
---|
22 | try {
|
---|
23 | SophyaInit();
|
---|
24 | // PPRegister(FIO_SphereECP<r_8>);
|
---|
25 | // DObjRegister(FIO_SphereECP<r_8>, SphereECP<r_8>);
|
---|
26 |
|
---|
27 | InitTim();
|
---|
28 | TimeStamp ts;
|
---|
29 | cout << "ts: Now : " << ts << endl;
|
---|
30 | TimeStamp ts2("30/01/1962","14:22:35.65");
|
---|
31 | cout << "ts2: 30/01/1962 14:22:35.65 : " << ts2 << endl;
|
---|
32 | TimeStamp ts3("01/01/1905","00:00:00");
|
---|
33 | cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " << (double)ts3 << endl;
|
---|
34 | TimeStamp ts4("01/01/1901","03:00:20");
|
---|
35 | cout << "ts3: 01/01/1901 , 02:00:20 : " << ts4 << " (double): " << (double)ts4 << endl;
|
---|
36 |
|
---|
37 |
|
---|
38 | }
|
---|
39 | catch (PThrowable & exc) {
|
---|
40 | cerr << " ttimestamp.cc: Catched Exception (PThrowable)" << (string)typeid(exc).name()
|
---|
41 | << " - Msg= " << exc.Msg() << endl;
|
---|
42 | rc = 99;
|
---|
43 | }
|
---|
44 | catch (std::exception & e) {
|
---|
45 | cerr << " ttimestamp.cc: Catched std::xception "
|
---|
46 | << " - what()= " << e.what() << endl;
|
---|
47 | rc = 98;
|
---|
48 | }
|
---|
49 | catch (...) {
|
---|
50 | cerr << " ttimestamp.cc: some other exception (...) was caught ! " << endl;
|
---|
51 | rc = 97;
|
---|
52 | }
|
---|
53 | PrtTim("End ttimestamp " );
|
---|
54 | cout << " ---- Programme ttimestamp.cc- FIN (Rc=" << rc << ") --- " << endl;
|
---|
55 | return rc;
|
---|
56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.