Added base class AIStateMachine.
This is the skeleton needed to implement classes that can be reused and work together, which can perform asynchronous tasks (read: need to wait for certain events before they can continue). An example would be the task of waiting for a given inventory folder to be read. This could then be used to improve the builtin AO (automatically reading that folder when a notecard is dropped, and continuing when the whole folder is read). It's first use will be communication with a filepicker that runs in a plugin.
This commit is contained in:
@@ -53,9 +53,11 @@ public:
|
||||
|
||||
protected:
|
||||
// Use a list so that the callbacks are ordered in case that matters
|
||||
typedef std::pair<callback_t,void*> callback_pair_t;
|
||||
typedef std::pair<callback_t,void*> callback_pair_t; // callback_t is a (function) pointer. If it is NULL it means that the entry should be considered deleted.
|
||||
typedef std::list<callback_pair_t > callback_list_t;
|
||||
callback_list_t mCallbackList;
|
||||
bool mLoopingOverCallbackList; // True while looping over mCallbackList and calling the callback_t functions (see callFunctions).
|
||||
bool mNeedErase; // True when deleteFunction was called while mLoopingOverCallbackList was true.
|
||||
};
|
||||
|
||||
extern LLCallbackList gIdleCallbacks;
|
||||
|
||||
Reference in New Issue
Block a user