mvIMPACT Acquire SDK C++
IDevFileStreamBuf< CharType, Traits > Class Template Reference

An input stream buffer derived from std::basic_streambuf used to read from a file of a device. More...

#include <mvIMPACT_acquire_GenICam_FileStream.h>

Inheritance diagram for IDevFileStreamBuf< CharType, Traits >:
[legend]

Public Member Functions

filebuf_typeclose (void)
 Closes a file on the device.
 
 IDevFileStreamBuf ()
 Constructs a new mvIMPACT::acquire::GenICam::IDevFileStreamBuf object.
 
bool is_open (void) const
 Determines if a file is open.
 
filebuf_typeopen (mvIMPACT::acquire::Device *pDev, const char *pFileName, std::ios_base::openmode mode=std::ios_base::in)
 Opens a file on the device.
 
std::streamsize size (void) const
 Fetch the size of the file currently selected on the device.
 
 ~IDevFileStreamBuf ()
 class destructor.
 

Protected Member Functions

int_type pbackfail (int_type c)
 
int_type underflow (void)
 

Detailed Description

template<typename CharType, typename Traits>
class mvIMPACT::acquire::GenICam::IDevFileStreamBuf< CharType, Traits >

An input stream buffer derived from std::basic_streambuf used to read from a file of a device.

Note
See description of the std::basic_streambuf in a STL implementation of your choice to find out more about how to use this object.

Constructor & Destructor Documentation

◆ IDevFileStreamBuf()

◆ ~IDevFileStreamBuf()

~IDevFileStreamBuf ( )
inline

class destructor.

Member Function Documentation

◆ close()

filebuf_type * close ( void  )
inline

Closes a file on the device.

Returns
  • A pointer to itself if successful
  • 0 otherwise

◆ is_open()

bool is_open ( void  ) const
inline

Determines if a file is open.

Returns
  • true if the file is open
  • false otherwise

◆ open()

filebuf_type * open ( mvIMPACT::acquire::Device pDev,
const char *  pFileName,
std::ios_base::openmode  mode = std::ios_base::in 
)
inline

Opens a file on the device.

The member function calls rdbuf -> open(_Filename, _Mode | ios_base::in). If open fails, the function calls setstate(failbit), which may throw an ios_base::failure exception.

Parameters
pDevA pointer to a mvIMPACT::acquire::Device object obtained from a mvIMPACT::acquire::DeviceManager object.
pFileNameName of the file to open
modeFile open mode. One of the enumerations in ios_base::openmode

◆ pbackfail()

int_type pbackfail ( int_type  c)
inlineprotected

◆ size()

std::streamsize size ( void  ) const
inline

Fetch the size of the file currently selected on the device.

Returns
The size(in bytes) of the file currently selected.

◆ underflow()

int_type underflow ( void  )
inlineprotected