list_intro (3) - Linux Man Pages
list_intro: a library providing generic list functionality and database-like list management
list_intro - a library providing generic list functionality and database-like list management
DESCRIPTIONThe Grid Engine List Library provides the functionality of a generic list. This means the list functions are applicable to every list based on a number of certain basic types. List definitions are extensible on a per-program basis as long as the old fields remain in the list definition. [Note that the information here is probably outdated.]
LIBRARY FUNCTIONSThe list library provides the following functions. See the adoc-derived documentation for more information.
- Create a generic list
- Free the memory allocated for a generic list and all its sublists
- Copy a generic list with all its sublists and strings
- Concatenate two generic lists
- Sort a generic list
- Dump a generic list to file
- Undump a generic list with all its data from file
- Write a generic list to stdout
- Return the name of a generic list
- Return a pointer to the descriptor of a generic list
- Return the number of list elements contained in a generic list
LIST ELEMENT FUNCTIONS
- Create a generic list element
- Append a list element to an existing list
- Insert a list element into an existing list after a specified element
- Dechain a list element from a list, the dechained element is not freed
- Find the first list element matching specified conditions
- Find the next list element starting at a certain list element matching specified conditions copy a list element partially (i.e. select specific fields that will be copied)
- Dump a list element to file
- Undump a list element from file into memory
- Write a list element to stdout get the field position of a list element field with name 'nm'
FIELD ACCESS FUNCTIONS
- lGetInt, Lgetulong, Lgetstring, Lgetlist, Lgetfloat, Lgetdouble, lGetChar, lGetLong
- Get the value of the specified type from a list element field; the element and the field name are delivered as arguments
- lSetInt, lSetUlong, lSetString, lSetList, lSetFloat, lSetDouble, lSetChar, lSetLong
- Set the value of the specified type in a corresponding list element field; the element, the field name and a new value are delivered as arguments
- lGetPosInt, lGetPosUlong, lGetPosString, lGetPosList, lGetPosFloat, lGetPosDouble, lGetPosChar, lGetPosLong
- Get the value of the specified type in a corresponding list element field; the element and the field position are delivered as arguments
- lSetPosInt, lSetPosUlong, lSetPosString, lSetPosList, lSetPosFloat, lSetPosDouble, lSetPosChar, lSetPosLong
- Set the value of the specified type in a corresponding list element field; the element, the field position and the new value are delivered as arguments
LIST DESCRIPTOR FUNCTIONS
- Initialize the name to string conversion
- Convert an int value specifying a fieldname to its corresponding name string
- Get the number of fields of a descriptor
- Get the position of the field named 'nm' from the descriptor
- Dump a list descriptor to a file
- Undump a list descriptor from a file to memory
- Write a descriptor to stdout
LIST DATABASE FUNCTIONS
- Select returns a list of elements that match the specified conditions.
- Join a specified list with one of its sublists; one can specify conditions for the list and the sublist. The joined list is returned and the original list is unchanged.
- Join two lists which fulfill the specified conditions to a new list that contains the enumerated fields. The joined list is returned and the original lists are unaltered.
- Build a lCondition data structure which is used as condition for various functions as lSelect or lJoin
- Free a lCondition data structure
- Write a lCondition data structure to stdout
- Build a lEnumeration data structure which is used to specify the fields that are contained in a newly created list element
- Free a lEnumeration data structure
- Write a lEnumeration data structure to stdout
- Count the number of fields in a lEnumeration data structure
DATA STRUCTURESThe following essential data structures are used by the various list library functions.
- lDescr *descriptor
- The descriptor contains the information which fields (name, type) are contained in a list.
- lList *list
- The lList pointer specifies a list created by lCreateList or any of the other functions generating a list. Here the name of the list, a reference to the descriptor, the number of contained list elements and a reference to the first and last list element are stored.
- lListElem *list_element
- The lListElem pointer is returned on creation of a new list element and contains the actual data.
- lConditionI *conditions
- The lCondition pointer is a representation of logically connected compare operations. It serves to decide whether it should be operated on a special list element.
- lEnumeration *field_enumerations
- The lEnumeration pointer specifies which fields of a given list element shall be involved in a specified action. It is possible under certain circumstances to specify all fields or no field at all.
- lSortOrder *sorting_order
- The lSortOrder pointer is used to specify sorting criteria for a generic list. It is possible to declare combined sorting keys.
COPYRIGHTSee for a full statement of rights and permissions.