Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

VTQL::QMError_flag Class Reference

Handle errors at command execution. More...

#include <vtql_query.h>

List of all members.

Public Types

enum  { QME_RUNNING = -1, QME_SUCCESS, QME_VOID, QME_ERROR }
 Acutal state of the command. More...


Public Methods

 QMError_flag (size_t id=0)
 Init this object to a WriteID and set QME_RUNNING flag. More...

void SetID (size_t i)
 Set the WriteID. More...

void Handle (const Query_generic::CallB::CBFunct::Arg &p)
 Check a callback argument for messages. More...


Public Attributes

enum VTQL::QMError_flag:: { ... }  Err
 Acutal state of the command. More...

std::string sErr
 almost the same as the Err flag, but as string.

std::string sMsg


Detailed Description

Handle errors at command execution.

This function is very handy if you want to know about the status of the execution of a command, such as VTQL syntax errors. Since this is a flag if the CQModul, the server errors are handled autmatically and if you inherit from CQModul and you have a unified design.


Member Enumeration Documentation

anonymous enum
 

Acutal state of the command.

If you Wait(bool) did return true, you can get the success status of the command. If you do not know about that return value, you can check for the QME_RUNNING flag.

Enumeration values:
QME_RUNNING  the query is not completed yet.
QME_SUCCESS  the last query returned sucessfully.
QME_VOID  the last query was a void query (empty line).
QME_ERROR  an error sMsg occured on last query.


Constructor & Destructor Documentation

VTQL::QMError_flag::QMError_flag size_t    id = 0 [inline]
 

Init this object to a WriteID and set QME_RUNNING flag.

Parameters:
id  WriteID you want to watch.
See also:
Query_generic::LatestWriteID()


Member Function Documentation

void VTQL::QMError_flag::SetID size_t    i [inline]
 

Set the WriteID.

Parameters:
id  WriteID you want to watch.
See also:
Query_generic::LatestWriteID()

void VTQL::QMError_flag::Handle const Query_generic::CallB::CBFunct::Arg &    p
 

Check a callback argument for messages.

This class expect of course to be attaced to a Query_generic instance. This method is called by the callback handler of CQModul.

Parameters:
p  The callback argument


Member Data Documentation

enum { ... } VTQL::QMError_flag::Err
 

Acutal state of the command.

If you Wait(bool) did return true, you can get the success status of the command. If you do not know about that return value, you can check for the QME_RUNNING flag.

std::string VTQL::QMError_flag::sMsg
 

If QME_ERROR is set, this containts the error message of the server, "" otherwise


The documentation for this class was generated from the following file:
Generated on Sun Apr 14 17:37:04 2002 for libvtql by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002