OpendTect-6_4  6.4
strmdata.h
Go to the documentation of this file.
1 #ifndef strmdata_h
2 #define strmdata_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: 3-4-1996
10  Contents: Data on any stream
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "basicmod.h"
17 #include "bufstring.h"
18 #include <iosfwd>
19 
20 
29 {
30 public:
31 
32  StreamData() { initStrms(); }
33  void transferTo(StreamData&);
34 
35  void close();
36  bool usable() const;
37 
38  void setFileName( const char* fn ) { fname_ = fn; }
39  const char* fileName() const { return fname_; }
40 
41  std::ios* streamPtr()const;
42 
43  std::istream* istrm;
44  std::ostream* ostrm;
45 
46 protected:
47 
49 
50 private:
51 
52  inline void initStrms()
53  { istrm = 0; ostrm = 0; }
54  friend class StreamProvider;
55 
56 };
57 
58 
59 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Provides I/O stream for file or system command.
Definition: strmprov.h:46
StreamData()
Definition: strmdata.h:32
BufferString fname_
Definition: strmdata.h:48
std::istream * istrm
Definition: strmdata.h:43
Holds data to use and close an iostream.
Definition: strmdata.h:28
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
std::ostream * ostrm
Definition: strmdata.h:44
void setFileName(const char *fn)
Definition: strmdata.h:38
void initStrms()
Definition: strmdata.h:52
const char * fileName() const
Definition: strmdata.h:39

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