Public Member Functions | Private Member Functions | Private Attributes | List of all members
GENAPI_NAMESPACE::FileProtocolAdapter Class Reference

Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem. More...

#include <Filestream.h>

Inheritance diagram for GENAPI_NAMESPACE::FileProtocolAdapter:
Inheritance graph
[legend]

Public Member Functions

virtual bool attach (GENAPI_NAMESPACE::INodeMap *pInterface)
 attach file protocol adapter to nodemap More...
 
virtual bool closeFile (const char *pFileName)
 close a file on the device More...
 
virtual bool deleteFile (const char *pFileName)
 Delete the content of the file. More...
 
 FileProtocolAdapter ()
 Constructor. More...
 
virtual int64_t getBufSize (const char *pFileName, std::ios_base::openmode mode)
 fetch max FileAccessBuffer length for a file More...
 
virtual bool openFile (const char *pFileName, std::ios_base::openmode mode)
 open a file on the device More...
 
virtual GenICam_streamsize read (char *buf, int64_t offs, GenICam_streamsize len, const char *pFileName)
 read data from the device into a buffer More...
 
virtual GenICam_streamsize write (const char *buf, int64_t offs, int64_t len, const char *pFileName)
 writes data into a file More...
 
virtual ~FileProtocolAdapter ()
 

Private Member Functions

 FileProtocolAdapter (const FileProtocolAdapter &)
 
FileProtocolAdapteroperator= (const FileProtocolAdapter &)
 
void WaitUntilFileOperationExecuteDone (bool Validate=true)
 

Private Attributes

FileProtocolAdapterImpl * m_pImpl
 

Detailed Description

Adapter between the std::iostreambuf and the SFNC Features representing the device filesystem.

The adapter assumes, that the features provide stdio fileaccess compatible semantic

Definition at line 106 of file Filestream.h.

Constructor & Destructor Documentation

GENAPI_NAMESPACE::FileProtocolAdapter::FileProtocolAdapter ( )

Constructor.

virtual GENAPI_NAMESPACE::FileProtocolAdapter::~FileProtocolAdapter ( )
virtual
GENAPI_NAMESPACE::FileProtocolAdapter::FileProtocolAdapter ( const FileProtocolAdapter )
private

Member Function Documentation

virtual bool GENAPI_NAMESPACE::FileProtocolAdapter::attach ( GENAPI_NAMESPACE::INodeMap pInterface)
virtual

attach file protocol adapter to nodemap

Parameters
pInterfaceNodeMap of the device to which the FileProtocolAdapter is attached
Returns
true if attach was successful, false if not
virtual bool GENAPI_NAMESPACE::FileProtocolAdapter::closeFile ( const char *  pFileName)
virtual

close a file on the device

Parameters
pFileNamefile name of the file to open. The file name must exist in the Enumeration FileSelector
Returns
true on success, false on error
virtual bool GENAPI_NAMESPACE::FileProtocolAdapter::deleteFile ( const char *  pFileName)
virtual

Delete the content of the file.

Parameters
pFileNamefile name of the file to open. The file name must exist in the Enumeration FileSelector
Returns
true on success, false on error
virtual int64_t GENAPI_NAMESPACE::FileProtocolAdapter::getBufSize ( const char *  pFileName,
std::ios_base::openmode  mode 
)
virtual

fetch max FileAccessBuffer length for a file

Parameters
pFileNamefile name of the file to open. The file name must exist in the Enumeration FileSelector
modemode to open the file. The mode must exist in the Enumeration FileOpenMode
Returns
max length of FileAccessBuffer in the given mode on the given file
virtual bool GENAPI_NAMESPACE::FileProtocolAdapter::openFile ( const char *  pFileName,
std::ios_base::openmode  mode 
)
virtual

open a file on the device

Parameters
pFileNamefile name of the file to open. The file name must exist in the Enumeration FileSelector
modemode to open the file. The mode must exist in the Enumeration FileOpenMode
Returns
true on success, false on error
FileProtocolAdapter& GENAPI_NAMESPACE::FileProtocolAdapter::operator= ( const FileProtocolAdapter )
private
virtual GenICam_streamsize GENAPI_NAMESPACE::FileProtocolAdapter::read ( char *  buf,
int64_t  offs,
GenICam_streamsize  len,
const char *  pFileName 
)
virtual

read data from the device into a buffer

Parameters
buftarget buffer
offsoffset in the device file to read from
lencount of bytes to read
pFileNamefile name of the file to write into. The file name must exist in the Enumeration FileSelector
Returns
count of bytes successfully read. . If less than len bytes are written an error has occurred.
void GENAPI_NAMESPACE::FileProtocolAdapter::WaitUntilFileOperationExecuteDone ( bool  Validate = true)
private
virtual GenICam_streamsize GENAPI_NAMESPACE::FileProtocolAdapter::write ( const char *  buf,
int64_t  offs,
int64_t  len,
const char *  pFileName 
)
virtual

writes data into a file

Parameters
bufsource buffer
offsoffset into the device file
lencount of bytes to write
pFileNamefile name of the file to write into. The file name must exist in the Enumeration FileSelector
Returns
count of bytes written. If less than len bytes are written an error has occurred.

Member Data Documentation

FileProtocolAdapterImpl* GENAPI_NAMESPACE::FileProtocolAdapter::m_pImpl
private

Definition at line 243 of file Filestream.h.


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


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:42