OpendTect-6_4  6.4
positionlist.h
Go to the documentation of this file.
1 #ifndef positionlist_h
2 #define positionlist_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 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "algomod.h"
16 #include "refcount.h"
17 #include "position.h"
18 #include "typeset.h"
19 
25 { mRefCountImpl(FloatVertexAttribList)
26 public:
27 
28 
29  virtual int size() const = 0;
30  virtual bool setSize(int,bool cpdata) = 0;
31 
32  virtual void setCoord(int,const float*) = 0;
33  virtual void getCoord(int,float*) const = 0;
34 
35  virtual void setNormal(int,const float*) = 0;
36  virtual void getNormal(int,float*) const = 0;
37 
38  virtual void setTCoord(int,const float*) = 0;
39  virtual void getTCoord(int,float*) const = 0;
40 
41 protected:
42 };
43 
44 
48 { mRefCountImplNoDestructor(Coord2List);
49 public:
50 
51  virtual int nextID(int previd) const = 0;
54  virtual Coord get(int id) const = 0;
55  virtual void set(int id,const Coord&) = 0;
56  virtual int add(const Coord&) = 0;
58  virtual void addValue(int id,const Coord&) = 0;
60  virtual void remove(int id) = 0;
61  virtual void remove(const TypeSet<int>&) = 0;
62  virtual int size() const = 0;
63 
64  Coord center() const;
65 };
66 
67 
68 class Coord3;
69 
73 { mRefCountImplNoDestructor(Coord3List);
74 public:
75 
76  virtual int nextID(int previd) const = 0;
79  virtual int add(const Coord3&) = 0;
81  virtual Coord3 get(int id) const = 0;
82  virtual bool isDefined(int id) const = 0;
83  virtual void set(int id,const Coord3&) = 0;
84  virtual void addValue(int id,const Coord3&) = 0;
86  virtual void remove(int id) = 0;
87  virtual void remove(const TypeSet<int>&) = 0;
89  virtual int size() const = 0;
90 
91  Coord3 center() const;
92 };
93 
94 
100 {
101 public:
102 
103  Coord2ListImpl();
104 
105  virtual int nextID(int previd) const;
106  virtual Coord get(int id) const;
107  virtual void set(int id,const Coord&);
108  virtual int add(const Coord&);
109  virtual void remove(int id);
110  virtual void remove(const TypeSet<int>&);
111  virtual void addValue(int id,const Coord&);
112  virtual int size() const
113  { return points_.size() - removedids_.size(); }
114 
115 protected:
116 
119 };
120 
121 
127 {
128 public:
129  Coord3ListImpl();
130 
131  virtual int nextID(int previd) const;
132  virtual Coord3 get(int id) const;
133  virtual void set(int id,const Coord3&);
134  virtual int add(const Coord3&);
135  virtual bool isDefined(int) const;
136  virtual void remove(int id);
137  virtual void addValue(int id,const Coord3&);
138  virtual void remove(const TypeSet<int>&);
139  virtual int size() const
140  { return coords_.size() - removedids_.size(); }
141 
142 protected:
143 
146 };
147 
148 
149 #endif
#define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
#define mExpClass(module)
Definition: commondefs.h:160
Interface for a list of Coord3 with automatically maintained IDs.
Definition: positionlist.h:72
virtual int size() const
Definition: positionlist.h:139
bool isDefined() const
Definition: coord.h:181
Interface for a list of Coords with automatically maintained IDs.
Definition: positionlist.h:47
A cartesian coordinate in 2D space.
Definition: coord.h:25
Base class for vertex attribute list.
Definition: positionlist.h:24
A list of Coord3 where each coord has a unique id.
Definition: positionlist.h:126
virtual int size() const
Definition: positionlist.h:112
A list of Coord where each coord has a unique id.
Definition: positionlist.h:99
#define mRefCountImplNoDestructor(ClassName)
Macro to setup a class without destructor for reference counting.
Definition: refcount.h:167
TypeSet< int > removedids_
Definition: positionlist.h:144
TypeSet< int > removedids_
Definition: positionlist.h:117
A cartesian coordinate in 3D space.
Definition: coord.h:72
TypeSet< Coord > points_
Definition: positionlist.h:118
TypeSet< Coord3 > coords_
Definition: positionlist.h:145

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