20 #define mAscStrmParagraphMarker "!" 21 #define mAscStrmKeyValSep ':' 39 virtual ~ascostream();
43 bool putHeader(
const char* filetype);
44 bool put(
const char*,
const char* val=0);
47 #define mAscStreamDefFns(fn,typ) \ 48 bool fn(const char*,typ); \ 49 bool fn(const char*,typ,typ); \ 50 bool fn(const char*,typ,typ,typ); \ 51 bool fn(const char*,typ,typ,typ,typ) 59 #undef mAscStreamDefFns 70 void putKeyword(
const char*,
bool wsep=
true);
88 virtual ~ascistream();
94 bool hasStandardHeader()
const;
95 const char*
fileType()
const {
return filetype_.buf(); }
96 bool isOfFileType(
const char*)
const;
97 const char* version()
const;
98 const char*
timeStamp()
const {
return timestamp_.buf(); }
99 int majorVersion()
const;
100 int minorVersion()
const;
104 bool atEOS()
const {
return type() > KeyVal; }
107 const char*
keyWord()
const {
return keybuf_.buf(); }
108 const char*
value()
const {
return valbuf_.buf(); }
109 bool hasKeyword(
const char*)
const;
110 bool hasValue(
const char*)
const;
111 int getIValue(
int i=0)
const;
113 od_int64 getI64Value(
int i=0)
const;
115 float getFValue(
int i=0)
const;
116 double getDValue(
int i=0)
const;
117 bool getYN(
int i=0)
const;
144 {
return strm.
atEOS(); }
#define mExpClass(module)
Definition: commondefs.h:160
void setKeyWord(const char *s)
Definition: ascstream.h:122
bool atEOS() const
returns true if at end of segment (='paragraph')
Definition: ascstream.h:104
od_istream & stream()
Definition: ascstream.h:119
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
const char * keyWord() const
Definition: ascstream.h:107
void setValue(const char *s)
Definition: ascstream.h:123
#define od_int64
Definition: plftypes.h:36
OpendTect standard ascii format file writing.
Definition: ascstream.h:32
BufferString header_
Definition: ascstream.h:132
OD class for stream read.
Definition: od_istream.h:24
od_ostream & stream()
Definition: ascstream.h:63
bool atEndOfSection(const ascistream &strm)
Definition: ascstream.h:143
#define od_uint32
Definition: plftypes.h:32
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
bool strmmine_
Definition: ascstream.h:128
bool strmmine_
Definition: ascstream.h:68
OpendTect standard ascii format file reading.
Definition: ascstream.h:83
BufferString valbuf_
Definition: ascstream.h:130
Definition: ascstream.h:102
#define od_uint64
Definition: plftypes.h:37
BufferString filetype_
Definition: ascstream.h:133
const char * fileType() const
Definition: ascstream.h:95
od_istream & strm_
Definition: ascstream.h:127
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
#define mAscStreamDefFns(fn, typ)
Definition: ascstream.h:47
const char * value() const
Definition: ascstream.h:108
od_ostream & strm_
Definition: ascstream.h:67
BufferString timestamp_
Definition: ascstream.h:134
EntryType
Definition: ascstream.h:102
const char * timeStamp() const
Definition: ascstream.h:98
BufferString keybuf_
Definition: ascstream.h:129
const char * headerStartLine() const
Definition: ascstream.h:93