HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_OFStream Class Reference

Portable replacement for std::ofstream. More...

#include <UT_OFStream.h>

+ Inheritance diagram for UT_OFStream:

Public Types

typedef std::ostream SUPER_CLASS
 
typedef std::ios_base IOS_BASE
 
typedef std::ios_base::openmode OPEN_MODE
 

Public Member Functions

 UT_OFStream ()
 Construct with no opened file. More...
 
 ~UT_OFStream () override
 Destructor. More...
 
void close ()
 Close the stream. More...
 
UT_FileBufrdbuf () const
 Return pointer to internal filebuf object. More...
 
bool is_open () const
 Returns whether stream is currently associated to a file. More...
 
 UT_OFStream (const char *filename, OPEN_MODE mode=IOS_BASE::out, UT_IOS_TYPE mode_type=UT_IOS_BINARY)
 
 UT_OFStream (const std::string &filename, OPEN_MODE mode=IOS_BASE::out, UT_IOS_TYPE mode_type=UT_IOS_BINARY)
 
void open (const char *filename, OPEN_MODE mode=IOS_BASE::out, UT_IOS_TYPE mode_type=UT_IOS_BINARY)
 
void open (const std::string &filename, OPEN_MODE mode=IOS_BASE::out, UT_IOS_TYPE mode_type=UT_IOS_BINARY)
 

Detailed Description

Portable replacement for std::ofstream.

Note
Files will always be opened in binary mode to avoid platform differences for line endings.
Examples:
ROP/ROP_Dumper.C, and standalone/geo2voxel.C.

Definition at line 26 of file UT_OFStream.h.

Member Typedef Documentation

typedef std::ios_base UT_OFStream::IOS_BASE

Definition at line 30 of file UT_OFStream.h.

typedef std::ios_base::openmode UT_OFStream::OPEN_MODE

Definition at line 31 of file UT_OFStream.h.

typedef std::ostream UT_OFStream::SUPER_CLASS

Definition at line 29 of file UT_OFStream.h.

Constructor & Destructor Documentation

UT_OFStream::UT_OFStream ( )
inline

Construct with no opened file.

Definition at line 34 of file UT_OFStream.h.

UT_OFStream::UT_OFStream ( const char *  filename,
OPEN_MODE  mode = IOS_BASE::out,
UT_IOS_TYPE  mode_type = UT_IOS_BINARY 
)
inlineexplicit

Construct with file path

Definition at line 41 of file UT_OFStream.h.

UT_OFStream::UT_OFStream ( const std::string filename,
OPEN_MODE  mode = IOS_BASE::out,
UT_IOS_TYPE  mode_type = UT_IOS_BINARY 
)
inlineexplicit

Construct with file path

Definition at line 49 of file UT_OFStream.h.

UT_OFStream::~UT_OFStream ( )
inlineoverride

Destructor.

Definition at line 60 of file UT_OFStream.h.

Member Function Documentation

void UT_OFStream::close ( )
inline

Close the stream.

Definition at line 81 of file UT_OFStream.h.

bool UT_OFStream::is_open ( ) const
inline

Returns whether stream is currently associated to a file.

Definition at line 95 of file UT_OFStream.h.

void UT_OFStream::open ( const char *  filename,
OPEN_MODE  mode = IOS_BASE::out,
UT_IOS_TYPE  mode_type = UT_IOS_BINARY 
)
inline

Open with file path

Definition at line 68 of file UT_OFStream.h.

void UT_OFStream::open ( const std::string filename,
OPEN_MODE  mode = IOS_BASE::out,
UT_IOS_TYPE  mode_type = UT_IOS_BINARY 
)
inline

Open with file path

Definition at line 73 of file UT_OFStream.h.

UT_FileBuf* UT_OFStream::rdbuf ( ) const
inline

Return pointer to internal filebuf object.

Definition at line 88 of file UT_OFStream.h.


The documentation for this class was generated from the following file: