This file is indexed.

/usr/include/scilab/ScilabAbstractEnvironment.hxx is in scilab-include 6.0.1-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2011 - Igor GRIDCHYN
 * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 */

#ifndef __SCILABABSTRACTENVIRONMENT_HXX__
#define __SCILABABSTRACTENVIRONMENT_HXX__

#include <string>
#include <vector>

#include "ExternalObjects.h"
#include "OptionsHelper.hxx"
#include "ScilabGatewayOptions.hxx"
#include "ScilabAbstractEnvironmentWrapper.hxx"
#include "ScilabAbstractEnvironmentException.hxx"
#include "ScilabAbstractMemoryAllocator.hxx"

namespace org_modules_external_objects
{
class ScilabAbstractEnvironment
{

public:

    virtual OptionsHelper & getOptionsHelper() = 0;

    virtual ScilabGatewayOptions & getGatewayOptions() = 0;

    virtual ScilabAbstractEnvironmentWrapper & getWrapper() = 0;

    virtual const std::string & getEnvironmentName() = 0;

    virtual void addtoclasspath(const char * path) = 0;

    virtual void getclasspath(const ScilabStringStackAllocator & allocator) = 0;

    virtual void getEnvironmentInfos(const ScilabStringStackAllocator & allocator) = 0;

    virtual int extract(int id, int * args, int argsSize) = 0;

    virtual void insert(int id, int * args, int argsSize) = 0;

    virtual void addNamedVariable(int id, const char * varName) = 0;

    virtual int getNamedVariable(const char * varName) = 0;

    virtual void evalString(const char ** code, int nbLines, ScilabStringStackAllocator * allocator) = 0;

    /**
     * Launch a garbage collection
     */
    virtual void garbagecollect() = 0;

    /**
     * Create an multi-dimensional array with base type given by className
     * @param className the name of the base class
     * @param dims an integer array containing the dimensions
     * @param len the number of dimensions
     * @return the id of the corresponding object
     */
    virtual int createarray(char * className, int * dims, int len) = 0;

    /**
     * Load a class with the given name
     * @param className the name of the class
     * @param allowReload if true the class should be reload (in taking into account its eventual modification)
     * @return the id of the corresponding object
     */
    virtual int loadclass(char * className, char * currentSciPath, bool isNamedVarCreated, bool allowReload) = 0;

    /**
     * Get the String representation of the corresponding object (as returned by the method toString() in Java)
     * @param id the id of the corresponding object
     * @return the correspinding string
     */
    virtual void getrepresentation(int id, const ScilabStringStackAllocator & allocator) = 0;

    /**
     * Get the String representation of the corresponding object (as returned by the method toString() in Java)
     * @param id the id of the corresponding object
     * @return the correspinding string
     */
    virtual std::string getrepresentation(int id) = 0;

    /**
     * Test the validity of the corresponding object
     * @param id the id of the object
     * @return true if the object is valid
     */
    virtual bool isvalidobject(int id) = 0;

    /**
     * Create a new instance of the class object with the given id
     * @param id the id of a class object
     * @param args an array containing the id of the arguments
     * @param argsSize the number of arguments
     * @return the id of the newly created object
     */
    virtual int newinstance(int id, int * args, int argsSize) = 0;

    virtual int operation(int idA, int idB, const OperatorsType type) = 0;

    /**
     * Invoke the method named methodName of the object with the corresponding id
     * @param id the object id
     * @param methodName the method name
     * @param args an array containing the id of the corresponding arguments
     * @param argsSize the number of argument
     * @return an array containing the returned values, the first entry is the array length (the returned pointer will be freed)
     */
    virtual int * invoke(int id, const char * methodName, int * args, int argsSize) = 0;

    /**
     * Set the value of the given field
     * @param id the object id
     * @param fieldName the field name
     * @param idarg the id of the value
     */
    virtual void setfield(int id, const char * fieldName, int idarg) = 0;

    /**
     * Get a field value
     * @param id the object id
     * @param fieldName the field name
     * @return the id of the field value
     */
    virtual int getfield(int id, const char * fieldName) = 0;

    /**
     * Get the field type
     * @param id the object id
     * @param fieldName the field name
     * @return -1 if unknown field, 0 if fieldName is a method name and 1 if the field name is a field name !
     */
    virtual int getfieldtype(int id, const char * fieldName) = 0;

    /**
     * Get a multi-dimensional array element
     * @param id the array id
     * @param index the index of the element
     * @param length the number of index
     * @return the id of the corresponding object
     */
    virtual int getarrayelement(int id, int * index, int length) = 0;

    /**
     * Set an element in a multi-dimensional array
     * @param id the array id
     * @param index the index of the element
     * @param length the number of index
     * @param idArg the id of the object to set
     */
    virtual void setarrayelement(int id, int * index, int length, int idArg) = 0;

    /**
     * Cast a given object into an object with the given class name
     * @param id the object id
     * @param className the name of the target class
     * @return the id of the newly casted object
     */
    virtual int cast(int id, char * className) = 0;

    /**
     * Cast a given object into an object with the given class object
     * @param id the object id
     * @param classId the id of the target class
     * @return the id of the newly casted object
     */
    virtual int castwithid(int id, int classId) = 0;

    /**
     * Remove the object with the given id
     * @param id the object id
     */
    virtual void removeobject(int id) = 0;

    /**
     * Remove the object with the given id but without unregister it in ScilabAutoCleaner
     * @param id the object id
     */
    virtual void autoremoveobject(int id) = 0;

    /**
     * Get all the accessible methods (public ones) in the given object
     * @param id the object id
     * @param pos the position in the Scilab stack where to put the names
     */
    virtual void getaccessiblemethods(int id, const ScilabStringStackAllocator & allocator) = 0;

    /**
     * Get all the accessible methods (public ones) in the given object (used in completion)
     * @param id the object id
     * @return the methods
     */
    virtual std::vector<std::string> getCompletion(int id, char ** fieldPath, const int fieldPathLen)
    {
        return std::vector<std::string>();
    }

    /**
     * Get all the accessible fields (public ones) in the given object
     * @param id the object id
     * @param pos the position in the Scilab stack where to put the names
     */
    virtual void getaccessiblefields(int id, const ScilabStringStackAllocator & allocator) = 0;

    /**
     * Get the class name of the given object
     * @param id the object id
     * @return the class name
     */
    virtual std::string getclassname(int id) = 0;

    /**
     * Test if the given object can be unwrapped (as a Scilab variable)
     * @param id the object id
     * @return the type of the variable
     */
    virtual VariableType isunwrappable(int id) = 0;

    /**
     * Compile the given code in a class with the givne class name
     * @param className the class name
     * @param code an array of char* null terminated with the code to compile
     * @param size the number of lines
     * @return the id of the class newly compiled
     */
    virtual int compilecode(char * className, char ** code, int size) = 0;

    virtual void enabletrace(const char * filename) = 0;

    virtual void disabletrace() = 0;

    virtual void writeLog(const std::string & fun, const std::string str, ...) const = 0;

    /**
     * Remove the object with the given id
     * @param id the object id
     */
    virtual void removeobject(const int * ids, const int length)
    {
        for (int i = 0; i < length; i++)
        {
            removeobject(ids[i]);
        }
    }
};
}
#endif //__SCILABABSTRACTENVIRONMENT_HXX__