OpendTect-6_4  6.4
odsession.h
Go to the documentation of this file.
1 #ifndef odsession_h
2 #define odsession_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "uiodmainmod.h"
17 #include "sets.h"
18 #include "transl.h"
19 #include "iopar.h"
20 
24 { mODTextTranslationClass(ODSession);
25 public:
26  ODSession();
27  virtual ~ODSession() {}
28 
29  IOPar& empars() { return empars_; }
30  IOPar& seispars() { return seispars_; }
31  IOPar& vispars() { return vispars_; }
32  IOPar& attrpars(bool,bool);
33  IOPar& nlapars() { return nlapars_; }
34  IOPar& mpepars() { return mpepars_; }
35  IOPar& scenepars() { return scenepars_; }
36  IOPar& vwr2dpars() { return vwr2dpars_; }
37  IOPar& pluginpars() { return pluginpars_; }
38 
39  void clear();
40  ODSession& operator =(const ODSession&);
41  bool operator ==(const ODSession&) const;
42 
43  bool usePar(const IOPar&);
44  void fillPar(IOPar& par) const;
45 
46  static void getStartupData(bool& douse,MultiID&);
47  static void setStartupData(bool,const MultiID&);
48 
49 protected:
50 
64 
65  static const char* emprefix();
66  static const char* seisprefix();
67  static const char* visprefix();
68  static const char* sceneprefix();
69  static const char* attrprefix();
70  static const char* attr2dprefix();
71  static const char* attr3dprefix();
72  static const char* attr2dstoredprefix();
73  static const char* attr3dstoredprefix();
74  static const char* nlaprefix();
75  static const char* trackprefix();
76  static const char* vwr2dprefix();
77  static const char* pluginprefix();
78 
79  static const char* sKeyUseStartup();
80  static const char* sKeyStartupID();
81 };
82 
83 
86 public:
88  const char* defExtension() const { return "sess"; }
89 };
90 
91 
94 public:
96 
97  virtual const char* read(ODSession&,Conn&) = 0;
99  virtual const char* write(const ODSession&,Conn&) = 0;
101  virtual const char* warningMsg() const { return ""; }
102 
103  static bool retrieve(ODSession&,const IOObj*,uiString&);
106  static bool store(const ODSession&,const IOObj*,uiString&);
109 };
110 
111 
113 { isTranslator(dgb,ODSession)
114 public:
116 
117  const char* read(ODSession&,Conn&);
119  const char* write( const ODSession&,Conn&);
121  const char* warningMsg() const { return warningmsg; }
122 
124 
125 };
126 
127 
128 #include "uiobjfileman.h"
129 
130 
137 public:
139  ~uiSessionMan();
140 
142 
143 protected:
144 
145  void mkFileInfo();
146 };
147 
148 #endif
#define mExpClass(module)
Definition: commondefs.h:160
IOPar attrpars3d_
Definition: odsession.h:57
IOPar attrpars2dstored_
Definition: odsession.h:58
IOPar & nlapars()
Definition: odsession.h:33
Definition: ioobj.h:58
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
OpendTect application top level object.
Definition: uiodmain.h:41
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
IOPar scenepars_
Definition: odsession.h:54
IOPar & pluginpars()
Definition: odsession.h:37
void clear(std::ios &)
IOPar vwr2dpars_
Definition: odsession.h:63
IOPar mpepars_
Definition: odsession.h:61
Definition: odsession.h:84
Definition: uistring.h:89
Definition: uiparent.h:26
Definition: odsession.h:92
#define mDeclInstanceCreatedNotifierAccess(clss)
Definition: callback.h:450
#define mDefEmptyTranslatorConstructor(spec, clss)
Definition: transl.h:267
IOPar vispars_
Definition: odsession.h:53
Definition: odsession.h:112
virtual const char * warningMsg() const
Definition: odsession.h:101
Definition: uiobjfileman.h:26
#define mDefEmptyTranslatorGroupConstructor(clss)
Definition: transl.h:255
IOPar pluginpars_
Definition: odsession.h:62
const char * warningMsg() const
Definition: odsession.h:121
Group of Translators. Has a static factory.
Definition: transl.h:56
IOPar & vispars()
Definition: odsession.h:31
IOPar seispars_
Definition: odsession.h:52
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
IOPar attrpars2d_
Definition: odsession.h:56
BufferString warningmsg
Definition: odsession.h:123
IOPar empars_
Definition: odsession.h:51
#define mDefEmptyTranslatorBaseConstructor(clss)
Definition: transl.h:261
IOPar & empars()
Definition: odsession.h:29
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
I/O Interpreter class for a certain object type.
Definition: transl.h:123
Data connection.
Definition: conn.h:30
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual ~ODSession()
Definition: odsession.h:27
IOPar & scenepars()
Definition: odsession.h:35
IOPar attrpars_
Definition: odsession.h:55
IOPar & seispars()
Definition: odsession.h:30
Session manager.
Definition: odsession.h:135
IOPar & vwr2dpars()
Definition: odsession.h:36
IOPar & mpepars()
Definition: odsession.h:34
#define isTranslatorGroup(clss)
Definition: transl.h:206
dTect session save/restore
Definition: odsession.h:23
Compound key consisting of ints.
Definition: multiid.h:25
IOPar nlapars_
Definition: odsession.h:60
#define isTranslator(spec, clss)
Definition: transl.h:230
IOPar attrpars3dstored_
Definition: odsession.h:59

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019