Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / integer / sci_gateway / cpp / integer_gw.cpp
1 /*
2 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 *  Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
4 *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13 *
14 */
15
16 #include "integer_gw.hxx"
17 #include "context.hxx"
18
19 #define MODULE_NAME "integer"
20
21 extern "C"
22 {
23 #include "gw_integer.h"
24 }
25
26 int IntegerModule::Load()
27 {
28     symbol::Context::getInstance()->addFunction(types::Function::createFunction("int8", &sci_integer8, MODULE_NAME));
29     symbol::Context::getInstance()->addFunction(types::Function::createFunction("uint8", &sci_uinteger8, MODULE_NAME));
30     symbol::Context::getInstance()->addFunction(types::Function::createFunction("int16", &sci_integer16, MODULE_NAME));
31     symbol::Context::getInstance()->addFunction(types::Function::createFunction("uint16", &sci_uinteger16, MODULE_NAME));
32     symbol::Context::getInstance()->addFunction(types::Function::createFunction("int32", &sci_integer32, MODULE_NAME));
33     symbol::Context::getInstance()->addFunction(types::Function::createFunction("uint32", &sci_uinteger32, MODULE_NAME));
34     symbol::Context::getInstance()->addFunction(types::Function::createFunction("int64", &sci_integer64, MODULE_NAME));
35     symbol::Context::getInstance()->addFunction(types::Function::createFunction("uint64", &sci_uinteger64, MODULE_NAME));
36     symbol::Context::getInstance()->addFunction(types::Function::createFunction("inttype", &sci_inttype, MODULE_NAME));
37     symbol::Context::getInstance()->addFunction(types::Function::createFunction("double", &sci_double, MODULE_NAME));
38     symbol::Context::getInstance()->addFunction(types::Function::createFunction("iconvert", &sci_iconvert, MODULE_NAME));
39     return 1;
40 }