cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
msgpack_light::file_output_stream Class Referencefinal

Class of streams to write data to files. More...

#include <msgpack_light/file_output_stream.h>

Inheritance diagram for msgpack_light::file_output_stream:
Collaboration diagram for msgpack_light::file_output_stream:

Public Member Functions

 file_output_stream (const char *file_path)
 Constructor.
 file_output_stream (const file_output_stream &)=delete
 file_output_stream (const std::string &file_path)
 Constructor.
 file_output_stream (file_output_stream &&)=delete
 ~file_output_stream ()
 Destructor.
file_output_streamoperator= (const file_output_stream &)=delete
file_output_streamoperator= (file_output_stream &&)=delete
void write (const unsigned char *data, std::size_t size) override
 Write data.
Public Member Functions inherited from msgpack_light::output_stream
 output_stream ()=default
 Constructor.

Private Attributes

std::FILE * file_
 File descriptor.

Additional Inherited Members

Protected Member Functions inherited from msgpack_light::output_stream
 output_stream (const output_stream &)=default
 Copy constructor.
 output_stream (output_stream &&)=default
 Move constructor.
 ~output_stream ()=default
 Destructor.
output_streamoperator= (const output_stream &)=default
 Copy assignment operator.
output_streamoperator= (output_stream &&)=default
 Move assignment operator.

Detailed Description

Class of streams to write data to files.

Definition at line 33 of file file_output_stream.h.

Constructor & Destructor Documentation

◆ file_output_stream() [1/2]

msgpack_light::file_output_stream::file_output_stream ( const char * file_path)
inlineexplicit

Constructor.

Parameters
[in]file_pathFile path.

Definition at line 40 of file file_output_stream.h.

◆ file_output_stream() [2/2]

msgpack_light::file_output_stream::file_output_stream ( const std::string & file_path)
inlineexplicit

Constructor.

Parameters
[in]file_pathFile path.

Definition at line 53 of file file_output_stream.h.

◆ ~file_output_stream()

msgpack_light::file_output_stream::~file_output_stream ( )
inline

Destructor.

Definition at line 64 of file file_output_stream.h.

Member Function Documentation

◆ write()

void msgpack_light::file_output_stream::write ( const unsigned char * data,
std::size_t size )
inlineoverridevirtual

Write data.

Parameters
[in]dataPointer to the data.
[in]sizeSize of the data.

Implements msgpack_light::output_stream.

Definition at line 72 of file file_output_stream.h.

Member Data Documentation

◆ file_

std::FILE* msgpack_light::file_output_stream::file_
private

File descriptor.

Definition at line 80 of file file_output_stream.h.


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