mxnet
Classes | Public Member Functions | List of all members
dmlc::ostream Class Reference

a std::ostream class that can can wrap Stream objects, can use ostream with that output to underlying Stream More...

#include <io.h>

Inheritance diagram for dmlc::ostream:
Inheritance graph
Collaboration diagram for dmlc::ostream:
Collaboration graph

Public Member Functions

 ostream (Stream *stream, size_t buffer_size=(1<< 10))
 construct std::ostream type More...
 
virtual ~ostream () DMLC_NO_EXCEPTION
 
void set_stream (Stream *stream)
 set internal stream to be stream, reset states More...
 
size_t bytes_written (void) const
 

Detailed Description

a std::ostream class that can can wrap Stream objects, can use ostream with that output to underlying Stream

Usage example:

Stream *fs = Stream::Create("hdfs:///test.txt", "w");
os << "hello world" << std::endl;
delete fs;

Constructor & Destructor Documentation

dmlc::ostream::ostream ( Stream stream,
size_t  buffer_size = (1 << 10) 
)
inlineexplicit

construct std::ostream type

Parameters
streamthe Stream output to be used
buffer_sizeinternal streambuf size
virtual dmlc::ostream::~ostream ( )
inlinevirtual

Member Function Documentation

size_t dmlc::ostream::bytes_written ( void  ) const
inline
Returns
how many bytes we written so far
void dmlc::ostream::set_stream ( Stream stream)
inline

set internal stream to be stream, reset states

Parameters
streamnew stream as output

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