2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUiEffects_EffectManagerImpl.h
19 * @brief This is the header file for the _EffectManagerImpl class
22 #ifndef _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_
23 #define _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_
26 #include <unique_ptr.h>
28 namespace Tizen { namespace Base {
32 namespace Tizen { namespace Ui { namespace Effects
38 class _EffectManagerImpl
40 typedef std::pair<EffectManager*, _EffectManagerImpl*> ManagerAndImplPair;
44 * Gets the effect manager instance.
48 * @return A pointer to the %EffectManager instance
49 * @exception E_SUCCESS The %EffectManager instance is constructed successfully.
50 * @exception E_OUT_OF_MEMORY The memory is insufficient.
51 * @exception E_OPERATION_FAILED The system has failed to initialize the 3D system.
53 static ManagerAndImplPair GetInstance(void);
56 * Destroys all previously created effects and their resources. @n
57 * Application can use OpenGL APIs only after invoking this method.
61 static void DestroyInstance(void);
64 * Creates a new effect from specialised effect file
68 * @return If success - pointer to effect; if failed - null
69 * @param [in] filePath The file path of the effect
70 * @exception E_OUT_OF_MEMORY Insufficient memory
71 * @exception E_FILE_NOT_FOUND The effect file specified doesn't exist
72 * @exception E_PARSING_FAILED Syntax Error in the effect file (structure or script)
73 * @see UnregisterEffectFile()
76 Effect* CreateEffect(const Tizen::Base::String& filePath);
79 * Deletes an effect specified
83 * @return An error code
84 * @param [in] effect Reference to effect to be destroyed
85 * @exception E_SUCCESS The effect specified was successfully destroyed
86 * @see RegisterEffectFile()
89 void DestroyEffect(Effect& effect);
97 * @exception E_OUT_OF_MEMORY _EffectManagerImpl instance can not be created
100 _EffectManagerImpl(void);
103 * Destructor for _EffectManagerImpl
109 ~_EffectManagerImpl(void);
111 static void InitSingleton(void);
115 static const char* __pPathToEffectFile;
117 friend class _EffectImpl; // <-- for access to private area of class _EffectManagerImpl from class Effect
118 friend class boost::default_delete<_EffectManagerImpl>; //for deleting unique_ptr<_EffectManagerImpl> instance in InitSingleton function
121 } } } //Tizen::Ui::Effects
123 #endif // _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_