14 #ifndef PANDAFILESTREAM_H 15 #define PANDAFILESTREAM_H 19 #ifdef USE_PANDAFILESTREAM 29 class EXPCL_DTOOL_DTOOLUTIL IFileStream :
public std::istream {
32 INLINE
explicit IFileStream(
const char *filename, std::ios::openmode mode = std::ios::in);
33 INLINE ~IFileStream();
35 INLINE
void open(
const char *filename, std::ios::openmode mode = std::ios::in);
39 INLINE
void attach(
const char *filename, HANDLE handle, std::ios::openmode mode = std::ios::in);
41 INLINE
void attach(
const char *filename,
int fd, std::ios::openmode mode = std::ios::in);
48 PandaFileStreamBuf _buf;
57 class EXPCL_DTOOL_DTOOLUTIL OFileStream :
public std::ostream {
60 INLINE
explicit OFileStream(
const char *filename, std::ios::openmode mode = std::ios::out);
61 INLINE ~OFileStream();
63 INLINE
void open(
const char *filename, std::ios::openmode mode = std::ios::out);
67 INLINE
void attach(
const char *filename, HANDLE handle, std::ios::openmode mode = std::ios::out);
69 INLINE
void attach(
const char *filename,
int fd, std::ios::openmode mode = std::ios::out);
76 PandaFileStreamBuf _buf;
86 class EXPCL_DTOOL_DTOOLUTIL FileStream :
public std::iostream {
89 INLINE
explicit FileStream(
const char *filename, std::ios::openmode mode = std::ios::in);
92 INLINE
void open(
const char *filename, std::ios::openmode mode = std::ios::in);
96 INLINE
void attach(
const char *filename, HANDLE handle, std::ios::openmode mode);
98 INLINE
void attach(
const char *filename,
int fd, std::ios::openmode mode);
105 PandaFileStreamBuf _buf;
110 typedef IFileStream pifstream;
111 typedef OFileStream pofstream;
112 typedef FileStream pfstream;
114 #else // USE_PANDAFILESTREAM 116 typedef ifstream pifstream;
117 typedef ofstream pofstream;
118 typedef fstream pfstream;
120 #endif // USE_PANDAFILESTREAM PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.