Class AsyncQueryHelper
From TrainzOnline
(Difference between revisions)
(Add partial docs on AsyncQueryHelper) |
m (→Related Messages: Fix table formatting) |
||
Line 43: | Line 43: | ||
{{TableHeader|width=50%|margin=15px}} | {{TableHeader|width=50%|margin=15px}} | ||
|- | |- | ||
− | |bgcolor="#EEEEEE"|'''Major'''||bgcolor="#EEEEEE"|'''Minor'''||bgcolor="#EEEEEE"|'''Source'''||bgcolor="#EEEEEE" |'''Destination'''|bgcolor="#EEEEEE"|'''Description''' | + | |bgcolor="#EEEEEE"|'''Major'''||bgcolor="#EEEEEE"|'''Minor'''||bgcolor="#EEEEEE"|'''Source'''||bgcolor="#EEEEEE" |'''Destination'''||bgcolor="#EEEEEE"|'''Description''' |
|- | |- | ||
|AsyncQuery||AsyncResult||AsyncObjectSearchResult||Broadcast||Query is complete. | |AsyncQuery||AsyncResult||AsyncObjectSearchResult||Broadcast||Query is complete. |
Latest revision as of 05:43, 29 December 2020
- API Hierarchy
- GSObject *
- GameObject
- AsyncQueryHelper
- GameObject
- GSObject *
AsyncQueryHelper is a generic base class for asynchronous (non-blocking) queries. Most notably, it is inherited by the AsyncObjectSearchResult class.
Contents |
[edit] 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
[edit] 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 |
[edit] 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 |
[edit] 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. |
[edit] Methods
[edit] Related Classes