__state = _EFFECT_STATE_RUNTIME_ERROR;
unique_ptr<ScriptProcessing> pScript(new (std::nothrow) ScriptProcessing(pPathToScript, this));
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, pScript.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY);
result res = GetLastResult();
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, res == E_SUCCESS, res, GetErrorMessage(res));
unique_ptr<TypeMSurfacesCollection, ModelSurfacesCollectionDeleter> pMSurfacesCollection(new (std::nothrow) TypeMSurfacesCollection, ModelSurfacesCollectionDeleter());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMSurfacesCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY);
unique_ptr<TypeMapElements> pMapElements(new (std::nothrow) TypeMapElements);
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMapElements.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY);
unique_ptr<TypeMapGSurface> pMapGSurface(new (std::nothrow) TypeMapGSurface);
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMapGSurface.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY);
unique_ptr<RenderDataScene> pRenderDataScene(new (std::nothrow) RenderDataScene());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, pRenderDataScene.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY);
__state = _EFFECT_STATE_INITIALIZING;
if (pEMListener == null)
{
- SysSecureLogException(NID_UI_EFFECT, E_SYSTEM, "The pointer to EffectModelListener is null!");
__state = _EFFECT_STATE_RUNTIME_ERROR;
}
}
void
EffectModel::FeedTouchPressEvent(const TouchEventScript &pos3)
{
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
-
if (!__pScript->OnTouchPressed(pos3))
{
Stop(true, false);
- SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchPressed Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str());
}
return;
}
void
EffectModel::FeedTouchMoveEvent(const TouchEventScript &pos3)
{
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
-
if (!__pScript->OnTouchMoved(pos3))
{
Stop(true, false);
- SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchMoved Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str());
}
return;
}
void
EffectModel::FeedTouchReleaseEvent(const TouchEventScript &pos3)
{
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
-
if (!__pScript->OnTouchReleased(pos3))
{
Stop(true, false);
- SysSecureLogException(NID_UI, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchReleased Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str());
}
return;
}
void
EffectModel::FeedTouchDoublePressEvent(const TouchEventScript &pos3)
{
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
- SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str());
-
if (!__pScript->OnTouchDoublePressed(pos3))
{
Stop(true, false);
- SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchDoublePressed Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str());
}
return;
}