Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::Common::VBase Class Referenceabstract

A pure virtual Base class for reading and writing object. More...

#include "<SaS/Common/VBase.hpp>"

+ Inheritance diagram for SoftwareAndServices::Library::Common::VBase:

Public Types

enum  IOError {
  NoError_t, FileObjectNotOpen_t, RemoteEndClosedConnection_t, TimeOut_t,
  IoInterrupted_t
}
 An enumerated list of basic I/O errors. More...
 

Public Member Functions

virtual bool readObject (File *file) const =0
 Read yourself from the File object. More...
 
virtual bool writeObject (File *file) const =0
 Write yourself to the File object. More...
 

Detailed Description

A pure virtual Base class for reading and writing object.

Definition at line 81 of file VBase.hpp.

Member Enumeration Documentation

◆ IOError

An enumerated list of basic I/O errors.

Enumerator
NoError_t 

No error occurred.

FileObjectNotOpen_t 

The File object is nullptr or not open.

RemoteEndClosedConnection_t 

The remote end closed the connection.

TimeOut_t 

The connection timed out.

No data can be transferred.

IoInterrupted_t 

Something sent an interrupt or signal that stopped the transfer - retry.

The read count (or write count) will tell you how much was successfully transferred. Resume and retry with any remaining data.

Definition at line 89 of file VBase.hpp.

Member Function Documentation

◆ readObject()

virtual bool SoftwareAndServices::Library::Common::VBase::readObject ( File file) const
pure virtual

Read yourself from the File object.

Parameters
fileAn open File object to read the data from.
Returns
TRUE if read okay.
Exceptions
IOErroron network read error.

◆ writeObject()

virtual bool SoftwareAndServices::Library::Common::VBase::writeObject ( File file) const
pure virtual

Write yourself to the File object.

Parameters
fileAn open File object to write the data from.
Returns
TRUE if write okay.
Exceptions
IOErroron network write error.

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