Public Member Functions | Private Member Functions | Private Attributes | List of all members
cISFileStream Class Reference

#include <ISStream.h>

Inheritance diagram for cISFileStream:
Inheritance graph
[legend]

Public Member Functions

 cISFileStream ()
 
int Close () OVERRIDE
 
bool Eof ()
 
int Flush () OVERRIDE
 
long long GetBytesAvailableToRead () OVERRIDE
 
bool Open (const std::string &path, const char *mode)
 
int Read (void *buffer, int count) OVERRIDE
 
int Write (const void *buffer, int count) OVERRIDE
 
- Public Member Functions inherited from cISStream
 cISStream ()
 
virtual ~cISStream ()
 

Private Member Functions

 cISFileStream (const cISFileStream &copy)
 

Private Attributes

FILE * m_file
 

Detailed Description

Definition at line 77 of file ISStream.h.

Constructor & Destructor Documentation

◆ cISFileStream() [1/2]

cISFileStream::cISFileStream ( )

Constructor

Definition at line 25 of file ISStream.cpp.

◆ cISFileStream() [2/2]

cISFileStream::cISFileStream ( const cISFileStream copy)
private

Member Function Documentation

◆ Close()

int cISFileStream::Close ( )
virtual

Close the file

Returns
0 if success, otherwise an error code

Reimplemented from cISStream.

Definition at line 64 of file ISStream.cpp.

◆ Eof()

bool cISFileStream::Eof ( )

Gets whether the file has hit end of file during read

Returns
true if end of file, false otherwise

Definition at line 102 of file ISStream.cpp.

◆ Flush()

int cISFileStream::Flush ( )
virtual

Flush the file, causing any pending writes to be written to disk

Returns
0 if success, otherwise an error code

Reimplemented from cISStream.

Definition at line 55 of file ISStream.cpp.

◆ GetBytesAvailableToRead()

long long cISFileStream::GetBytesAvailableToRead ( )
virtual

Gets the number of bytes available to read

Returns
The number of bytes available to read or -1 if this feature is not supported

Reimplemented from cISStream.

Definition at line 75 of file ISStream.cpp.

◆ Open()

bool cISFileStream::Open ( const std::string &  path,
const char *  mode 
)

Open a file. If the file is writeable and does not exist, it is created. If the file was already opened, it is closed first.

Parameters
paththe file path
modethe file open mode (i.e. r or rw, etc.)
Returns
true if success, false if failure

Definition at line 30 of file ISStream.cpp.

◆ Read()

int cISFileStream::Read ( void *  buffer,
int  count 
)
virtual

Read n bytes from the file

Parameters
bufferthe buffer to read into
countthe max count of bytes to read
Returns
the number of bytes read, -1 if reading is not supported, 0 if no bytes available

Reimplemented from cISStream.

Definition at line 37 of file ISStream.cpp.

◆ Write()

int cISFileStream::Write ( const void *  buffer,
int  count 
)
virtual

Write n bytes from the file to buffer

Parameters
bufferthe buffer to write into
countthe max count of bytes to write
Returns
the number of bytes written, -1 if writing is not supported, 0 if no bytes written

Reimplemented from cISStream.

Definition at line 46 of file ISStream.cpp.

Member Data Documentation

◆ m_file

FILE* cISFileStream::m_file
private

Definition at line 134 of file ISStream.h.


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


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:09