OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "wellmod.h"
15 
16 #include "manobjectset.h"
17 #include "wellreadaccess.h"
18 #include "wellwriteaccess.h"
19 #include "bufstring.h"
20 class IOObj;
21 namespace Well { class Data; }
22 
23 
27 {
28 public:
29 
30  virtual ~WellDataIOProvider() {}
31 
32  virtual bool canWrite() const { return false; }
33 
35  uiString&) const
36  { return 0; }
38  const Well::Data&,
39  uiString&) const
40  { return 0; }
41 
42  const OD::String& type() const { return type_; }
43 
44 protected:
45 
46  WellDataIOProvider( const char* t )
47  : type_(t) {}
48 
50 
51 };
52 
53 
55 {
56 public:
57 
58  int add( WellDataIOProvider* prov )
59  { provs_ += prov; return provs_.size() - 1; }
61  { return provs_; }
62 
63  // Convenience functions
64  const WellDataIOProvider* provider(const char* typ) const;
66  uiString&) const;
68  uiString&) const;
69 
70 protected:
71 
73 
74 public:
75  mDeprecated ("Use uiString")
76  Well::ReadAccess* getReadAccess(const IOObj&,Well::Data&,
77  BufferString&) const;
78 
79  mDeprecated ("Use uiString")
80  Well::WriteAccess* getWriteAccess(const IOObj&,const Well::Data&,
81  BufferString&) const;
82 
83 };
84 
86 
87 
WellDataIOProviderFactory::add
int add(WellDataIOProvider *prov)
Definition: wellioprov.h:58
Well::Data
The holder of all data concerning a certain well.
Definition: welldata.h:121
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
ObjectSet< WellDataIOProvider >
Well::ReadAccess
Base class for object reading data from data store into Well::Data.
Definition: wellreadaccess.h:31
WellDataIOProvider::makeReadAccess
virtual Well::ReadAccess * makeReadAccess(const IOObj &, Well::Data &, uiString &) const
Definition: wellioprov.h:34
WellDataIOProvider::type_
const BufferString type_
Definition: wellioprov.h:49
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Repos::Data
@ Data
Definition: repos.h:24
WellDataIOProvider::~WellDataIOProvider
virtual ~WellDataIOProvider()
Definition: wellioprov.h:30
bufstring.h
ManagedObjectSet< WellDataIOProvider >
Well
Definition: directionalsurvey.h:20
WDIOPF
WellDataIOProviderFactory & WDIOPF()
WellDataIOProviderFactory::provider
const WellDataIOProvider * provider(const char *typ) const
mDeprecated
#define mDeprecated(msg)
Definition: plfdefs.h:215
IOObj
Definition: ioobj.h:58
WellDataIOProvider
Well::Data and sub-objects provider from data stores.
Definition: wellioprov.h:27
wellreadaccess.h
WellDataIOProviderFactory::getWriteAccess
Well::WriteAccess * getWriteAccess(const IOObj &, const Well::Data &, uiString &) const
WellDataIOProvider::type
const OD::String & type() const
Definition: wellioprov.h:42
wellwriteaccess.h
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
WellDataIOProviderFactory::provs_
ManagedObjectSet< WellDataIOProvider > provs_
Definition: wellioprov.h:72
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
OD::String
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
Well::WriteAccess
Base class for object reading data from data store into Well::Data.
Definition: wellwriteaccess.h:28
manobjectset.h
WellDataIOProvider::makeWriteAccess
virtual Well::WriteAccess * makeWriteAccess(const IOObj &, const Well::Data &, uiString &) const
Definition: wellioprov.h:37
WellDataIOProviderFactory::providers
const ObjectSet< WellDataIOProvider > & providers() const
Definition: wellioprov.h:60
WellDataIOProvider::canWrite
virtual bool canWrite() const
Definition: wellioprov.h:32
WellDataIOProviderFactory::getReadAccess
Well::ReadAccess * getReadAccess(const IOObj &, Well::Data &, uiString &) const
WellDataIOProvider::WellDataIOProvider
WellDataIOProvider(const char *t)
Definition: wellioprov.h:46
WellDataIOProviderFactory
Definition: wellioprov.h:55

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