OpendTect  6.3
wellioprov.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: Bert
8  Date: July 2014
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "wellcommon.h"
14 
15 #include "manobjectset.h"
16 #include "wellreadaccess.h"
17 #include "wellwriteaccess.h"
18 #include "bufstring.h"
19 class IOObj;
20 namespace Well { class Data; }
21 
22 
26 {
27 public:
28 
29  virtual ~WellDataIOProvider() {}
30 
31  virtual bool canWrite() const { return false; }
32 
34  uiString& ) const
35  { return 0; }
37  uiString&) const
38  { return 0; }
39 
40  const OD::String& type() const { return type_; }
41 
42 protected:
43 
44  WellDataIOProvider( const char* t )
45  : type_(t) {}
46 
48 
49 };
50 
51 
53 {
54 public:
55 
56  int add( WellDataIOProvider* prov )
57  { provs_ += prov; return provs_.size() - 1; }
59  { return provs_; }
60 
61  // Convenience functions
62  const WellDataIOProvider* provider(const char* typ) const;
63  Well::ReadAccess* getReadAccess(const IOObj&,Well::Data&,
64  uiString&) const;
65  Well::WriteAccess* getWriteAccess(const IOObj&,const Well::Data&,
66  uiString&) const;
67 
68 protected:
69 
71 
72 };
73 
#define mExpClass(module)
Definition: commondefs.h:157
Definition: wellioprov.h:52
Definition: ioobj.h:57
virtual Well::ReadAccess * makeReadAccess(const IOObj &, Well::Data &, uiString &) const
Definition: wellioprov.h:33
#define mGlobal(module)
Definition: commondefs.h:160
ManagedObjectSet< WellDataIOProvider > provs_
Definition: wellioprov.h:70
Definition: uistring.h:88
Base class for object reading data from data store into Well::Data.
Definition: wellwriteaccess.h:23
const BufferString type_
Definition: wellioprov.h:47
Base class for object reading data from data store into Well::Data.
Definition: wellreadaccess.h:24
WellDataIOProvider(const char *t)
Definition: wellioprov.h:44
WellDataIOProviderFactory & WDIOPF()
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:29
Definition: wellcommon.h:16
const ObjectSet< WellDataIOProvider > & providers() const
Definition: wellioprov.h:58
Definition: repos.h:23
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Well::Data and sub-objects provider from data stores.
Definition: wellioprov.h:25
virtual Well::WriteAccess * makeWriteAccess(const IOObj &, const Well::Data &, uiString &) const
Definition: wellioprov.h:36
The holder of all data concerning a certain well.
Definition: welldata.h:36
virtual ~WellDataIOProvider()
Definition: wellioprov.h:29
int add(WellDataIOProvider *prov)
Definition: wellioprov.h:56
virtual bool canWrite() const
Definition: wellioprov.h:31
const OD::String & type() const
Definition: wellioprov.h:40

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