10. The treatment of objects JEVEUX#

Creating objects

The creation of descriptors (name and class, genre, and type attributes) for JEVEUX objects is done using the JECREO routine for simple objects, and by the JECREC routine for collections. The decoding of the string passed as an argument to assign the attributes is done by the routine JJANAL. In the case of objects of type E, the length attributes are directly affected.

Attribute assignment

Generic attributes are assigned when creating the simple object or collection name and are shown in the following table:

  • for simple objects and collections:

  • for collections only:

ACCES

Access type: NOsi named, NUsi numbered

NOpeut be followed by the name of the name directory

STOCKAGE

CONTIGou DISPERSE

MODELONG

mode for defining the length of collection objects: CONSTANTou VARIABLE

VARIABLEpeut be followed by the name of the length pointer

LONT

total length of a contiguous collection

NMAXOC

maximum number of items in the collection

The other attributes are assigned using routine JEECRA, these attributes are shown in the table below:

  • for simple items or collectibles:

LONMAX

length of the type V object

NOMMAX

length of the type N object

LONUTI

used length of the type V object

NOMUTI

used length of the type N object

DOCU

documentary field (4 characters)

Reading attributes

The values associated with the various attributes can be viewed at any time using the JELIRA routine, including the attributes managed internally:

  • accessible internal attributes:

DATE

object disk last unloaded date

ORIG

not used

IADM

memory address

IADD

disk address

LONO

length measured in the type of value segments and according to their gender

USAGE

usage (status and state) of the value segment in memory: UD, UA, XD, XAou XX.

The status and status of a segment of values in memory can be collected by this routine using USAGE as the value of the attribute name argument. The value XOUS for this same argument determines whether the object is a collection (X) or a simple object (S).

Note:

The consultation of the attributes of collection objects may require the storage of the attribute objects in memory, and their release at the end of action. A temporary mark equal to -2 is assigned in this case.

Request for access to objects

All requests for access to JEVEUX objects (simple objects, collectibles or entire collections), whether direct (JEVEUO, JEVEUS, JEVEUT) or indirect (JEEXIN, JENONU,…) follow the following process:

  • processing the object name passed as an argument by JJVERN,

  • possibly, storing or verifying the presence of system objects in memory in the case of a collection by routine JJALLC, then using routine JJCROC, determining the named collection object identifier or verifying the numbered collection order number,

depending on the type, call JJALTY to obtain the address in relation to the table Z of the common reference,

  • possibly stored and then assignment of the identifiers of the value segment and the brand, and determination of the relative address by the routine JXVEUO,

  • in some cases (for example attribute consultations), freeing the object and/or the collection by JJLIDE.

The attributes necessary for the description of the object JEVEUX are re-read or determined by the routine JXVEUO, the processing is immediate for simple objects because there is direct access to the attributes in the system objects associated with the database, some operations are necessary to process the collection or collection object attributes (positioning in the collection system objects).

Variant JEVEUS permanently allocates the value segment in memory.

Destruction of objects

The destruction of an object JEVEUX (simple object, collection, or scattered collection object) requires two interventions: the destruction of the value segment and the destruction of the attributes. For a simple object, the value segment can have a disk image, in this case it is also necessary to destroy the latter, the corresponding record (s) will be marked free and can be recovered later. The value segment in memory will be marked free. The disk image, if it exists, will be marked free using, depending on the type of object, the descriptors of the record (system object $$ USADI) or the descriptors within a record (assignment of the - sign). This function is provided by routine JXLIBD. The attributes (name, length, genre, etc.) will be released (routine JJMZAT) and their position in the system objects of the associated database will be available for new descriptor creations. The system object containing the addresses of the marked objects must also be updated. The processing of a collection object is identical, the attributes are updated on the system objects in the collection. Of course, the value segment for a contiguous collection object cannot be destroyed. Destroying a collection is achieved by destroying all collection objects and system objects in the collection provided they are not shared. The routines JEDETR and JEDETC allow you to destroy JEVEUX objects, the first works from an identifier, the second, more expensive, first of all performs a descriptor search in the directories of open classes using a character string at a given position. The JEDETV routine is only used to destroy objects on the volatile basis associated with class V between the various Code_Aster commands.

Explicit release of objects

Although the release mechanism is implemented with the concept of brand and the mandatory calls to routines JEMARQ and JEDEMA, some configurations require an explicit call to the following release routines:

JELIBE release the requested object while respecting the affected brand,

JELIBS frees the name object passed as an argument when the associated brand is set to -3,

JELIBZ frees all the objects associated with a class whose associated mark is -1.

Copy objects

The JEDUPO utility allows you to duplicate a JEVEUX object (simple object, or complete collection) possibly by dropping the result on a different class. The new items are released at the end of the operation. While this action poses no difficulty for simple objects, certain precautions should be taken with respect to collections that rely on external pointers. The latter can be recreated to become system objects specific to the collection (we no longer benefit from the pooling of the attributes concerned) or be kept as they are, but it is then not allowed to deposit the result of the copying on another class. The receptacle can pre-exist (the user provides a name or a string), in which case it is destroyed at the beginning of the operation. Recopying does not necessarily require the presence in memory of the segments of values to be copied; they can be re-read directly on disk.

It is possible to use the JEDUPC utility, which works from a substring of characters but requires a prior search for names in the directory (which can be expensive).

Printing the content of value segments

The JEIMPO utility is responsible for printing the content of the value segment (s) associated with the JEVEUX objects in a pleasant way. System objects (associated with a class or a collection) are processed by the JEPRAT routine. Once stored in memory, a particular mark (-2) is assigned to the loaded value segments. Depending on the type of object (simple object, collection object or collection), the attributes associated with the segment (s) of values are retrieved to call the routine JJIMPO which formats the data.