OpendTect-6_4  6.4
strmoper.h
Go to the documentation of this file.
1 #ifndef strmoper_h
2 #define strmoper_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: 23-10-1996
10  Contents: Stream opening etc.
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 */
15 
16 #include "basicmod.h"
17 #include "gendefs.h"
18 #include <iostream>
19 class StreamData;
20 
23 namespace StrmOper
24 {
25  mGlobal(Basic) bool readBlock(std::istream&,void*,od_uint64 nrbyts);
26  mGlobal(Basic) bool writeBlock(std::ostream&,const void*,od_uint64);
27 
28  mGlobal(Basic) bool peekChar(std::istream&,char&);
29  mGlobal(Basic) bool readChar(std::istream&,char&,
30  bool allowreadingnewlines=false);
31  mGlobal(Basic) bool readWord(std::istream&,bool maycrossnewline,
32  BufferString* b=0);
33  mGlobal(Basic) bool readLine(std::istream&,BufferString* b=0,
34  bool* newline_found=0);
35  mGlobal(Basic) bool readFile(std::istream&,BufferString&);
36  mGlobal(Basic) bool skipWhiteSpace(std::istream&);
37 
38  mGlobal(Basic) od_int64 tell(std::istream&);
39  mGlobal(Basic) od_int64 tell(std::ostream&);
40  mGlobal(Basic) void seek(std::istream&,od_int64 pos);
41  mGlobal(Basic) void seek(std::istream&,od_int64 offset,
42  std::ios::seekdir);
43  mGlobal(Basic) void seek(std::ostream&,od_int64 pos);
44  mGlobal(Basic) void seek(std::ostream&,od_int64 offset,
45  std::ios::seekdir);
46  mGlobal(Basic) od_int64 lastNrBytesRead(std::istream&);
47 
48  mGlobal(Basic) bool resetSoftError(std::istream&,int& retrycount);
49  mGlobal(Basic) bool resetSoftError(std::ostream&,int& retrycount);
50  mGlobal(Basic) void clear(std::ios&);
51  mGlobal(Basic) const char* getErrorMessage(std::ios&);
52  mGlobal(Basic) const char* getErrorMessage(const StreamData&);
53 
54 }
55 
56 
57 #endif
bool readWord(std::istream &, bool maycrossnewline, BufferString *b=0)
bool readLine(std::istream &, BufferString *b=0, bool *newline_found=0)
bool readChar(std::istream &, char &, bool allowreadingnewlines=false)
#define mGlobal(module)
Definition: commondefs.h:163
bool resetSoftError(std::istream &, int &retrycount)
bool readBlock(std::istream &, void *, uint64_t nrbyts)
#define od_int64
Definition: plftypes.h:36
int64_t lastNrBytesRead(std::istream &)
void clear(std::ios &)
int64_t tell(std::istream &)
const char * getErrorMessage(std::ios &)
bool writeBlock(std::ostream &, const void *, uint64_t)
Stream operations. operations will be retried on soft errors.
Definition: strmoper.h:23
void seek(std::istream &, int64_t pos)
Holds data to use and close an iostream.
Definition: strmdata.h:28
#define od_uint64
Definition: plftypes.h:37
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool readFile(std::istream &, BufferString &)
bool peekChar(std::istream &, char &)
bool skipWhiteSpace(std::istream &)

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