Class AsyncQueryHelper

From TrainzOnline
Jump to: navigation, search


AsyncQueryHelper is a generic base class for asynchronous (non-blocking) queries. Most notably, it is inherited by the AsyncObjectSearchResult class.

Contents

Constants

  • These constants are used to define various values and can be used as mnenomics.
  • If accessed from scripts the values must be prefixed AsyncQueryHelper., for example:
int errorCode = AsyncQueryHelper.ERROR_INVALID_STATE


Search Errors and Warnings


public define int ERROR_NONE = 0 Query completed without error
public define int ERROR_FLOOD = 1 System is flooded, query was not run
public define int ERROR_INVALID_STATE = 2 Invalid state for query. This is the initial state of an AsyncQueryHelper object.
public define int ERROR_NOT_COMPLETE = 3 Query is still running
public define int WARN_MORE_RESULTS = 101 Query aborted early because result limit was hit

Error and Warning Number Ranges


public define int WARNINGS_START = 100 Error codes above 100 are warnings. Code 100 is not a valid result.
public define int CUSTOM_ERROR_START = 1000 Extending classes may define custom error codes between 1000 and 2000
public define int CUSTOM_WARN_START = 2000 Extending classes may define custom warning codes above 2000

Related Messages

  • The major parameter of messages may be customised by the inheriting class, via the GetMessageMajor() function, however this should be avoided unless it is absolutely necessary.


Major Minor Source Destination Description
AsyncQuery AsyncResult AsyncObjectSearchResult Broadcast Query is complete.
AsyncQuery Failure AsyncObjectSearchResult Broadcast Query has failed, call GetQueryErrorCode for more information.

Methods


Related Classes



Categories

Personal tools