Code::Blocks
SVN r11506
|
Provides static functions to add hooks to the project loading/saving procedure. More...
Classes | |
class | HookFunctor |
Functor class for use as a project loading/saving hook. More... | |
class | HookFunctorBase |
Abstract base hook functor interface. More... | |
Typedefs | |
typedef std::map< int, HookFunctorBase * > | HookFunctorsMap |
Functions | |
DLLIMPORT int | RegisterHook (HookFunctorBase *functor) |
Register a project loading/saving hook. More... | |
DLLIMPORT HookFunctorBase * | UnregisterHook (int id, bool deleteHook=true) |
Unregister a previously registered project loading/saving hook. More... | |
DLLIMPORT bool | HasRegisteredHooks () |
Are there any hooks registered? More... | |
DLLIMPORT void | CallHooks (cbProject *project, TiXmlElement *elem, bool isLoading) |
Call all registered hooks using the supplied parameters. More... | |
Variables | |
static HookFunctorsMap | s_HookFunctorsMap |
static int | s_UniqueID = 0 |
Provides static functions to add hooks to the project loading/saving procedure.
typedef std::map<int, HookFunctorBase*> ProjectLoaderHooks::HookFunctorsMap |
Definition at line 23 of file projectloader_hooks.cpp.
void ProjectLoaderHooks::CallHooks | ( | cbProject * | project, |
TiXmlElement * | elem, | ||
bool | isLoading | ||
) |
Call all registered hooks using the supplied parameters.
This is called by ProjectLoader.
project | The project in question. |
elem | The XML element under which the called hook can read/write. |
isLoading | True if the project is being loaded, false if being saved. |
Definition at line 61 of file projectloader_hooks.cpp.
References ProjectLoaderHooks::HookFunctorBase::Call(), and s_HookFunctorsMap.
Referenced by ProjectLoader::ExportTargetAsProject(), and ProjectLoader::Open().
bool ProjectLoaderHooks::HasRegisteredHooks | ( | ) |
Are there any hooks registered?
Definition at line 56 of file projectloader_hooks.cpp.
References s_HookFunctorsMap.
Referenced by ProjectLoader::ExportTargetAsProject().
int ProjectLoaderHooks::RegisterHook | ( | ProjectLoaderHooks::HookFunctorBase * | functor | ) |
Register a project loading/saving hook.
functor | The functor to use as a callback. |
Definition at line 28 of file projectloader_hooks.cpp.
References s_HookFunctorsMap, and s_UniqueID.
Referenced by NativeParser::NativeParser(), and DebuggerGDB::OnAttachReal().
ProjectLoaderHooks::HookFunctorBase * ProjectLoaderHooks::UnregisterHook | ( | int | id, |
bool | deleteHook = true |
||
) |
Unregister a previously registered project loading/saving hook.
id | The hook's ID. You should have the ID from when RegisterHook() was called. |
deleteHook | If true, the hook will be deleted (default). If not, it's up to you to delete it. |
deleteHook
was true, it always returns NULL. Definition at line 39 of file projectloader_hooks.cpp.
References s_HookFunctorsMap.
Referenced by DebuggerGDB::OnReleaseReal(), and NativeParser::~NativeParser().
|
static |
Definition at line 24 of file projectloader_hooks.cpp.
Referenced by CallHooks(), HasRegisteredHooks(), RegisterHook(), and UnregisterHook().
|
static |
Definition at line 25 of file projectloader_hooks.cpp.
Referenced by RegisterHook().