|
ref
|
The ref allows retrieval of an object from the Object Repository {aGor}.
The ref function supports retrieval by arbitrary keys, by index, and by special symbolic keys.
The special symbolic keys are keys: member:, odbid:, name:, and position:. The special keys enable the
ref function to retrieve special information about the Object Repository such as the filename, associated
with the Object Repository, the position in the Repository Index of a specific key or the odbid or frameid
which are the identifiers needed by the low level database functions. As objects are added to the Object Repository, the keys are added to the Repository Index. The Repository Index is a Directory
Object and the keys are saved in sorted order. The entries in the Repository Index are Directory bindings comprised
of a key and a pointer value which points to the location of the Object in Object Repository (In some cases, the value may be saved
as an immediate value in the Repository Index, see the saveImmediate function). The Object Repository
automatically handles retrieval of the appropriate value off the disk.
When to use
The ref function is used to retrieve any of the following:
Also, the Object Repository supports low level operations such as Direct Frame Retrieval and Direct Frame Storage. The ref function can be used to retrieve a previously saved object by way of the object's frameid thus bypassing the repository index. The specified frameid must have been obtained from a previous repository save (see the Direct Frame Storage feature of the setq function).
Warning: If no object has been stored under the specified frameid value, or if the specified frameid is invalid, then an error is returned.
(ref aGor key) Returns the object in the Object Repository associated with the key.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ObjectRepository_ref_030
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types aGor The ObjectRepository which will be referenced. ObjectRepository key The key associated with the object. Symbol
Returns:
Examples
Argument Types
String
Symbol
Structure
Brick
Matrix
List
Void
Number
Date
Function
ObjectRepository
ShortVector
Dictionary
Directory
Vector
Text
Integer
Boolean
Character
Complex
Lambda
NumMatrix
How do I contact the AIS team?