gmslAPI  0.1
gmslAPI: An API for Developing Upgrade Solutions using Great Migrations Technology
gmslLibrary.Services.Store Class Reference

The Store Class contains the methods needed to manage data organized into hierarchical fields and records. When dealing with language processing, program storage must be viewed as containing a wide variety of different structures; indexes, lists, fixed records, long unformatted records, variable length strings, and so on. In addition, it may be purely memory bound or it may be stored in a persistent file system. The role of this service class is to provide a single interface for storing and retrieving information. It is sufficiently robust to allow for the management of large files in the multiple gigabyte size range, while it is still efficient for use by purely memory bound applications. More...

Static Public Member Functions

static int AddGlobal (int root, int global)
 The method AddGlobal adds the root offset of a component, indexed by its parent to a global index maintained within the storage area. This entry declares that the child component has global scope if and only if the parent component is an active reference. More...
 
static void Close ()
 The Close method closes the current storage area if that area is currently open. It does not change the currently selected storage area. More...
 
static int Create (string fileName, StorageUnit iUnit)
 The Create method selects the indicated storage unit and initializes it as a new empty area whose content will be optionally paged into a specified file. Any information currently in the storage are will be lost. Until another storage unit is selected via one of the three methods – Select,Create, or Open – all storage requests will be directed to this currently selected storage unit. More...
 
static int DeltaVector (int root)
 The DeltaVector method gets a handle to a component information vector in the current storage area that it intends to change. In particular, this method gives read/write access to the information vector associated with the component whose root offset is specified via the integer root parameter. If there is any question about the type of component being accessed or about the validity of the root offset value, use the GetObjectType method first (see the discussion there). Use the GetVector method if the vector is simply to be read. The actual handle is optimized to make the retrieval of the component information as efficient as possible. As such it should only be used locally and should be refreshed after any other storage intensive operations have been performed. To use DeltaVector the storage area being accessed has to have been opened using a CREATE or APPEND action. More...
 
static int FindFirstChild (int[] levels, int iRoot)
 The FindFirstChild method initiates a depth first or preorder search of the symbol tree. More...
 
static int FindNextChild (int[] levels)
 The FindNextChild method continues a depth first or preorder search of the symbol tree. More...
 
static int FindRoot (string Identifier)
 The FindRoot method finds an identified symbol root. This method searches the base index of the symbol table for a specified identifier and returns its root. This root is unique for each identifier. More...
 
static int FindVector (string Identifier, int Parent)
 The method FindVector searches a single branch within the hierarchical symbol table for a for a component with the identifier specified by the string identifier parameter. More...
 
static string GetDataName ()
 The method GetDataName gets the name of the current storage area. When a file-based storage area is created or opened its name is stored in the storage control structure. More...
 
static int GetFirst (int parent)
 The method Store_GetFirst returns the root of the first child of a parent component or of the root branch. This is the first component entered for the parent. In general, using this method in conjunction with the GetNext method, will generate the sequence of components stored within some branch of the symbol table in their defined order. More...
 
static int GetGlobals (int symbolRoot, int[] globals, int nGlobal)
 The method GetGlobals returns the (global, root) pairs added to a symbol identifier via the AddGlobal method. The description of that method contains a detailed description of these pairs. More...
 
static int GetHandle ()
 The method GetHandle gets the long memory handle of the current storage area. All storage areas are maintained within a long memory area. Though most access needs for that memory area are provided internally, it is occasionally necessary to use one of the specialized stream access methods directly. More...
 
static string GetIdent (int root)
 The method GetIdent gets the source identifier of a component via its root address. By definition, the "identifier" is the original identifier that was associated with the component when it was first placed in the symbol table. See the SetName and GetName methods for information about changing how components are assigned alternative target identifiers. More...
 
static int GetInfo (int offset, int[] info)
 The method GetInfo reads short blocks of information that were initially written using the method WriteInfo. A physical read is not required, since these short blocks do not cross block boundaries; however, in some instances reading them is needed to avoid downstream memory page faults. The most common use of this method is to read the list of interfaces associated with a class. More...
 
static int GetLength (int offset)
 The method GetLength returns the overall length in words of the current storage area or of an information vector stored in the area. More...
 
static string GetName (int root)
 The method GetName gets the target identifier of a component via its root offset. Every component has two string representations – its source "identifier" which the original identifier that was associated with the component when it was first placed in the symbol table and its target "name" that was assigned to it directly via the SetName method. If no name has been assigned to the component, then its name is the same as its identifier. Whenever a reference to a component is authored its name is used, but any retrieval of the component is always done via its identifier. More...
 
static int GetNext (int child)
 The method GetNext returns the next child of a parent component or of the root branch. This is the next component entered for the parent. In general, using this method in conjunction with the GetFirst method, will generate the sequence of components stored within some branch of the symbol table in their defined order. More...
 
static int GetObjectType (int root)
 The method GetObjectType returns the symbol table object type code of a component. Whenever a component is entered into the symbol table, it is assigned an integer object type code. Each object type code has associated with it a fixed-length information vector used to describe components of the specified type. In the case of the tool the type code is either an entry number from the ObjectType enumeration, the opcode value of a built-in control if the component is a built-in control, or the root offset of an external class if the object is a of that external class. More...
 
static int GetParent (int child)
 The method GetParent returns the root offset of the parent of a component whose offset is specified. More...
 
static string GetString (int offset)
 The method GetString returns a string from the current storage area via its offset. More...
 
static int GetSymbols (string Identifier)
 The method GetSymbols returns the root offset of a sequence that contains the root offsets of all symbols whose identifier matches a specified string. The tool's symbol table has a tree structure. The symbols within the tree need be unique along one branch only. As a result of this, there can be many duplicates in the symbol table. The roles of the symbol retrieval methods are to search the symbol tree for the correct occurrence of an identifier given a current parent context. More...
 
static int GetVector (int root)
 The GetVector method gets a handle to a component information vector in the current storage area that it intends to access only. In particular, this method gives reade access to the information vector associated with the component whose root offset is specified via the integer root parameter. If there is any question about the type of component being accessed or about the validity of the root offset value, use the GetObjectType method first (see the discussion there). Use the DeltaVector method if the vector is to be changed. The actual handle is optimized to make the retrieval of the component information as efficient as possible. As such it should only be used locally and should be refreshed after any other storage intensive operations have been performed. More...
 
static int IsNull (int handle)
 The method IsNull checks a handle retrieved from storage to determine if it is linked to a valid information vector. More...
 
static int Open (string fileName, StorageUnit iUnit, bool append)
 The Open method opens an exiting file into a storage area. In particular it makes the indicated storage area the current one and initializes it with the contents of an existing file. Any information currently in the storage area will be lost. Until another storage area is selected via one of the three methods Select, Create, Open all storage requests will be directed to this currently selected storagearea. More...
 
static int ReadInfo (tCodeBlock info, int offset)
 The method ReadInfo reads long blocks of information that were initially written using the method WriteInfo. A physical read is required, since these information vectors may cross block boundaries. The most common use of this method is to read the intermediate code associated with a component, though it may be used for any type of information. More...
 
static int ReadInfo (int[] info, int offset)
 
static void RewriteInfo (tCodeBlock info, int nByte, int offset)
 The method RewriteInfo rewrites long blocks of information that were initially written using the method WriteInfo. A physical rewrite is required, since these information vectors may cross block boundaries. The most common use of this method is to rewrite the intermediate code associated with a component after it has been migrated, though it may be used for any type of information. More...
 
static void RewriteInfo (int[] info, int nByte, int offset)
 
static void Select (int iUnit)
 The method Select selects one the available storage areas as the current storage area. All successive storage area accesses will be performed to this area until another call to this method is made. Note that this service only selects the area, it does not change it in any way. More...
 
static void Select (StorageUnit iUnit)
 
static void SetName (int root, string Name)
 The method SetName sets the target name of a component to a specified string. Whenever a component is stored in the symbol table using the Vector method that component is given an identifier by the caller. This identifier can then used to retrieve the component, and by default is used by the author whenever references to the component are being written in the target code. If references are to be authored with an alternate identifier (referred to as the "name" of the component) then this method is used to associate that name with the component. More...
 
static void SetObjectType (int root, int objType)
 The method SetObjectType changes the component object type without changing any of its other information. This method can only be used with compatible objects like controls of different types. More...
 
static void SetString (int addr, string strValue)
 The method SetString changes the value of an existing string whose length has not increased. More...
 
static int String (string strValue)
 The method String stores a character string in the current storage area and returns the offset in the storage area of the string. More...
 
static int Unit ()
 The method Unit returns the unit number of the current storage area. This value is often gotten before moving to another storage area. It can then be used to return to this current area. More...
 
static int Vector (string Identifier, int Parent, int Length, int type)
 The Vector method stores a component information vector associated with an identifier as a child of a specified parent. It is the primary method used to enter components into the hierarchical symbol table. To enter a symbol, four things must be known. First, it must have a unique identifier relative to the parent of the symbol. Second, it must have a parent which can either be another symbol already entered into storage or can be the root branch of the symbol tree. Third, it must have a information storage vector length, which may be zero. If non-zero, a zero-filled area of storage is allocated to the component with the specified length. Fourth. it must have an object type code, which specifies the type of component being entered. More...
 
static int WriteInfo (tCodeBlock info, int nByte)
 The method WriteInfo writes long information vectors into storage. There is no limit to the length of this information. Since block boundaries may occur within the storage area used, pointers should not be used to access the record, rather the methods GetInfo, ReadInfo, and RewiteInfo should be used. The most common use of this method is to write the intermediate code associated with a component, though it may be used for any type of information. More...
 
static int WriteInfo (int[] info, int nByte, bool boundary=false)
 

Detailed Description

The Store Class contains the methods needed to manage data organized into hierarchical fields and records. When dealing with language processing, program storage must be viewed as containing a wide variety of different structures; indexes, lists, fixed records, long unformatted records, variable length strings, and so on. In addition, it may be purely memory bound or it may be stored in a persistent file system. The role of this service class is to provide a single interface for storing and retrieving information. It is sufficiently robust to allow for the management of large files in the multiple gigabyte size range, while it is still efficient for use by purely memory bound applications.

Member Function Documentation

◆ AddGlobal()

static int gmslLibrary.Services.Store.AddGlobal ( int  root,
int  global 
)
static

The method AddGlobal adds the root offset of a component, indexed by its parent to a global index maintained within the storage area. This entry declares that the child component has global scope if and only if the parent component is an active reference.

Parameters
rootis the root offset of a component that may have global scope.
globalis the offset of the parent external library or class whose active reference status triggers the global scope.
Returns
If all goes well, the method returns a one. If the global, root pair already exists, the method returns a zero.

◆ Close()

static void gmslLibrary.Services.Store.Close ( )
static

The Close method closes the current storage area if that area is currently open. It does not change the currently selected storage area.

◆ Create()

static int gmslLibrary.Services.Store.Create ( string  fileName,
StorageUnit  iUnit 
)
static

The Create method selects the indicated storage unit and initializes it as a new empty area whose content will be optionally paged into a specified file. Any information currently in the storage are will be lost. Until another storage unit is selected via one of the three methods – Select,Create, or Open – all storage requests will be directed to this currently selected storage unit.

Parameters
fileNameIf the storage is to be paged into a file, then the filename parameter contains the name of that file (optionally without an extension). If the storage is to be purely memory-based, this parameter should be null.
iUnitis the number of the storage unit to be used. This must be en entry from the StorageUnit enumeration that defines these unit numbers. For most applications the USER storage area should be used, as many of the authoring service methods in particular assume that they are using this area.
Returns
If all goes well this method returns a one. If there is a problem creating the storage unit, a zero is returned.

◆ DeltaVector()

static int gmslLibrary.Services.Store.DeltaVector ( int  root)
static

The DeltaVector method gets a handle to a component information vector in the current storage area that it intends to change. In particular, this method gives read/write access to the information vector associated with the component whose root offset is specified via the integer root parameter. If there is any question about the type of component being accessed or about the validity of the root offset value, use the GetObjectType method first (see the discussion there). Use the GetVector method if the vector is simply to be read. The actual handle is optimized to make the retrieval of the component information as efficient as possible. As such it should only be used locally and should be refreshed after any other storage intensive operations have been performed. To use DeltaVector the storage area being accessed has to have been opened using a CREATE or APPEND action.

Parameters
rootis the offset of the component whose information vector is to be changed.
Returns
The method returns a semi-permanent handle to the information vector. It is up to the user to ensure that the storage object type of the component is compatible with the structure type of the variable that is receiving the handle.

◆ FindFirstChild()

static int gmslLibrary.Services.Store.FindFirstChild ( int []  levels,
int  iRoot 
)
static

The FindFirstChild method initiates a depth first or preorder search of the symbol tree.

Parameters
iRootIf the iRoot parameter is non-zero, then the node with this offset is visited first. If it is zero, then the first node in the tree is visited first.
levelsThe integer vector levels is used internally by the search algorithm. It must have at least two plus the maximum levels in the tree entries. Normal code structures have no more than four levels – project, class, subprogram, and local variable; however, controls defined via forms can often be nested more deeply. A size of 20 is always safe.
Returns
The method returns the offset of the first node visited or zero, if the symbol tree is empty.

◆ FindNextChild()

static int gmslLibrary.Services.Store.FindNextChild ( int []  levels)
static

The FindNextChild method continues a depth first or preorder search of the symbol tree.

Parameters
levelsThe levels parameter must have been initialized by the FindFirstChild method. In a depth first search, a visit to a node is followed immediately by visits to all descendants of the node.
Returns
The method returns the offset of the next node visited or zero, if there are no more nodes to visit.

◆ FindRoot()

static int gmslLibrary.Services.Store.FindRoot ( string  Identifier)
static

The FindRoot method finds an identified symbol root. This method searches the base index of the symbol table for a specified identifier and returns its root. This root is unique for each identifier.

Parameters
Identifierspecifies the identifier being sought.
Returns
If no symbol exists in the base index with the specified identifier then a zero is returned. /returns>

◆ FindVector()

static int gmslLibrary.Services.Store.FindVector ( string  Identifier,
int  Parent 
)
static

The method FindVector searches a single branch within the hierarchical symbol table for a for a component with the identifier specified by the string identifier parameter.

Parameters
Identifierspecifies the name of the desired component.
ParentIf the integer parent parameter is zero, then the root branch of the tree is searched; else the branch dominated by the parent is searched.
Returns
If a component with the specified identifier is found within the specified branch, then the root offset of that component is returned. If no component can be found in the branch, then a zero is returned.

◆ GetDataName()

static string gmslLibrary.Services.Store.GetDataName ( )
static

The method GetDataName gets the name of the current storage area. When a file-based storage area is created or opened its name is stored in the storage control structure.

Returns
This method returns the name used to open or create the area. If the storage area is local memory based, then an empty string is returned.

◆ GetFirst()

static int gmslLibrary.Services.Store.GetFirst ( int  parent)
static

The method Store_GetFirst returns the root of the first child of a parent component or of the root branch. This is the first component entered for the parent. In general, using this method in conjunction with the GetNext method, will generate the sequence of components stored within some branch of the symbol table in their defined order.

Parameters
parentThe integer parameter parent contains the root offset of the parent component or zero if the first member of the root branch in the symbol table is desired.
Returns
If there is a first child of the specified component, then this method returns its root offset. If there is no first child, then this method returns a zero.

◆ GetGlobals()

static int gmslLibrary.Services.Store.GetGlobals ( int  symbolRoot,
int []  globals,
int  nGlobal 
)
static

The method GetGlobals returns the (global, root) pairs added to a symbol identifier via the AddGlobal method. The description of that method contains a detailed description of these pairs.

Parameters
symbolRootThe integer parameter symbolRoot contains a root offset in the base symbol index as returned by the FindRoot method.
globalsThe integer vector parameter globals returns the pairs added to the specified symbol.
nGlobalThe integer parameter nGlobal defines the length of the globals vector. No more than nGlobal entries will be returned.
Returns
The method returns the number of entries returned in the vector. This is two times the number of pairs.

◆ GetHandle()

static int gmslLibrary.Services.Store.GetHandle ( )
static

The method GetHandle gets the long memory handle of the current storage area. All storage areas are maintained within a long memory area. Though most access needs for that memory area are provided internally, it is occasionally necessary to use one of the specialized stream access methods directly.

Returns
If there is a current storage area open, then the handle of its long memory provider is returned; else a zero is returned.

◆ GetIdent()

static string gmslLibrary.Services.Store.GetIdent ( int  root)
static

The method GetIdent gets the source identifier of a component via its root address. By definition, the "identifier" is the original identifier that was associated with the component when it was first placed in the symbol table. See the SetName and GetName methods for information about changing how components are assigned alternative target identifiers.

Parameters
rootspecifies the root offset of the component whose identifier is needed.
Returns
The source identifier of the component.

◆ GetInfo()

static int gmslLibrary.Services.Store.GetInfo ( int  offset,
int []  info 
)
static

The method GetInfo reads short blocks of information that were initially written using the method WriteInfo. A physical read is not required, since these short blocks do not cross block boundaries; however, in some instances reading them is needed to avoid downstream memory page faults. The most common use of this method is to read the list of interfaces associated with a class.

Parameters
offsetThe integer parameter offset is the offset of the start of the information to be read. This offset must be a value previously returned by the WriteInfo method.
infoThe parameter info physically receives the information read.
Returns
The method returns the length of the block read.

◆ GetLength()

static int gmslLibrary.Services.Store.GetLength ( int  offset)
static

The method GetLength returns the overall length in words of the current storage area or of an information vector stored in the area.

Parameters
offsetIf the integer parameter offset is zero then the area length is requested, else a vector length is requested.
Returns
If offset is not zero, then the length in bytes of the information stored at the specified offset is returned. Regardless of the value of the parameter offset, if the current storage area is empty, then this method returns 0.

◆ GetName()

static string gmslLibrary.Services.Store.GetName ( int  root)
static

The method GetName gets the target identifier of a component via its root offset. Every component has two string representations – its source "identifier" which the original identifier that was associated with the component when it was first placed in the symbol table and its target "name" that was assigned to it directly via the SetName method. If no name has been assigned to the component, then its name is the same as its identifier. Whenever a reference to a component is authored its name is used, but any retrieval of the component is always done via its identifier.

Parameters
rootcontains the root offset of the component whose name is desired.
Returns
If the component had a name set, then that name is returned; else the component identifier is returned.

◆ GetNext()

static int gmslLibrary.Services.Store.GetNext ( int  child)
static

The method GetNext returns the next child of a parent component or of the root branch. This is the next component entered for the parent. In general, using this method in conjunction with the GetFirst method, will generate the sequence of components stored within some branch of the symbol table in their defined order.

Parameters
iChildThe integer parameter iChild contains the root offset of the current child component as returned by GetFirst or a previous call to GetNext.
Returns
If there is a next child of the parent of the specified component then this method returns its root offset. If there is no next child then this method returns a zero.

◆ GetObjectType()

static int gmslLibrary.Services.Store.GetObjectType ( int  root)
static

The method GetObjectType returns the symbol table object type code of a component. Whenever a component is entered into the symbol table, it is assigned an integer object type code. Each object type code has associated with it a fixed-length information vector used to describe components of the specified type. In the case of the tool the type code is either an entry number from the ObjectType enumeration, the opcode value of a built-in control if the component is a built-in control, or the root offset of an external class if the object is a of that external class.

Parameters
rootThe integer parameter root> contains the root offset of the component in storage.
Returns
The method returns the object type currently assigned to the component.

◆ GetParent()

static int gmslLibrary.Services.Store.GetParent ( int  child)
static

The method GetParent returns the root offset of the parent of a component whose offset is specified.

Parameters
rootspecifies the root offset of the child component.
Returns
This method returns the root offset of the parent. If the component is the root branch of the symbol table, then a zero is returned.

◆ GetString()

static string gmslLibrary.Services.Store.GetString ( int  offset)
static

The method GetString returns a string from the current storage area via its offset.

Parameters
offsetThe parameter offset specifies the offset of the desired string. This offset must have been obtained via an earlier call to the method String.
Returns
The method returns the requested string.

◆ GetSymbols()

static int gmslLibrary.Services.Store.GetSymbols ( string  Identifier)
static

The method GetSymbols returns the root offset of a sequence that contains the root offsets of all symbols whose identifier matches a specified string. The tool's symbol table has a tree structure. The symbols within the tree need be unique along one branch only. As a result of this, there can be many duplicates in the symbol table. The roles of the symbol retrieval methods are to search the symbol tree for the correct occurrence of an identifier given a current parent context.

Parameters
IdentifierThe identifier parameter specifies the string to be searched for.
Returns
The method searches the base index for a specified identifier. If found, it returns the root offset of a sequence maintained there that contains the root offsets of the symbols with that name stored in the order that they were defined. If no symbol with the specified name is present, a zero is returned.

◆ GetVector()

static int gmslLibrary.Services.Store.GetVector ( int  root)
static

The GetVector method gets a handle to a component information vector in the current storage area that it intends to access only. In particular, this method gives reade access to the information vector associated with the component whose root offset is specified via the integer root parameter. If there is any question about the type of component being accessed or about the validity of the root offset value, use the GetObjectType method first (see the discussion there). Use the DeltaVector method if the vector is to be changed. The actual handle is optimized to make the retrieval of the component information as efficient as possible. As such it should only be used locally and should be refreshed after any other storage intensive operations have been performed.

Parameters
rootis the offset of the component whose information vector is to be accessed.
Returns
The method returns a semi-permanent handle to the information vector. It is up to the user to ensure that the storage object type of the component is compatible with the structure type of the component that is receiving the handle.

◆ IsNull()

static int gmslLibrary.Services.Store.IsNull ( int  handle)
static

The method IsNull checks a handle retrieved from storage to determine if it is linked to a valid information vector.

Parameters
handlecontains a handle retrieved from one of the store methods.
Returns
It the handle is null, not linked to a valid information vector, the method returns one; else it returns zero.

◆ Open()

static int gmslLibrary.Services.Store.Open ( string  fileName,
StorageUnit  iUnit,
bool  append 
)
static

The Open method opens an exiting file into a storage area. In particular it makes the indicated storage area the current one and initializes it with the contents of an existing file. Any information currently in the storage area will be lost. Until another storage area is selected via one of the three methods Select, Create, Open all storage requests will be directed to this currently selected storagearea.

Parameters
fileNameThe string fileName parameter contains the name of the file (optionally, without an extension) to be opened for the storage area.
iUnitThe integer iUnit parameter is the number of the storage unit to be used. This must be an entry from the StorageUnit enumeration that defines these unit numbers. For most applications the USER storage area should be used, as many of the authoring service methods in particular assume that they are using this area.
appendThe Boolean append, if true, then the file is opened with read/write access permission. If false, then the file is opened for read only access.
Returns
If all goes well a one (true) is returned. If there is a problem opening the storage area – usually because the file does not exist – a zero (false) is returned.

◆ ReadInfo()

static int gmslLibrary.Services.Store.ReadInfo ( tCodeBlock  info,
int  offset 
)
static

The method ReadInfo reads long blocks of information that were initially written using the method WriteInfo. A physical read is required, since these information vectors may cross block boundaries. The most common use of this method is to read the intermediate code associated with a component, though it may be used for any type of information.

Parameters
infoThe parameter info is an area in memory to receive the information read. It may be a code block or an integer vector.
offsetThe integer parameter offset is the offset of the start of the information to be read. This offset must be a value previously returned by the WriteInfo method.
Returns
The method returns the number of bytes read.

◆ RewriteInfo()

static void gmslLibrary.Services.Store.RewriteInfo ( tCodeBlock  info,
int  nByte,
int  offset 
)
static

The method RewriteInfo rewrites long blocks of information that were initially written using the method WriteInfo. A physical rewrite is required, since these information vectors may cross block boundaries. The most common use of this method is to rewrite the intermediate code associated with a component after it has been migrated, though it may be used for any type of information.

Parameters
infoThe parameter info is an area in memory that contains the information to be rewritten. It may be a code block or an integer vector.
nByteThe parameter nByte stecifies the number of bytes to be rewritten. This may not exceed the length of the information originally written to this offset.
offsetThe integer parameter offset is the offset of the start of the information to be rewritten. This offset must be a value previously returned by the WriteInfo method.

◆ Select()

static void gmslLibrary.Services.Store.Select ( int  iUnit)
static

The method Select selects one the available storage areas as the current storage area. All successive storage area accesses will be performed to this area until another call to this method is made. Note that this service only selects the area, it does not change it in any way.

Parameters
iUnitThe parameter iUnit is the number of the storage unit to be used. This must be a value between 1 and 16 or a entry from the enumeration StorageUnit.

◆ SetName()

static void gmslLibrary.Services.Store.SetName ( int  root,
string  Name 
)
static

The method SetName sets the target name of a component to a specified string. Whenever a component is stored in the symbol table using the Vector method that component is given an identifier by the caller. This identifier can then used to retrieve the component, and by default is used by the author whenever references to the component are being written in the target code. If references are to be authored with an alternate identifier (referred to as the "name" of the component) then this method is used to associate that name with the component.

Parameters
rootThe component is specified via its root offset.
NameSpecifies the target name of the component.

◆ SetObjectType()

static void gmslLibrary.Services.Store.SetObjectType ( int  root,
int  objType 
)
static

The method SetObjectType changes the component object type without changing any of its other information. This method can only be used with compatible objects like controls of different types.

Parameters
rootThe parameter root specifies the rool offset of the component to be changed.
objTypeThe parameter objType is either an entry number from the ObjectType enumeration, the opcode value of a built-in control if the component is a built-in control, or the root offset of an external class if the object is a of that external class.

◆ SetString()

static void gmslLibrary.Services.Store.SetString ( int  addr,
string  strValue 
)
static

The method SetString changes the value of an existing string whose length has not increased.

Parameters
offsetSpecifies the offset of the string when it was originally stored.
strValueContains the new content of the string.

◆ String()

static int gmslLibrary.Services.Store.String ( string  strValue)
static

The method String stores a character string in the current storage area and returns the offset in the storage area of the string.

Parameters
strValueSpecifies the string to be stored.
Returns
The offset of the string in the storage area. This offset can be used later to retrieve the string.

◆ Unit()

static int gmslLibrary.Services.Store.Unit ( )
static

The method Unit returns the unit number of the current storage area. This value is often gotten before moving to another storage area. It can then be used to return to this current area.

Returns
The current unit number.

◆ Vector()

static int gmslLibrary.Services.Store.Vector ( string  Identifier,
int  Parent,
int  Length,
int  type 
)
static

The Vector method stores a component information vector associated with an identifier as a child of a specified parent. It is the primary method used to enter components into the hierarchical symbol table. To enter a symbol, four things must be known. First, it must have a unique identifier relative to the parent of the symbol. Second, it must have a parent which can either be another symbol already entered into storage or can be the root branch of the symbol tree. Third, it must have a information storage vector length, which may be zero. If non-zero, a zero-filled area of storage is allocated to the component with the specified length. Fourth. it must have an object type code, which specifies the type of component being entered.

Parameters
identifierSpecifies the unique identifier relative to the parent of the symbol.
parentSpecifies the parent which can either the root offset be another symbol already entered into storage or can be the root branch of the symbol tree which is entered as zero.
lengthSpecifies the information storage vector length, which may be zero;
typeSpecifies the object type code.
Returns
If there already is a component with the same identifier stored in the specified branch of the symbol table, then a zero is returned; else the nonzero root offset of the component is returned. It is this root offset which must be used to manipulate or retrieve any information for the component.

◆ WriteInfo()

static int gmslLibrary.Services.Store.WriteInfo ( tCodeBlock  info,
int  nByte 
)
static

The method WriteInfo writes long information vectors into storage. There is no limit to the length of this information. Since block boundaries may occur within the storage area used, pointers should not be used to access the record, rather the methods GetInfo, ReadInfo, and RewiteInfo should be used. The most common use of this method is to write the intermediate code associated with a component, though it may be used for any type of information.

Parameters
infoThe vector info contains the information to be written. This might be either an integer array or a byte array.
nByteThe integer parameter nByte is the number of bytes to be written. If the number of bytes to be written is not well-formed – i.e., is less than or equal to zero, this method displays a message and returns a zero.

The bool parameter boundary, if true writes the information in such a way that no block boundaries are inserted. Its default is false.

Returns
The method returns the offset of the record in the storage area or zero if the write fails.

The documentation for this class was generated from the following file: