OpendTect  6.6
strmoper.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: A.H. Bril
8  Date: 23-10-1996
9  Contents: Stream opening etc.
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 */
14 
15 #include "basicmod.h"
16 
17 #include "gendefs.h"
18 #include "uistring.h"
19 #include <iostream>
20 class StreamData;
21 
24 namespace StrmOper
25 {
26  mGlobal(Basic) bool readBlock(std::istream&,void*,od_uint64 nrbyts);
27  mGlobal(Basic) bool writeBlock(std::ostream&,const void*,od_uint64);
28 
29  mGlobal(Basic) bool peekChar(std::istream&,char&);
30  mGlobal(Basic) bool readChar(std::istream&,char&,
31  bool allowreadingnewlines=false);
32  mGlobal(Basic) bool readWord(std::istream&,bool maycrossnewline,
33  BufferString* b=0);
34  mGlobal(Basic) bool readLine(std::istream&,BufferString* b=0,
35  bool* newline_found=0);
36  mGlobal(Basic) bool readFile(std::istream&,BufferString&);
37  mGlobal(Basic) bool skipWhiteSpace(std::istream&);
38 
39  mGlobal(Basic) od_int64 tell(std::istream&);
40  mGlobal(Basic) od_int64 tell(std::ostream&);
41  mGlobal(Basic) void seek(std::istream&,od_int64 pos);
42  mGlobal(Basic) void seek(std::istream&,od_int64 offset,
43  std::ios::seekdir);
44  mGlobal(Basic) void seek(std::ostream&,od_int64 pos);
45  mGlobal(Basic) void seek(std::ostream&,od_int64 offset,
46  std::ios::seekdir);
47  mGlobal(Basic) od_int64 lastNrBytesRead(std::istream&);
48 
49  mGlobal(Basic) bool resetSoftError(std::istream&,int& retrycount);
50  mGlobal(Basic) bool resetSoftError(std::ostream&,int& retrycount);
51  mGlobal(Basic) void clear(std::ios&);
52  mGlobal(Basic) uiString getErrorMessage(std::ios&);
54 
55 }
56 
57 
od_uint64
#define od_uint64
Definition: plftypes.h:36
StrmOper::skipWhiteSpace
bool skipWhiteSpace(std::istream &)
StrmOper::getErrorMessage
uiString getErrorMessage(std::ios &)
uistring.h
StreamData
Holds data to use and close an iostream. Usually created by StreamProvider.
Definition: strmdata.h:27
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
StrmOper::readWord
bool readWord(std::istream &, bool maycrossnewline, BufferString *b=0)
od_int64
#define od_int64
Definition: plftypes.h:35
StrmOper::readBlock
bool readBlock(std::istream &, void *, uint64_t nrbyts)
StrmOper::lastNrBytesRead
int64_t lastNrBytesRead(std::istream &)
StrmOper::seek
void seek(std::istream &, int64_t pos)
StrmOper::tell
int64_t tell(std::istream &)
gendefs.h
StrmOper::readFile
bool readFile(std::istream &, BufferString &)
StrmOper::resetSoftError
bool resetSoftError(std::istream &, int &retrycount)
StrmOper
Stream operations. operations will be retried on soft errors.
Definition: strmoper.h:25
StrmOper::readLine
bool readLine(std::istream &, BufferString *b=0, bool *newline_found=0)
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
StrmOper::writeBlock
bool writeBlock(std::ostream &, const void *, uint64_t)
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
StrmOper::readChar
bool readChar(std::istream &, char &, bool allowreadingnewlines=false)
StrmOper::clear
void clear(std::ios &)
StrmOper::peekChar
bool peekChar(std::istream &, char &)

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