OpendTect  6.3
horizonrelation.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Raman K Singh
8  Date: Jul 2010
9 ________________________________________________________________________
10 
11 -*/
12 
13 
14 #include "earthmodelmod.h"
15 #include "dbkey.h"
16 #include "objectset.h"
17 
18 class FileMultiString;
19 
20 
21 namespace EM
22 {
23 
30 {
31 public:
32 
33  mExpClass(EarthModel) Node
34  {
35  public:
36  Node(const DBKey&);
37 
41 
42  bool hasChild(const Node* descendant) const;
43 
44  void fillPar(IOPar&) const;
45  void fillChildren(const FileMultiString&,
46  const RelationTree&);
47 
48  static const char* sKeyChildIDs();
49  static const char* sKeyLastModified();
50  };
51 
52 
53  RelationTree(bool is2d,bool read=true);
54  ~RelationTree();
55 
56  const RelationTree::Node* getNode(const DBKey&) const;
57  void getParents(int,TypeSet<int>&) const;
58  void removeNode(const DBKey&,bool write=true);
59  void addRelation(const DBKey& id1,
60  const DBKey& id2,bool write=true);
61  // id1 is above id2
62 
63  int findRelation(const DBKey&,
64  const DBKey&) const;
65  /* 0 -> no relation
66  1 -> first horizon is at the top
67  2 -> second horizon is at the top */
68  bool getSorted(const DBKeySet& unsortedids,
69  DBKeySet& sortedids ) const;
70 
71  static bool sortHorizons(bool is2d,
72  const DBKeySet& unsortedids,
73  DBKeySet& sortedids);
78  bool read() { return read(true); }
79  bool write() const;
80 
81 protected:
82 
84  bool is2d_;
85 
86  int findNode(const DBKey&) const;
87  bool read(bool removeoutdated);
88 
89  static const char* sKeyHorizonRelations();
90 };
91 
92 } // namespace EM
#define mExpClass(module)
Definition: commondefs.h:157
bool is2d_
Definition: horizonrelation.h:84
Definition: dbkey.h:98
ObjectSet< RelationTree::Node > nodes_
Definition: horizonrelation.h:83
A Relation tree where a parent-child relationship means a top-bottom relationship for the horizons...
Definition: horizonrelation.h:29
BufferString datestamp_
Definition: horizonrelation.h:39
DBKey id_
Definition: horizonrelation.h:38
SeparString with backquotes as separators, use in most ascii files.
Definition: separstr.h:131
Set of pointers to objects.
Definition: commontypes.h:28
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
ObjectSet< const Node > children_
Definition: horizonrelation.h:40
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Definition: horizonrelation.h:33
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
bool read()
Definition: horizonrelation.h:78
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36

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