TransformationCDPP3DView.h
2.53 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef TRANSFORMATIONCDPP3DVIEW_H
#define TRANSFORMATIONCDPP3DVIEW_H
#include "../../CDPP3DViewSOAPClient/cdpp3dviewcdppBinderProxy.h"
#include "TransformationAbstract.h"
#define CDPP3DVIEW_TIME_ID "col1"
#define CDPP3DVIEW_COMP1_ID "col2"
#define CDPP3DVIEW_COMP2_ID "col3"
#define CDPP3DVIEW_COMP3_ID "col4"
#define CDPP3DVIEW_TIME_PATTERN "[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[mls]"
//if WITH_GETORBURL is defined, the transformation is done in two step:
// * first we sent data through getORBUrl function to generate a VOTable
// * then we call listNewFrameAtt function, with the previous VOTable url in arguments
//else, the transformation is done directly by a call to listNewFrameAtt function, with data sent in arguments of this function
//#define WITH_GETORBURL
namespace TREPS
{
namespace Transformation
{
typedef vector<ns4__Tuple3d*> t_VectorTuple3d;
typedef vector<time_t> t_VectorTime;
class TransformationCDPP3DViewClass : public TransformationAbstractClass
{
public :
TransformationCDPP3DViewClass(RequestAbstractClass *trepsRequest);
~TransformationCDPP3DViewClass(void);
//run transformation
bool run(const char *workingDir);
//check frame
bool checkFrame(const char *frame);
//get list of available frames
t_StringList getAvailableFrameList(void);
private :
//pointer to the WS client
cdppBinderProxy *client;
t_StringList availableFrames;
//create a vector tuple3D
t_VectorTuple3d createVectorTuple3d(const t_Vector *vector);
//delete a vector Tuple3d
void deleteVectorTuple3d(t_VectorTuple3d &vT);
//create a time list
t_VectorTime createTimeList(void);
//delete a time list
void deleteTimeList(t_VectorTime &vT);
#ifdef WITH_GETORBURL
string callGetOrbUrlRequest(const t_Vector *crtSrcVec);
string callNewFrameRequest(const t_Vector *crtSrcVec, const char *dataURL, vector<ns4__TimeFile*> timeFiles);
#else
string callNewFrameRequest(const t_Vector *crtSrcVec, vector<ns4__TimeFile*> timeFiles);
#endif
ns4__TimeFile* callListFilesRequest(int bodyId, time_t startTime, time_t stopTime);
//get response
string getURLResponse(const char *response);
//copy 3DView result file in workind directory
string copyFileInWorkingDir(const char *fullURL, const char *workingDir);
//add 3DView result in result data record list
bool addResultFileInResultVec(const char *resultFile, const t_Vector *crtSrcVec);
//update the list of available frames
bool updateAvailableFrameList(void);
};
}
}
#endif