next up previous contents index
Next: I.6 The ``Post'' module Up: I. FeResPost Reference Manual Previous: I.4 The ``Result'' class   Contents   Index

Subsections


I.5 The ``ResKeyList'' class

A ResKeyList object is basically a set of Result keys (see Chapter I.4). Actually, a ResKeyList object is a kind of Result with no values associated to the keys.

One shows in section I.4.2 that several methods of class Result allow to build ResKeyList objects from Results, and to extract Results from other Results using ResKeyList objects.

A list of the methods defined in ``ResKeyList'' class is given in Table I.5.1.

Table I.5.1: The different methods that have been defined in ``ResKeyList'' class. userManual.ResKeyList.methods.tab
(FeResPost list of classes is given in Table 1 page [*].)
Method Name Description Example
     
Creation and initialization
RKL.newnew I.5.1 IV.2.5.1
RKL.initializeinitialize I.5.1  
RKL.cloneclone I.5.1  
RKL.insertinsert I.5.1  
RKL.getDatagetData I.5.6  
RKL.SizeSize I.5.7  
Identification
RKL.Name=Name= I.5.7  
RKL.NameName I.5.7  
Extractions
RKL.extractLayersextractLayers I.5.2  
RKL.extractSubLayersextractSubLayers I.5.2  
RKL.extractGroupextractGroup I.5.2  
Layers and sub-layers manipulation
RKL.renumberLayersrenumberLayers I.5.3.1  
RKL.renumberSubLayersrenumberSubLayers I.5.3.2  
RKL.removeLayersremoveLayers I.5.3.3  
RKL.removeSubLayersremoveSubLayers I.5.3.4  
Operators
RKL.++ I.5.4  
RKL.- I.5.4  
RKL.** I.5.4  
RKL.// I.5.4  
Iterators
RKL.each_keyeach_key I.5.5  
Printing
RKL.to_sto_s I.5.7  
Attributes
RKL.NameName I.5.7  
RKL.SizeSize I.5.7 (read only)
     


I.5.1 Creating and filling ResKeyList object

The usual ``RKL.newnew'' and ``RKL.initializeinitialize'' singleton methods are defined in the ResKeyList class. These methods have no arguments. The class member method ``RKL.cloneclone'' has no argument and returns a copy of the object.

The user can fill its one ResKeyList object with the ``RKL.insertinsert'' method. This method takes one Array Argument with between 1 and 4 elements corresponding to the element identifier, the node identifier, the layer identifier and the sub-layer identifier. Each element can be a String or an integer.


I.5.2 Extraction functions

Two extraction functions have been defined:

These methods have no arguments.


I.5.3 Methods modifying the object

The two methods described below correspond with the methods with identical names defined in ``Result'' class.


I.5.3.1 ``RKL.renumberLayersrenumberLayers''

``renumberLayers'' is a method used to renumber the layer integer ids of ResKeyList keys. The method has one Hash argument corresponding to the pairs of ``old integers IDs'' and ``new integer IDs''.


I.5.3.2 ``rRKL.enumberSubLayersenumberSubLayers''

``renumberSubLayers'' is a method used to renumber the sub-layer integer ids of ResKeyList keys. The method has one Hash argument corresponding to the pairs of ``old integers IDs'' and ``new integer IDs''.


I.5.3.3 ``RKL.removeLayersremoveLayers''

``removeLayers'' is a method used to remove keys selected on the basis of the layer ID of the key. The method has one ``LayersList'' argument: it is an Array containing the list of layers for which the keys must be removed. The elements of the Array argument are integer or String values.


I.5.3.4 ``RKL.removeSubLayersremoveSubLayers''

``removeSubLayers'' is a method used to remove keys selected on the basis of the layer ID of the key. The method has one ``SubLayersList'' argument: it is an Array containing the list of sub-layers for which the keys must be removed. The elements of the Array argument are integer or String values.


I.5.4 Dyadic operators

Eight such operators have been defined. One first explains the meaning and behavior of the four elementary dyadic operations.


I.5.5 Iterators

One ``RKL.each_keyeach_key'' iterator is defined in the class: it iterates on the data and produces Arrays of three elements corresponding to keys. The iterator may have between 0 and 4 arguments argument. The arguments are Strings that specify whether some of the data are to be returned in String or integer format.

Actually, the ``RKL.each_keyeach_key'' iterator of ResKeyList class is identical to the ``Result.each_keyeach_key'' iterator of Result class.


I.5.6 ``RKL.getDatagetData''

The method returns an Array of Arrays containing the data stored in a ResKeyList object. The returned Array may actually be considered as a two-dimensional Array with as many lines as there are pairs of keys in the ResKeyList object. Each line of the Array contains four elements:

  1. The first element corresponds to the elemId.
  2. The second element corresponds to the nodeId of the key.
  3. The third element corresponds to the layerId of the key.
  4. The fourth element corresponds to the subLayerId of the key.
The method may have 4, 3, 2, 1 or no argument. The arguments correspond to the type of the Array elements corresponding to elemId, nodeId, layerId or subLayerId. In the returned Array, these elements may be of String or Integer types. Correspondingly the arguments are Strings the value of which can be "int", "string" or any other String. If any other String is used as argument (for example a void string), the default Integer or String type elements are returned.

Actually, this method corresponds to the ``Result.getDatagetData'' method of Result class (See section I.4.9). The special key names are the same as those listed in Tables I.4.2 to I.4.4.


I.5.7 Other methods

One gives here a list of methods that do not fit in any category listed above:


next up previous contents index
Next: I.6 The ``Post'' module Up: I. FeResPost Reference Manual Previous: I.4 The ``Result'' class   Contents   Index
FeResPost 2017-05-28