tizen 2.4 release
[framework/web/wrt-commons.git] / modules / core / src / once.cpp
similarity index 78%
rename from modules_mobile/event/src/model.cpp
rename to modules/core/src/once.cpp
index 58e9a1b..3f3cc4e 100644 (file)
  *    limitations under the License.
  */
 /*
- * @file        model.cpp
+ * @file        once.cpp
  * @author      Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
  * @version     1.0
- * @brief       This file is the implementation file of model
+ * @brief       This file is the implementation file of once
  */
-#include <stddef.h>
-#include <dpl/event/model.h>
+#include <dpl/once.h>
 
 namespace DPL {
-namespace Event {
-Model::~Model()
+Once::Once()
 {}
+
+void Once::Call(Delegate delegate)
+{
+    // Call delegate
+    std::call_once(m_callFlag, delegate);
 }
 } // namespace DPL