#include <Service.h>

Public Member Functions | |
| T * | get () const |
| T * | operator-> () const |
For example, the following code:
ModelServices* pModelServices = NULL; ModuleManager::instance()->getService()->queryInterface("ModelServices2", reinterpret_cast<void**>(&pModelServices)); bool bHasElement = pModelServices->hasElementType("AoiElement");
Would instead be:
Service<ModelServices> pModelServices; bool bHasElement = pModelServices->hasElementType("AoiElement");
The following can also be done:
bool bHasElement = Service<ModelServices>()->hasElementType("AoiElement");
This templated class can ONLY be used with the defined template specializations or a link-time error will occur. The specializations are:
Tutorial/Tutorial1.cpp, Tutorial/Tutorial2.cpp, Tutorial/Tutorial3.cpp, Tutorial/Tutorial4.cpp, and Tutorial/Tutorial5.cpp.
Definition at line 50 of file Service.h.
| T* Service< T >::get | ( | ) | const |
Provides direct access to the Service pointer.
| T* Service< T >::operator-> | ( | ) | const |