OpendTect-6_4  6.4
wellioprov.h
Go to the documentation of this file.
1 #ifndef wellioprov_h
2 #define wellioprov_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: July 2014
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "wellmod.h"
16 
17 #include "manobjectset.h"
18 #include "wellreadaccess.h"
19 #include "wellwriteaccess.h"
20 #include "bufstring.h"
21 class IOObj;
22 namespace Well { class Data; }
23 
24 
28 {
29 public:
30 
31  virtual ~WellDataIOProvider() {}
32 
33  virtual bool canWrite() const { return false; }
34 
36  BufferString& ) const
37  { return 0; }
39  const Well::Data&,
40  BufferString& ) const
41  { return 0; }
42 
43  const OD::String& type() const { return type_; }
44 
45 protected:
46 
47  WellDataIOProvider( const char* t )
48  : type_(t) {}
49 
51 
52 };
53 
54 
56 {
57 public:
58 
59  int add( WellDataIOProvider* prov )
60  { provs_ += prov; return provs_.size() - 1; }
62  { return provs_; }
63 
64  // Convenience functions
65  const WellDataIOProvider* provider(const char* typ) const;
66  Well::ReadAccess* getReadAccess(const IOObj&,Well::Data&,
67  BufferString&) const;
68  Well::WriteAccess* getWriteAccess(const IOObj&,const Well::Data&,
69  BufferString&) const;
70 
71 protected:
72 
74 
75 };
76 
78 
79 
80 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: wellioprov.h:55
Definition: ioobj.h:58
#define mGlobal(module)
Definition: commondefs.h:163
ManagedObjectSet< WellDataIOProvider > provs_
Definition: wellioprov.h:73
Base class for object reading data from data store into Well::Data.
Definition: wellwriteaccess.h:28
const BufferString type_
Definition: wellioprov.h:50
Base class for object reading data from data store into Well::Data.
Definition: wellreadaccess.h:31
WellDataIOProvider(const char *t)
Definition: wellioprov.h:47
WellDataIOProviderFactory & WDIOPF()
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
Definition: directionalsurvey.h:19
const ObjectSet< WellDataIOProvider > & providers() const
Definition: wellioprov.h:61
virtual Well::WriteAccess * makeWriteAccess(const IOObj &, const Well::Data &, BufferString &) const
Definition: wellioprov.h:38
Definition: repos.h:25
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Well::Data and sub-objects provider from data stores.
Definition: wellioprov.h:27
virtual Well::ReadAccess * makeReadAccess(const IOObj &, Well::Data &, BufferString &) const
Definition: wellioprov.h:35
The holder of all data concerning a certain well.
Definition: welldata.h:113
virtual ~WellDataIOProvider()
Definition: wellioprov.h:31
int add(WellDataIOProvider *prov)
Definition: wellioprov.h:59
virtual bool canWrite() const
Definition: wellioprov.h:33
const OD::String & type() const
Definition: wellioprov.h:43

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