2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 #include "ScilabGateway.hxx"
15 namespace org_modules_external_objects
18 int ScilabGateway::getEnvId(char * fname, const int envId, void * pvApiCtx)
22 CheckInputArgument(pvApiCtx, 0, 0);
23 CheckOutputArgument(pvApiCtx, 1, 1);
25 ScilabAbstractEnvironment & env = ScilabEnvironments::getEnvironment(envId);
26 ScilabGatewayOptions & options = env.getGatewayOptions();
27 OptionsHelper::setCopyOccured(false);
28 ScilabObjects::initialization(env, pvApiCtx);
29 options.setIsNew(false);
31 sciErr = createMatrixOfInteger32(pvApiCtx, 1, 1, 1, &envId);
34 throw ScilabAbstractEnvironmentException(__LINE__, __FILE__, gettext("Cannot create the identifier"));