Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
MultilogDevice Class Reference

#include <multilogdevice.h>

Public Member Functions

 MultilogDevice (int flags)
 
 ~MultilogDevice ()
 
std::string service (void) const
 
- Public Member Functions inherited from IODevice
 IODevice (int f=0)
 
virtual ~IODevice (void)
 
void clear (void)
 
void setFlags (unsigned int f)
 
void clearFlags (unsigned int f)
 
void setMaxInputBufferSize (unsigned int max)
 
void setMaxOutputBufferSize (unsigned int max)
 
void setTimeout (unsigned int t)
 
unsigned int getTimeout (void) const
 
void setOutputLevel (LogLevel level)
 
LogLevel getOutputLevel (void) const
 
void setOutputLevelLimit (LogLevel level)
 
LogLevel getOutputLevelLimit (void) const
 
unsigned int getReadCount (void) const
 
unsigned int getWriteCount (void) const
 
void enableProtocolDumping (void)
 
template<class T >
IODeviceoperator<< (const T &source)
 
IODeviceoperator<< (std::ostream &(*source)(std::ostream &))
 
virtual bool canRead (void) const
 
bool readStr (std::string *dest, unsigned int max=0)
 
bool readChar (char *dest=0)
 
void unreadChar (char c)
 
void unreadStr (const std::string &s)
 
bool skipTo (char c)
 
bool flush (void)
 
Error getLastError (void) const
 
std::string getLastErrorString (void) const
 
virtual std::string service (void) const
 

Protected Member Functions

bool waitForWrite (void) const
 
bool waitForRead (void) const
 
WriteResult write (void)
 
bool fillInputBuffer (void)
 
virtual bool waitForWrite (void) const
 
virtual bool waitForRead (void) const
 
virtual WriteResult write (void)
 
virtual bool fillInputBuffer (void)
 

Additional Inherited Members

- Public Types inherited from IODevice
enum  Flags {
  None = 0 , FlushesOnEndl = 1 << 0 , HasInputLimit = 1 << 1 , HasOutputLimit = 1 << 2 , IsEnabled = 1 << 3 ,
  HasTimeout = 1 << 4
}
 
enum  Error { Unknown , Timeout }
 
enum  LogLevel { ErrorLevel , InfoLevel , WarningLevel , DebugLevel }
 
- Protected Types inherited from IODevice
enum  WriteResult { WriteWait = 0 , WriteDone = 1 << 0 , WriteError = 1 << 1 }
 
- Protected Attributes inherited from IODevice
BincStream inputBuffer
 
BincStream outputBuffer
 
unsigned int flags
 
unsigned int maxInputBufferSize
 
unsigned int maxOutputBufferSize
 
unsigned int timeout
 
unsigned int readCount
 
unsigned int writeCount
 
LogLevel outputLevel
 
LogLevel outputLevelLimit
 
Error error
 
std::string errorString
 
int dumpfd
 

Detailed Description

Definition at line 13 of file multilogdevice.h.

Constructor & Destructor Documentation

◆ MultilogDevice()

MultilogDevice ( int  flags)

Definition at line 20 of file multilogdevice.cc.

◆ ~MultilogDevice()

~MultilogDevice ( void  )

Definition at line 25 of file multilogdevice.cc.

Member Function Documentation

◆ fillInputBuffer()

bool fillInputBuffer ( void  )
protectedvirtual

Reads data from the device, and stores it in the input buffer. Returns true on success; otherwise returns false.

This method will fail if there is no more data available, if a timeout occurred or if an error with the device prevents more data from being read.

The number of bytes read from the device is undefined.

Reimplemented from IODevice.

Definition at line 83 of file multilogdevice.cc.

◆ service()

string service ( void  ) const
virtual

Returns the type of service provided by this device. Two valid return values are "client" and "log".

Reimplemented from IODevice.

Definition at line 30 of file multilogdevice.cc.

◆ waitForRead()

bool waitForRead ( void  ) const
protectedvirtual

Waits until data can be read from the device.

See also
waitForWrite()

Reimplemented from IODevice.

Definition at line 53 of file multilogdevice.cc.

◆ waitForWrite()

bool waitForWrite ( void  ) const
protectedvirtual

Waits until data can be written to the device. If the timeout is 0, this function waits indefinitely. Otherwise, it waits until the timeout has expired.

If this function returns true, data can be written to the device; otherwise, getLastError() must be checked to determine whether a timeout occurred or whether an error with the device prevents further writing.

Reimplemented from IODevice.

Definition at line 36 of file multilogdevice.cc.

Here is the call graph for this function:

◆ write()

IODevice::WriteResult write ( void  )
protectedvirtual

Writes as much data as possible to the device. If some but not all data was written, returns WriteWait. If all data was written, returns WriteDone. If an error occurred, returns WriteError.

Reimplemented from IODevice.

Definition at line 59 of file multilogdevice.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

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