mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
iostream stuff
This commit is contained in:
parent
a99dcb1547
commit
ac64a7ef97
@ -24,22 +24,47 @@
|
|||||||
#ifndef IOSTREAM_H
|
#ifndef IOSTREAM_H
|
||||||
#define IOSTREAM_H
|
#define IOSTREAM_H
|
||||||
|
|
||||||
// We don't care about the actual definition of the various iostream
|
// We don't care (much) about the actual definition of the various
|
||||||
// classes, but we do need to know the classnames that are available.
|
// iostream classes, but we do need to know the classnames that are
|
||||||
|
// available.
|
||||||
|
|
||||||
// We need to expose one method in each class to force it to publish.
|
// We need to expose one method in each class to force it to publish.
|
||||||
// We should fix that sometime.
|
// But we'd like to expose some of these methods anyway, so no
|
||||||
class ios {
|
// problem.
|
||||||
typedef long fmtflags;
|
class ios_base {
|
||||||
|
__published:
|
||||||
|
enum seekdir {
|
||||||
|
beg = 0,
|
||||||
|
cur = 1,
|
||||||
|
end = 2,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
class ostream {
|
class ios : public ios_base {
|
||||||
|
__published:
|
||||||
|
typedef long fmtflags;
|
||||||
|
typedef unsigned long streampos;
|
||||||
|
typedef long streamoff;
|
||||||
|
|
||||||
|
bool good() const;
|
||||||
|
bool eof() const;
|
||||||
|
bool fail() const;
|
||||||
|
bool bad() const;
|
||||||
|
void clear();
|
||||||
|
};
|
||||||
|
class ostream : virtual public ios {
|
||||||
__published:
|
__published:
|
||||||
void put(char c);
|
void put(char c);
|
||||||
void flush();
|
void flush();
|
||||||
|
streampos tellp();
|
||||||
|
void seekp(streampos pos);
|
||||||
|
void seekp(streamoff off, ios_base::seekdir dir);
|
||||||
};
|
};
|
||||||
class istream {
|
class istream : virtual public ios {
|
||||||
__published:
|
__published:
|
||||||
int get();
|
int get();
|
||||||
|
streampos tellg();
|
||||||
|
void seekg(streampos pos);
|
||||||
|
void seekg(streamoff off, ios_base::seekdir dir);
|
||||||
};
|
};
|
||||||
class iostream : public istream, public ostream {
|
class iostream : public istream, public ostream {
|
||||||
__published:
|
__published:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user