forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiostream
More file actions
103 lines (84 loc) · 2.35 KB
/
iostream
File metadata and controls
103 lines (84 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file iostream
* @author drose
* @date 2000-05-12
*/
// This file, and all the other files in this directory, aren't
// intended to be compiled--they're just parsed by CPPParser (and
// interrogate) in lieu of the actual system headers, to generate the
// interrogate database.
#ifndef IOSTREAM_H
#define IOSTREAM_H
#include <stdtypedefs.h>
#include <ios>
#include <streambuf>
#include <ostream>
#include <Python.h>
// We don't care (much) about the actual definition of the various
// iostream classes, but we do need to know the classnames that are
// available.
namespace std {
class ostream : virtual public ios {
__published:
ostream(const ostream&) = delete;
__extension void write(PyObject *b);
__extension void writelines(PyObject *lines);
void put(char c);
void flush();
streampos tellp();
void seekp(streampos pos);
void seekp(streamoff off, ios_base::seekdir dir);
protected:
ostream(ostream &&);
};
class istream : virtual public ios {
__published:
istream(const istream&) = delete;
__extension PyObject *read(Py_ssize_t size=-1);
__extension PyObject *read1(Py_ssize_t size=-1);
__extension PyObject *readall();
__extension std::streamsize readinto(PyObject *b);
__extension PyObject *readline(Py_ssize_t size=-1);
__extension PyObject *readlines(Py_ssize_t hint=-1);
__extension PyObject *__iter__(PyObject *self);
int get();
streampos tellg();
void seekg(streampos pos);
void seekg(streamoff off, ios_base::seekdir dir);
protected:
istream(istream &&);
};
class iostream : public istream, public ostream {
__published:
iostream(const iostream&) = delete;
void flush();
protected:
iostream(iostream &&);
};
class ofstream : public ostream {
__published:
ofstream();
void close();
};
class ifstream : public istream {
__published:
ifstream();
void close();
};
class fstream : public iostream {
__published:
fstream();
void close();
};
extern istream cin;
extern ostream cout;
extern ostream cerr;
}
#endif