Home | History | Annotate | Download | only in utils

Lines Matching refs:TYPE

27 template <typename TYPE>
31 static TYPE& getInstance() {
33 TYPE* instance = sInstance;
35 instance = new TYPE();
49 static TYPE* sInstance;
53 * use ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) in your implementation file
54 * (eg: <TYPE>.cpp) to create the static instance of Singleton<>'s attributes,
55 * and avoid to have a copy of them in each compilation units Singleton<TYPE>
61 #define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) \
62 template class Singleton< TYPE >; \
63 template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE); \
64 template<> TYPE* Singleton< TYPE >::sInstance(0);