Menu

API documentation

Jochen Baier

~~~~~~~~~~
:::C++
//QuteContainer is the Inversion of Control container class. It used to register
//and resolve objects.
class QuteContainer

//Method to register Interfaces which are mapped to a class.
//'Type' must derive from 'Interface'
//With 'isSingleton' you can control the lifetime of the resolved class.
template <typename interface,="" typename="" type="">
void QuteContainer::registerType(bool isSingleton=false)</typename>

//Method to register classes directly. Useful if no interface is available.
template <typename type="">
void QuteContainer::registerType(bool isSingelton=false)</typename>

//Register an already created object. If the instance parent is 0 the lifetime
//is mananged by the QuteContainer.
void QuteContainer::registerInstance(QObject *instance);

//Method to resolve a registered interface or class
template <typename t=""> T* QuteContainer::resolve()</typename>

//Returns if a resolved singleton object is not deleted.
template <typename type=""> bool QuteContainer::isSingletonAlive()</typename>

//Method will delete a singleton object if alive. QuteContaier::Resolve() will
//create a new one.
template <typename type=""> bool QuteContainer::deleteSingleton()</typename>

//Method checks if all dependencies are fulfilled and no circular dependencies exits.
bool QuteContainer::runChecks();

//Returns the result code for each Method call. Success: QuteContainer::Success
QuteContainer::Result QuteContainer::getLastResult() {return m_lastResult;}


Related

Wiki: Home

MongoDB Logo MongoDB