56 IOPar(
const char* nm=0);
62 {
return isEqual(iop); }
64 {
return !isEqual(iop); }
67 int indexOf(
const char* key)
const;
72 bool isEqual(
const IOPar&,
bool need_same_order=
false)
const;
73 bool includes(
const IOPar&)
const;
76 bool setKey(
int,
const char*);
77 void setValue(
int,
const char*);
80 inline bool hasKey(
const char* s )
const {
return isPresent(s); }
81 const char* findKeyFor(
const char*,
int nr=0)
const;
85 void removeWithKey(
const char* key);
86 void removeWithKeyPattern(
const char* globexpression);
92 void merge(
const IOPar&);
94 void addFrom(
const IOPar&);
96 static const char* compKey(
const char*,
const char*);
98 static const char* compKey(
const char*,
int);
101 {
return compKey(ky1,ky2.
str()); }
102 IOPar* subselect(
const char*)
const;
104 IOPar* subselect(
int)
const;
107 {
return subselect( fs.
str() ); }
108 void removeSubSelection(
const char*);
110 void removeSubSelection(
int);
113 { removeSubSelection( fs.
str() ); }
114 void mergeComp(
const IOPar&,
const char*);
119 const char*
find(
const char*)
const;
125 #define mIOParDeclFns(type) \ 126 bool get(const char*,type&) const; \ 127 bool get(const char*,type&,type&) const; \ 128 bool get(const char*,type&,type&,type&) const; \ 129 bool get(const char*,type&,type&,type&,type&) const 138 bool getYN(
const char*,
bool&)
const;
139 bool getYN(
const char*,
bool&,
bool&)
const;
140 bool getYN(
const char*,
bool&,
bool&,
bool&)
const;
141 bool getYN(
const char*,
bool&,
bool&,
bool&,
bool&)
const;
142 inline bool isTrue(
const char* key )
const 143 {
bool is =
false;
return getYN(key,is) && is; }
145 {
bool is =
true;
return getYN(key,is) && !is; }
148 bool get(
const char*,
int&,
int&,
float&)
const;
167 template <
class T1,
class T2>
168 inline bool get(
const char*,std::pair<T1,T2>&)
const;
170 bool get(
const char*,
TrcKey&)
const;
171 bool get(
const char*,
DBKey&)
const;
172 bool get(
const char*,
Color&)
const;
174 bool get(
const char*,
uiString&)
const;
176 bool get(
const char*,
BufferString&,BufferString&)
const;
177 bool get(
const char*,BufferString&,BufferString&,
178 BufferString&)
const;
181 bool getPtr(
const char*,
void*&)
const;
183 #define mIOParDeclFns(type) \ 184 bool getScaled(const char*,type&,type applied_scale, \ 185 bool set_to_undef_if_not_found) const; \ 186 bool getScaled(const char*,type&,type&,type,bool) const; \ 187 bool getScaled(const char*,type&,type&,type&,type, \ 189 bool getScaled(const char*,type&,type&,type&,type&,type, \ 198 void set(
const char* ky,
const char* val);
200 void add(
const char* ky,
const char* val);
203 { add( ky, val.
str() ); }
204 void update(
const char* ky,
const char* val);
208 #define mIOParDeclFns(fnnm,type) \ 209 void fnnm(const char*,type); \ 210 void fnnm(const char*,type,type); \ 211 void fnnm(const char*,type,type,type); \ 212 void fnnm(const char*,type,type,type,type) 227 #define mIOParDeclYNFns(fnnm) \ 228 void fnnm##YN(const char*,bool); \ 229 void fnnm##YN(const char*,bool,bool); \ 230 void fnnm##YN(const char*,bool,bool,bool); \ 231 void fnnm##YN(const char*,bool,bool,bool,bool) 234 #undef mIOParDeclYNFns 246 template <
class T1,
class T2>
247 inline void set(
const char*,
const std::pair<T1,T2>&);
251 void update(
const char*,
const DBKey&);
253 void set(
const char*,int,int,float);
254 void setPtr(
const char*,
void*);
256 void set(
const char*,
const char*,
const char*);
257 void set(
const char*,
const char*,
const char*,
const char*);
258 void set(
const char*,
const TrcKey&);
259 void set(
const char*,
const DBKey&);
260 void set(
const char*,
const Color&);
262 void set(
const char*,
const uiString&);
266 void set(
const char*,
const OD::String&,
278 void setToDateTime(
const char* ky=0);
279 void setToUser(
const char* ky=0);
280 void setStdCreationEntries();
286 void getFrom(
const char*);
287 void getParsFrom(
const char*);
288 void putTo(BufferString&)
const;
289 void putParsTo(BufferString&)
const;
294 bool read(
const char* filename,
const char* filetype,
300 bool write(
const char* filename,
const char* filetype)
const;
303 bool write(
od_ostream&,
const char* filetyp)
const;
308 int odVersion()
const;
312 void dumpPretty(BufferString&)
const;
336 return si ?
get( keyw, intv.
start, intv.
stop, si->step )
345 if ( si )
set( keyw, intv.
start, intv.
stop, si->step );
368 const bool rv =
get( keyw, idio );
378 set( keyw,
id.getI() );
385 if (
id.isInvalid() )
388 set( keyw,
id.getI() );
395 return get( keyw, crd.
x_, crd.
y_ );
402 return get( keyw, crd.
x_, crd.
y_, crd.
z_ );
409 set( keyw, crd.
x_, crd.
y_ );
416 set( keyw, crd.
x_, crd.
y_, crd.
z_ );
420 template <
class T1,
class T2>
421 bool IOPar::get(
const char* keyw, std::pair<T1,T2>& p )
const 423 return get( keyw, p.first, p.second );
427 template<
class T1,
class T2>
428 void IOPar::set(
const char* keyw,
const std::pair<T1,T2>& p )
430 set( keyw, p.first, p.second );
#define mExpClass(module)
Definition: commondefs.h:157
T step
Definition: samplingdata.h:48
int minorVersion() const
Only set if read from file. Otherwise set to current.
Definition: iopar.h:306
#define mIOParDeclFns(type)
Definition: iopar.h:208
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:25
const char * str() const
Definition: odstring.h:46
static const char * sKeyHdr()
Definition: iopar.h:318
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
OD::String that holds an existing text string.
Definition: fixedstring.h:27
#define od_int64
Definition: plftypes.h:34
OpendTect standard ascii format file writing.
Definition: ascstream.h:30
bool isPresent(const char *ky) const
Definition: iopar.h:68
bool isFalse(const char *key) const
Definition: iopar.h:144
List encoded in a string.
Definition: separstr.h:32
Definition: uistring.h:88
Set of BufferString objects.
Definition: bufstringset.h:25
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
bool get(const char *, int &) const
single integer ID with comparison but no automatic conversion. Note that you will want to make a subc...
Definition: integerid.h:47
uiString & operator=(const uiString &)
no copy, ref counted
int majorVersion() const
Only set if read from file. Otherwise set to current.
Definition: iopar.h:304
Interval of values.
Definition: commontypes.h:27
OD class for stream read.
Definition: od_istream.h:23
bool hasKey(const char *s) const
Definition: iopar.h:80
3D point or vector
Definition: commontypes.h:57
IOPar * subselect(const OD::String &fs) const
Definition: iopar.h:106
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
void removeWithKey(const char *key)
#define od_uint32
Definition: plftypes.h:30
bool isEmpty() const
Definition: iopar.h:71
BufferStringSet & vals_
Definition: iopar.h:327
void update(const char *ky, const char *val)
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:29
T start
Definition: samplingdata.h:47
Interval with step.
Definition: commontypes.h:29
T x_
Definition: geometry.h:80
T x_
Definition: geometry.h:166
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
#define mDynamicCastGet(typ, out, in)
Definition: commondefs.h:123
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:187
OpendTect standard ascii format file reading.
Definition: ascstream.h:81
#define od_uint64
Definition: plftypes.h:35
#define mIOParDeclYNFns(fnnm)
Definition: iopar.h:227
T stop
Definition: ranges.h:91
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
T z_
Definition: geometry.h:168
object with a name.
Definition: namedobj.h:20
FixedString operator[](const char *ky) const
Definition: iopar.h:121
static const char * sKeyDumpPretty()
Definition: iopar.h:317
void add(const char *ky, const OD::String &val)
Definition: iopar.h:202
bool isTrue(const char *key) const
Definition: iopar.h:142
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
T start
Definition: ranges.h:90
static const char * compKey(const char *ky1, const OD::String &ky2)
Definition: iopar.h:100
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:20
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
void removeSubSelection(const OD::String &fs)
Definition: iopar.h:112
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
2D point or vector class.
Definition: commontypes.h:58
void set(const char *ky, const char *val)
int majorversion_
Definition: iopar.h:323
T y_
Definition: geometry.h:167
BufferStringSet & keys_
Definition: iopar.h:326
T y_
Definition: geometry.h:81
static const char * sKeySubHdr()
Definition: iopar.h:319
int minorversion_
Definition: iopar.h:324