add function::createfunction with optional list AND loaddeps 38/15138/3
Antoine ELIAS [Tue, 2 Sep 2014 10:41:56 +0000 (12:41 +0200)]
Change-Id: I5b5bf5da7438868d0e82003d8c4d8c7ca6d563a1

scilab/modules/ast/includes/types/function.hxx
scilab/modules/ast/src/cpp/types/function.cpp

index e9b0d75..f22007d 100644 (file)
@@ -61,6 +61,7 @@ public :
     static Function*        createFunction(std::wstring _wstName, OLDGW_FUNC _pFunc, std::wstring _wstModule);
     static Function*        createFunction(std::wstring _wstName, MEXGW_FUNC _pFunc, std::wstring _wstModule);
     static Function*        createFunction(std::wstring _wstName, GW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule);
+    static Function*        createFunction(std::wstring _wstName, GW_FUNC_OPT _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule);
     static Function*        createFunction(std::wstring _wstName, OLDGW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule);
     static Function*        createFunction(std::wstring _wstName, MEXGW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule);
 
index 14bbf92..7281a99 100644 (file)
@@ -60,6 +60,11 @@ Function* Function::createFunction(std::wstring _wstName, GW_FUNC _pFunc, LOAD_D
     return new Function(_wstName, _pFunc, _pLoadDeps, _wstModule);
 }
 
+Function* Function::createFunction(std::wstring _wstName, GW_FUNC_OPT _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule)
+{
+    return new OptFunction(_wstName, _pFunc, _pLoadDeps, _wstModule);
+}
+
 Function* Function::createFunction(std::wstring _wstName, OLDGW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, std::wstring _wstModule)
 {
     return new WrapFunction(_wstName, _pFunc, _pLoadDeps, _wstModule);