std::wstring as parameter must be const & when is possible
[scilab.git] / scilab / modules / ast / includes / ast / visitor_common.hxx
1 /*
2 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 *  Copyright (C) 2010-2010 - DIGITEO - Antoine ELIAS
4 *
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
10 *
11 */
12
13 #ifndef AST_VISITOR_COMMON_HXX
14 #define AST_VISITOR_COMMON_HXX
15
16
17 #define ENABLE_EXTERNAL_TYPER
18
19 #include "internal.hxx"
20 #include "struct.hxx"
21 #include "list.hxx"
22 #include "exp.hxx"
23 #include "symbol.hxx"
24 #include <list>
25 #include "expHistory.hxx"
26 #include "dynlib_ast.h"
27 #define bsiz    4096
28
29 //void ExpandList(int ** _piList, int *_piListSize, int _iListSizeSize, int *_piResultList);
30
31 types::InternalType* AddElementToVariable(
32     types::InternalType* _poDest,
33     types::InternalType* _poSource,
34     int _iRows, int _iCols);
35
36 types::InternalType* AddElementToVariableFromCol(
37     types::InternalType* _poDest,
38     types::InternalType* _poSource,
39     int _iRows, int _iCols, int *_piCols);
40
41 types::InternalType* AddElementToVariableFromRow(
42     types::InternalType* _poDest,
43     types::InternalType* _poSource,
44     int _iRows, int _iCols, int *_piRows);
45
46 const std::wstring* getStructNameFromExp(const ast::Exp* _pExp);
47
48 bool getFieldsFromExp(ast::Exp* _pExp, std::list<ExpHistory*>& fields);
49
50 types::InternalType* evaluateFields(const ast::Exp* _pExp, std::list<ExpHistory*>& fields, types::InternalType* pIT);
51
52 types::InternalType* callOverload(const ast::Exp& e,
53                                   const std::wstring& _strType,
54                                   types::typed_list* _pArgs,
55                                   types::InternalType* _source,
56                                   types::InternalType* _dest);
57
58 types::InternalType* callOverload(const std::wstring& strType, types::InternalType* _paramL, types::InternalType* _paramR);
59
60 types::InternalType* insertionCall(const ast::Exp& e, types::typed_list* _pArgs, types::InternalType* _pVar, types::InternalType* _pInsert);
61
62 EXTERN_AST void callOnPrompt(void);
63 EXTERN_AST ast::Exp* callTyper(ast::Exp* _tree, std::wstring _msg = std::wstring(L""));
64
65 #endif //!AST_VISITOR_COMMON_HXX