Class OctaveEngine.NameDesc
- java.lang.Object
-
- eu.simuline.octave.OctaveEngine.NameDesc
-
- Enclosing class:
- OctaveEngine
public static class OctaveEngine.NameDesc extends Object
Describes the meaning of a name, if any. That name is replicated inname
. The category is given incategory
. If it isOctaveEngine.NameDesc.Category.Unknown
, bothtype
andfile
arenull
. From now on assume it is not unknown.If
name
is aOctaveEngine.NameDesc.Category.Variable
, of course no file is attached and also no type. TBD: change that. The type can be found out usingtypeinfo(name)
. From now on assumename
is not a variable.If
name
points to an existing filefile
, the category isOctaveEngine.NameDesc.Category.FileEx
, no matter whether a directory or a proper file andtype
isnull
.If the name points to an object with a type defined by a file (seemingly function types only), then the category is
OctaveEngine.NameDesc.Category.TypedDefInFile
. Then of course,type
determines the type andfile
the file, both notnull
. CAUTION:file
may not exist (for built-in functions).There is a last case
name
has a typetype
but is not defined by a file. TBD: clarify when this occurs. In that case the category isOctaveEngine.NameDesc.Category.TypedWithoutFile
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OctaveEngine.NameDesc.Category
-
Field Summary
Fields Modifier and Type Field Description OctaveEngine.NameDesc.Category
category
The category of thename
described by this object.File
file
The file of the object tied toname
.String
name
The name which is described by thisOctaveEngine.NameDesc
.String
type
The type of the object tied toname
.
-
-
-
Field Detail
-
name
public final String name
The name which is described by thisOctaveEngine.NameDesc
.
-
category
public final OctaveEngine.NameDesc.Category category
The category of thename
described by this object.
-
type
public final String type
-
file
public final File file
The file of the object tied toname
. This may be null, depending oncategory
. If this is a function defined by an m-file, this is the location of that m-file. Then the type is 'function', meaning 'user defined function'. For built-in functions this seems to be something rooted in "libinterp" but without leading file separator if returned by which. Thus for built-in functions, this 'file' does not exist. Nevertheless, these functions seem to be all defined in liboctinterp.so (linux).
-
-