All Packages Class Hierarchy This Package Previous Next Index
Class mathbus.Registry
java.lang.Object
|
+----mathbus.Registry
- public class Registry
- extends Object
The registry object is named mathbus.Registry. All member
variables are static, so it is effectively a single global data
structure.
-
StringIDFlag
- The numerical value used in RegistryStoreLocal terms to
identify StringID declarations
-
SubtypesFlag
- The numerical value used in RegistryStoreLocal terms to
identify Subtypes declarations.
-
Registry()
-
-
HasLocalStringID(int)
- Is there a local StringID corresponding to this numeric label?
-
HasLocalStringID(Integer)
- Is there a local StringID corresponding to this numeric label?
-
HasNumericLabel(String)
- Is there a numeric label corresponding to this StringID?
-
HasStringID(int)
- Is there a StringID corresponding to this numeric label?
-
InitializeRegistry()
- Initialize the registry from the declarations that are contained
in the Java sources.
-
LoadRegistryFile(String)
- Initializes the registry with the contents of the specified
registry file specified.
-
NewLocalLabel(String)
- Allocates a new local label for the string ident.
-
numericLabel(String)
- Returns the int corresponding to the symbolic node label
ident.
-
numericLabelInteger(String)
- Returns the Integer corresponding to the symbolic node label
ident.
-
SetLocalSubtypes(String, int)
- Set the Subtype field of the previously allocated local StringID
to subtypes.
-
SetLocalSubtypes(String, Integer)
- Set the Subtype field of the previously allocated local StringID
to subtypes.
-
stringID(int)
- May return null if there isn't a string ID.
-
stringID(Integer)
- Returns the Java string (symbolic label) corresponding to the
numeric node label ident.
-
subtermTypes(int)
- Returns the subtermTypes of the numeric node label
ident.
-
subtermTypes(Integer)
- Returns the subtermTypes of the numeric node label
ident.
-
subtermTypes(String)
- Returns the subtermTypes of the symbolic node label
ident.
-
WriteRegistryInitializers(String)
- Write Java source files for initializing the registry into the
directory directory.
StringIDFlag
public static final Integer StringIDFlag
- The numerical value used in RegistryStoreLocal terms to
identify StringID declarations
SubtypesFlag
public static final Integer SubtypesFlag
- The numerical value used in RegistryStoreLocal terms to
identify Subtypes declarations.
Registry
public Registry()
InitializeRegistry
public static void InitializeRegistry()
- Initialize the registry from the declarations that are contained
in the Java sources. This should be relatively fast and is the
usual way the registry is initialized.
When a new registry
distribuation file is received, or when the Java implementation is
being bootstrapped, the registry in the Java implementation is
initialized using the LoadRegsitryFile method. The source code
files that are used by the Java implementation can be generated by
the WriteJavaRegistry method.
- See Also:
- LoadRegistryFile, WriteJavaRegistry
LoadRegistryFile
public static void LoadRegistryFile(String file) throws IOException
- Initializes the registry with the contents of the specified
registry file specified. This member function is usually only
used to bootstrap the Java implementation, but it may be used to
load a new registry file for test purposes. The InitializeRegistry
member function is generally much prefered.
- Throws: IOException
- Thrown if the registry file is malformed.
- See Also:
- RegInitializer, InitializeRegistry
WriteRegistryInitializers
public static void WriteRegistryInitializers(String directory) throws IOException
- Write Java source files for initializing the registry into the
directory directory. The files written are MBS.java,
which contatains symbolic names for each of the entries in the
global registry, and RegInitializer which initializes the hash
tables of the global regsitry. The current contents of the
global registry are used to generate these files.
- See Also:
- MBS, RegInitializer
SetLocalSubtypes
public static void SetLocalSubtypes(String ident,
int subtypes)
- Set the Subtype field of the previously allocated local StringID
to subtypes.
- Throws: Error
- Thrown if the a local StringID has not yet been
allocated for this label.
SetLocalSubtypes
public static void SetLocalSubtypes(String ident,
Integer subtypes)
- Set the Subtype field of the previously allocated local StringID
to subtypes.
- Throws: Error
- Thrown if the a local StringID has not yet been
allocated for this label.
HasNumericLabel
public static boolean HasNumericLabel(String ident)
- Is there a numeric label corresponding to this StringID?
HasStringID
public static boolean HasStringID(int ident)
- Is there a StringID corresponding to this numeric label?
HasLocalStringID
public static boolean HasLocalStringID(int ident)
- Is there a local StringID corresponding to this numeric label?
HasLocalStringID
public static boolean HasLocalStringID(Integer ID)
- Is there a local StringID corresponding to this numeric label?
stringID
public static final String stringID(int ident)
- May return null if there isn't a string ID.
stringID
public static String stringID(Integer ident)
- Returns the Java string (symbolic label) corresponding to the
numeric node label ident. Both the local and global
registries are searched. If the numeric label has not yet been
allocated then null is returned instead.
numericLabelInteger
public static Integer numericLabelInteger(String ident)
- Returns the Integer corresponding to the symbolic node label
ident. Both the local and global registries are
searched. A null is returned if the symbolic node label has not
be previously allocated.
numericLabel
public static final int numericLabel(String ident)
- Returns the int corresponding to the symbolic node label
ident. Both the local and global registries are
searched. A null is returned if the symbolic node label has not
be previously allocated.
subtermTypes
public static int subtermTypes(Integer ID)
- Returns the subtermTypes of the numeric node label
ident. Both the local and global registries are
searched. -255 is returned if the subtermTypes of the node label
has not been defined.
subtermTypes
public static int subtermTypes(int ident)
- Returns the subtermTypes of the numeric node label
ident. Both the local and global registries are
searched. -255 is returned if the subtermTypes of the node label
has not been defined.
subtermTypes
public static int subtermTypes(String ident)
- Returns the subtermTypes of the symbolic node label
ident. Both the local and global registries are
searched. -255 is returned if the subtermTypes of the node
label has not been defined.
NewLocalLabel
public static int NewLocalLabel(String ident)
- Allocates a new local label for the string ident. If a
numeric label has already been allocated for this string, then
that value is returned. Otherwise a new local label is allocated
and returned.
All Packages Class Hierarchy This Package Previous Next Index