OpendTect-6_4  6.4
posvecdataset.h
Go to the documentation of this file.
1 #ifndef posvecdataset_h
2 #define posvecdataset_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H.Bril
9  Date: Jan 2005
10  Contents: Set with data vectors on positions
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "generalmod.h"
17 #include "binidvalset.h"
18 #include "bufstringset.h"
19 class DataColDef;
20 
21 
22 
31 {
32 public:
33  PosVecDataSet(const char* nm=0);
34  PosVecDataSet(const PosVecDataSet&);
35  virtual ~PosVecDataSet();
36  PosVecDataSet& operator =(const PosVecDataSet&);
37  void copyStructureFrom(const PosVecDataSet&);
38 
39  bool isEmpty() const { return data_.isEmpty(); }
40  void setEmpty();
41  int add(DataColDef*);
42  bool insert(int idx,DataColDef*);
44  void removeColumn(int);
45  enum OvwPolicy { Keep, OvwIfUdf, Ovw };
47  enum ColMatchPol { NameExact, RefExact, NameStart, RefStart };
48  void merge(const PosVecDataSet&,OvwPolicy pol=OvwIfUdf,
49  ColMatchPol cmp=NameExact);
51 
52  BinIDValueSet& data() { return data_; }
53  const BinIDValueSet& data() const { return data_; }
54 
55  int nrCols() const { return coldefs_.size(); }
56  DataColDef& colDef( int idx ) { return *coldefs_[idx]; }
57  const DataColDef& colDef( int idx ) const { return *coldefs_[idx]; }
58  int findColDef(const DataColDef&,
59  ColMatchPol p=RefExact) const;
61 
62  const char* name() const { return name_.buf(); }
63  void setName( const char* nm ) { name_ = nm; }
64 
65  IOPar& pars() { return pars_; }
66  const IOPar& pars() const { return pars_; }
67 
68  bool getFrom(const char*,BufferString& errmsg);
69  bool putTo(const char*,BufferString& errmsg,
70  bool tabstyle) const;
73  static bool getColNames(const char*,BufferStringSet& bss,
74  BufferString& errmsg,bool refs=false);
75  static bool getIOPar(const char*,IOPar& iop,BufferString& errmsg);
76 
77 protected:
78 
83 
84  void mergeColDefs(const PosVecDataSet&,ColMatchPol,int*);
85  friend class DataPointSet;
86 
87 };
88 
89 #define mPosVecDataSetFileType "Positioned Vector Data"
90 
91 
92 #endif
#define mExpClass(module)
Definition: commondefs.h:160
BinIDValueSet data_
Definition: posvecdataset.h:79
ColMatchPol
Definition: posvecdataset.h:47
void setName(const char *nm)
Definition: posvecdataset.h:63
Set of data points with group selection.
Definition: datapointset.h:48
bool isEmpty() const
Definition: posvecdataset.h:39
IOPar & pars()
Definition: posvecdataset.h:65
const char * name() const
Definition: posvecdataset.h:62
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< DataColDef > coldefs_
Definition: posvecdataset.h:80
BufferString name_
Definition: posvecdataset.h:81
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
void putTo(BufferString &) const
void getFrom(const char *)
BufferString name_
Definition: datacoldef.h:40
const char * buf() const
Definition: odstring.h:47
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BinIDValueSet & data()
Definition: posvecdataset.h:52
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Column definition in tabular data sets.
Definition: datacoldef.h:29
const IOPar & pars() const
Definition: posvecdataset.h:66
OvwPolicy
Definition: posvecdataset.h:45
const BinIDValueSet & data() const
Definition: posvecdataset.h:53
Data set consisting of data vectors.
Definition: posvecdataset.h:30
DataColDef & colDef(int idx)
Definition: posvecdataset.h:56
IOPar & pars_
Definition: posvecdataset.h:82
const DataColDef & colDef(int idx) const
Definition: posvecdataset.h:57
int nrCols() const
Definition: posvecdataset.h:55

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