Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / history_manager / sci_gateway / cpp / history_manager_gw.cpp
1 /*
2  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  *  Copyright (C) 2011 - DIGITEO - Cedric DELAMARRE
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 "context.hxx"
17 #include "function.hxx"
18 #include "history_manager_gw.hxx"
19
20 #define MODULE_NAME "history_manager"
21
22 int HistoryManagerModule::Load()
23 {
24     symbol::Context::getInstance()->addFunction(types::Function::createFunction("loadhistory", &sci_loadhistory, MODULE_NAME));
25     symbol::Context::getInstance()->addFunction(types::Function::createFunction("addhistory",   &sci_addhistory, MODULE_NAME));
26     symbol::Context::getInstance()->addFunction(types::Function::createFunction("displayhistory",   &sci_displayhistory, MODULE_NAME));
27     symbol::Context::getInstance()->addFunction(types::Function::createFunction("gethistoryfile",   &sci_gethistoryfile, MODULE_NAME));
28     symbol::Context::getInstance()->addFunction(types::Function::createFunction("gethistory", &sci_gethistory, MODULE_NAME));
29     symbol::Context::getInstance()->addFunction(types::Function::createFunction("historymanager",   &sci_historymanager, MODULE_NAME));
30     symbol::Context::getInstance()->addFunction(types::Function::createFunction("historysize",   &sci_historysize, MODULE_NAME));
31     symbol::Context::getInstance()->addFunction(types::Function::createFunction("removelinehistory",   &sci_removelinehistory, MODULE_NAME));
32     symbol::Context::getInstance()->addFunction(types::Function::createFunction("resethistory", &sci_resethistory, MODULE_NAME));
33     symbol::Context::getInstance()->addFunction(types::Function::createFunction("saveafterncommands",   &sci_saveafterncommands, MODULE_NAME));
34     symbol::Context::getInstance()->addFunction(types::Function::createFunction("saveconsecutivecommands",   &sci_saveconsecutivecommands, MODULE_NAME));
35     symbol::Context::getInstance()->addFunction(types::Function::createFunction("savehistory", &sci_savehistory, MODULE_NAME));
36     symbol::Context::getInstance()->addFunction(types::Function::createFunction("sethistoryfile",   &sci_sethistoryfile, MODULE_NAME));
37
38     return true;
39 }