Hooks
- Added ::initialize method.
This commit is contained in:
@@ -221,12 +221,8 @@ int Context::initialize (int argc, const char** argv)
|
|||||||
// Initialize the database.
|
// Initialize the database.
|
||||||
tdb2.set_location (data_dir);
|
tdb2.set_location (data_dir);
|
||||||
|
|
||||||
/*
|
// First opportunity to run a hook script.
|
||||||
// Hook system init, plus post-start event occurring at the first possible
|
|
||||||
// moment after hook initialization.
|
|
||||||
hooks.initialize ();
|
hooks.initialize ();
|
||||||
hooks.trigger ("on-launch");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (const std::string& message)
|
catch (const std::string& message)
|
||||||
|
|||||||
@@ -40,5 +40,11 @@ Hooks::~Hooks ()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void Hooks::initialize ()
|
||||||
|
{
|
||||||
|
// TODO Scan <rc.data.location>/hooks
|
||||||
|
}
|
||||||
|
|
||||||
// TODO Time the hook runs.
|
// TODO Time the hook runs.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public:
|
|||||||
Hooks (const Hooks&); // Deliberately unimplemented
|
Hooks (const Hooks&); // Deliberately unimplemented
|
||||||
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
||||||
|
|
||||||
|
void initialize ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user