ajlist.c

Datatypes:
AjPList Lists
AjIList List iterators
AjPList String lists
AjIList String list iterators


Datatype: AjPList

Sections:
ConstructorsConstructors
Adding valuesModifiers
ModifiersModifiers
Removing dataCasts
Element retrievalCasts
Trace functionsMiscellaneous
DestructorsDestructors
unusedMiscellaneous
exitMiscellaneous


AjPList: Constructors

Constructors for lists

Functions:
ajListNewCreates a new general list.
ajListNewListrefCopy a list.
ajListNewRefMakes a reference-counted copy of any list


Function ajListNew

Creates a new general list.

Prototype

AjPList ajListNew (
      void
);

TypeNameRead/WriteDescription
AjPList RETURNnew list;

From EMBOSS 1.0.0


Function ajListNewListref

Copy a list.

Prototype

AjPList ajListNewListref (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputlist to be copied
AjPList RETURNnew copied list.

From EMBOSS 5.0.0


Function ajListNewRef

Makes a reference-counted copy of any list

Prototype

AjPList ajListNewRef (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifylist to be given a new reference
AjPList RETURNnew list;

From EMBOSS 6.4.0


AjPList: Adding values

Functions:
ajListPushAdd a new node at the start of the list and add the data pointer.
ajListPushAppendAdd a new node at the end of the list and add the data pointer.
ajListPushlistAdds a list to the start of the current list, then deletes the second list.


Function ajListPush

Add a new node at the start of the list and add the data pointer.

Prototype

void ajListPush (
      AjPList list,
      void* item
);

TypeNameRead/WriteDescription
AjPListlistModifylist to be changed.
void*itemModifyPointer to data.
void RETURN

From EMBOSS 1.0.0


Function ajListPushAppend

Add a new node at the end of the list and add the data pointer.

Prototype

void ajListPushAppend (
      AjPList list,
      void* item
);

TypeNameRead/WriteDescription
AjPListlistModifyList to be changed.
void*itemModifyPointer to data to append.
void RETURN

From EMBOSS 5.0.0


Function ajListPushlist

Adds a list to the start of the current list, then deletes the second list.

Prototype

void ajListPushlist (
      AjPList list,
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
AjPList*PlistDeleteAJAX List address to be merged.
void RETURN

From EMBOSS 5.0.0


AjPList: Modifiers

Functions:
ajListMapFor each node in the list call function apply.
ajListPurgeGarbage collect a list
ajListReverseReverse the order of the nodes in an abstract list.
ajListSortSort the items in a list.
ajListSortTwoSort the items in a list using 2 fields in the same object hierarchy.
ajListSortTwoThreeSort the items in a list using 3 fields in the same object hierarchy.
ajListSortTwoUniqueDouble-sort the items in a list, and remove duplicates
ajListSortUniqueSort the items in a list, and remove duplicates


Function ajListMap

For each node in the list call function apply.

Prototype

void ajListMap (
      AjPList list,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
void functionapplyFunctionFunction to call for each list item.
void*clModifyStandard, usually NULL.
void RETURN

From EMBOSS 1.0.0


Function ajListPurge

Garbage collect a list

Prototype

void ajListPurge (
      AjPList list,
      AjBool function test,
      void function itemdel
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
AjBool functiontestFunctionFunction to test whether to delete
void functionitemdelFunctionWrapper function for item destructor
void RETURN

From EMBOSS 5.0.0


Function ajListReverse

Reverse the order of the nodes in an abstract list.

Prototype

void ajListReverse (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList
void RETURN

From EMBOSS 1.0.0


Function ajListSort

Sort the items in a list.

Prototype

void ajListSort (
      AjPList list,
      int function compar1
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
int functioncompar1FunctionFunction to compare two list items.
void RETURN

From EMBOSS 1.0.0


Function ajListSortTwo

Sort the items in a list using 2 fields in the same object hierarchy.

Prototype

void ajListSortTwo (
      AjPList list,
      int function compar1,
      int function compar2
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
int functioncompar1Function1st function to compare two list items.
int functioncompar2Function2nd function to compare two list items.
void RETURN

From EMBOSS 5.0.0


Function ajListSortTwoThree

Sort the items in a list using 3 fields in the same object hierarchy.

Prototype

void ajListSortTwoThree (
      AjPList list,
      int function compar1,
      int function compar2,
      int function compar3
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
int functioncompar1Function1st function to compare two list items.
int functioncompar2Function2nd function to compare two list items.
int functioncompar3Function3rd function to compare two list items.
void RETURN

From EMBOSS 5.0.0


Function ajListSortTwoUnique

Double-sort the items in a list, and remove duplicates

Prototype

void ajListSortTwoUnique (
      AjPList list,
      int function compar1,
      int function compar2,
      void function itemdel
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
int functioncompar1FunctionFunction to compare two list items.
int functioncompar2FunctionFunction to compare two list items.
void functionitemdelFunctionFunction to delete an item
void RETURN

From EMBOSS 5.0.0


Function ajListSortUnique

Sort the items in a list, and remove duplicates

Prototype

void ajListSortUnique (
      AjPList list,
      int function compar1,
      void function itemdel
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
int functioncompar1FunctionFunction to compare two list items.
void functionitemdelFunctionFunction to delete an item
void RETURN

From EMBOSS 5.0.0


AjPList: Removing data

Functions:
ajListDropRemoves a data value from a list if the address matches data for a node
ajListPopremove the first node but set pointer to data first.
ajListPopLastremove the last node but set pointer to data first.


Function ajListDrop

Removes a data value from a list if the address matches data for a node

Prototype

void* ajListDrop (
      AjPList list,
      void* item
);

TypeNameRead/WriteDescription
AjPListlistModifyList
void*itemInputData item
void* RETURNDropped data item.

From EMBOSS 6.5.0


Function ajListPop

remove the first node but set pointer to data first.

Prototype

AjBool ajListPop (
      AjPList list,
      void** Pitem
);

TypeNameRead/WriteDescription
AjPListlistModifyList
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 1.0.0


Function ajListPopLast

remove the last node but set pointer to data first.

Prototype

AjBool ajListPopLast (
      AjPList list,
      void** Pitem
);

TypeNameRead/WriteDescription
AjPListlistModifyList
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


AjPList: Element retrieval

Functions:
ajListGetLengthget the number of nodes in the linked list.
ajListMapfindFor each node in the list call function 'apply' and return ajTrue when any node is matched by the function.
ajListMapreadFor each node in the list call function apply. The apply function must not modify the list elements.
ajListPeekReturn the first node but keep it on the list
ajListPeekFirstSet pointer to first node's data. Does NOT remove the first node.
ajListPeekLastSet pointer to last node's data. Does NOT remove the last node.
ajListPeekNumberSet pointer to last node's nth data item. 0 <= n < number of elements.
ajListToarrayCreate an array of the pointers to the data.
ajListToindexCreate an array of the pointers to the data.


Function ajListGetLength

get the number of nodes in the linked list.

Prototype

ajulong ajListGetLength (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList
ajulong RETURNNumber of nodes in list.

From EMBOSS 5.0.0


Function ajListMapfind

For each node in the list call function 'apply' and return ajTrue when any node is matched by the function.

Prototype

AjBool ajListMapfind (
      const AjPList list,
      AjBool function apply,
      void* cl
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjBool functionapplyFunctionFunction to call to test each list item.
void*clModifyStandard, usually NULL.
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


Function ajListMapread

For each node in the list call function apply. The apply function must not modify the list elements.

Prototype

void ajListMapread (
      const AjPList list,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
const AjPListlistInputList.
void functionapplyFunctionFunction to call for each list item.
void*clModifyStandard, usually NULL.
void RETURN

From EMBOSS 5.0.0


Function ajListPeek

Return the first node but keep it on the list

Prototype

AjBool ajListPeek (
      const AjPList list,
      void** Pitem
);

TypeNameRead/WriteDescription
const AjPListlistInputList
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 2.7.0


Function ajListPeekFirst

Set pointer to first node's data. Does NOT remove the first node.

Prototype

AjBool ajListPeekFirst (
      const AjPList list,
      void** Pitem
);

TypeNameRead/WriteDescription
const AjPListlistInputList
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


Function ajListPeekLast

Set pointer to last node's data. Does NOT remove the last node.

Prototype

AjBool ajListPeekLast (
      const AjPList list,
      void** Pitem
);

TypeNameRead/WriteDescription
const AjPListlistInputList
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


Function ajListPeekNumber

Set pointer to last node's nth data item. 0 <= n < number of elements.

Prototype

AjBool ajListPeekNumber (
      const AjPList list,
      ajulong ipos,
      void** Pitem
);

TypeNameRead/WriteDescription
const AjPListlistInputList
ajulongiposInputelement of the list
void**PitemOutputpointer to pointer to data
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


Function ajListToarray

Create an array of the pointers to the data.

Prototype

ajulong ajListToarray (
      const AjPList list,
      void*** array
);

TypeNameRead/WriteDescription
const AjPListlistInputList
void***arrayOutputArray of pointers to list items.
ajulong RETURNSize of array of pointers.

From EMBOSS 5.0.0


Function ajListToindex

Create an array of the pointers to the data.

Prototype

ajulong ajListToindex (
      const AjPList list,
      ajuint* lind,
      int function compar1
);

TypeNameRead/WriteDescription
const AjPListlistInputList
ajuint*lindOutputPopulated index array to be sorted
int functioncompar1FunctionFunction to compare two list items.
ajulong RETURNSize of index array.

From EMBOSS 6.3.0


AjPList: Trace functions

Functions:
ajListProbeTest list for memory allocation conflicts
ajListProbeDataTest list and data for memory allocation conflicts
ajListTraceTraces through a list and validates it


Function ajListProbe

Test list for memory allocation conflicts

Prototype

void ajListProbe (
      AjPList const* Plist
);

TypeNameRead/WriteDescription
AjPList const*PlistInputList
void RETURN

From EMBOSS 6.0.0


Function ajListProbeData

Test list and data for memory allocation conflicts

Prototype

void ajListProbeData (
      AjPList const* Plist
);

TypeNameRead/WriteDescription
AjPList const*PlistInputList
void RETURN

From EMBOSS 6.0.0


Function ajListTrace

Traces through a list and validates it

Prototype

void ajListTrace (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputlist to be traced.
void RETURN

From EMBOSS 1.0.0


AjPList: Destructors

Functions:
ajListFreeFree all nodes in the list. NOTE: The data is only freed with a specified list type. For undefined data types we recommend you to use ajListMap with a routine to free the memory.
ajListFreeDataFree all nodes in the list. Free all the data values. For more complex data objects use ajListMap with a routine to free the object memory.


Function ajListFree

Free all nodes in the list. NOTE: The data is only freed with a specified list type. For undefined data types we recommend you to use ajListMap with a routine to free the memory.

Prototype

void ajListFree (
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPList*PlistDeleteAJAX List address
void RETURN

From EMBOSS 1.0.0


Function ajListFreeData

Free all nodes in the list. Free all the data values. For more complex data objects use ajListMap with a routine to free the object memory.

Prototype

void ajListFreeData (
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPList*PlistDeleteAJAX List address
void RETURN

From EMBOSS 4.1.0


AjPList: unused

Functions:
ajListUnusedDummy function to catch all unused functions defined in ajlist


Function ajListUnused

Dummy function to catch all unused functions defined in ajlist

Prototype

void ajListUnused (
      void** array
);

TypeNameRead/WriteDescription
void**arrayInputArray needed by ajListArrayTrace
void RETURN

From EMBOSS 5.0.0


AjPList: exit

Functions called on exit from the program by ajExit to do any necessary cleanup and to report internal statistics to the debug file

Functions:
ajListExitPrints a summary of list usage with debug calls


Function ajListExit

Prints a summary of list usage with debug calls

Prototype

void ajListExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 2.8.0


Datatype: AjIList

Function is for manipulating lists with any value type. Some functions are specially designed to understand string (AjPStr) values.

Sections:
constructorsConstructors
testsGeneral use
destructorsDestructors
steppingModifiers
modifiersModifiers
Trace functionsMiscellaneous


AjIList: constructors

Functions:
ajListIterNewCreates an iterator to operate from start to end of list.
ajListIterNewBackCreates an iterator to operate from end to start of the list.
ajListIterNewreadCreates an iterator to operate from start to end of read-only list.
ajListIterNewreadBackCreates an iterator to operate from end to start of the list.


Function ajListIterNew

Creates an iterator to operate from start to end of list.

Prototype

AjIList ajListIterNew (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList Not const in practice - the iterator can insert and delete entries
AjIList RETURNNew list iterator

From EMBOSS 5.0.0


Function ajListIterNewBack

Creates an iterator to operate from end to start of the list.

Prototype

AjIList ajListIterNewBack (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList Not const - the iterator can insert and delete entries
AjIList RETURNNew list iterator

From EMBOSS 5.0.0


Function ajListIterNewread

Creates an iterator to operate from start to end of read-only list.

Prototype

AjIList ajListIterNewread (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList Not const in practice - the iterator can insert and delete entries
AjIList RETURNNew list iterator

From EMBOSS 5.0.0


Function ajListIterNewreadBack

Creates an iterator to operate from end to start of the list.

Prototype

AjIList ajListIterNewreadBack (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjIList RETURNNew list iterator

From EMBOSS 5.0.0


AjIList: tests

Functions:
ajListIterDoneTests whether an iterator has completed yet.
ajListIterDoneBackTests whether a backwards iterator has completed yet.


Function ajListIterDone

Tests whether an iterator has completed yet.

Prototype

AjBool ajListIterDone (
      const AjIList iter
);

TypeNameRead/WriteDescription
const AjIListiterInputList iterator.
AjBool RETURNajTrue if the iterator is exhausted.

From EMBOSS 1.0.0


Function ajListIterDoneBack

Tests whether a backwards iterator has completed yet.

Prototype

AjBool ajListIterDoneBack (
      const AjIList iter
);

TypeNameRead/WriteDescription
const AjIListiterInputList iterator.
AjBool RETURNajTrue if the iterator is exhausted.

From EMBOSS 5.0.0


AjIList: destructors

Functions:
ajListIterDelDestructor for a list iterator.


Function ajListIterDel

Destructor for a list iterator.

Prototype

void ajListIterDel (
      AjIList* iter
);

TypeNameRead/WriteDescription
AjIList*iterDeleteList iterator.
void RETURN

From EMBOSS 5.0.0


AjIList: stepping

Functions:
ajListIterGetReturns next item using iterator, or steps off the end.
ajListIterGetBackReturns next item using back iterator.


Function ajListIterGet

Returns next item using iterator, or steps off the end.

Prototype

void* ajListIterGet (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void* RETURNData item returned.

From EMBOSS 5.0.0


Function ajListIterGetBack

Returns next item using back iterator.

Prototype

void* ajListIterGetBack (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void* RETURNData item returned.

From EMBOSS 5.0.0


AjIList: modifiers

Functions:
ajListIterInsertInsert an item in a list, using an iterator (if not null) to show which position to insert. Otherwise, simply push.
ajListIterRemoveRemove an item from a list, using an iterator (if not null) to show which item. Otherwise remove the first item.
ajListIterRewindResets iterator to start position


Function ajListIterInsert

Insert an item in a list, using an iterator (if not null) to show which position to insert. Otherwise, simply push.

Prototype

void ajListIterInsert (
      AjIList iter,
      void* item
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void*itemModifyData item to insert.
void RETURN

From EMBOSS 5.0.0


Function ajListIterRemove

Remove an item from a list, using an iterator (if not null) to show which item. Otherwise remove the first item.

Prototype

void ajListIterRemove (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void RETURN

From EMBOSS 5.0.0


Function ajListIterRewind

Resets iterator to start position

Prototype

void ajListIterRewind (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void RETURN

From EMBOSS 6.0.0


AjIList: Trace functions

Functions:
ajListIterTraceTraces a list iterator and validates it.


Function ajListIterTrace

Traces a list iterator and validates it.

Prototype

void ajListIterTrace (
      const AjIList iter
);

TypeNameRead/WriteDescription
const AjIListiterInputlist iterator to be traced.
void RETURN

From EMBOSS 1.0.0


Datatype: AjPList

Functions working on lists of string values

Sections:
ConstructorsConstructors
Adding valuesModifiers
ModifiersModifiers
Removing dataCasts
Element retrievalCasts
Trace functionsMiscellaneous
DestructorsDestructors


AjPList: Constructors

Constructors for lists

Functions:
ajListstrNewCreates a new string list.
ajListstrNewListCopy a list, with copies of all the string values.
ajListstrNewListrefCopy a string list.


Function ajListstrNew

Creates a new string list.

Prototype

AjPList ajListstrNew (
      void
);

TypeNameRead/WriteDescription
AjPList RETURNnew list;

From EMBOSS 1.0.0


Function ajListstrNewList

Copy a list, with copies of all the string values.

Prototype

AjPList ajListstrNewList (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputlist to be copied
AjPList RETURNnew copied list.

From EMBOSS 5.0.0


Function ajListstrNewListref

Copy a string list.

Prototype

AjPList ajListstrNewListref (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList to be copied
AjPList RETURNNew, copied, list.

From EMBOSS 5.0.0


AjPList: Adding values

Functions:
ajListstrPushAdd a new node at the start of a string list.
ajListstrPushAppendAdd a new node at the end of the list and add the data pointer.
ajListstrPushlistAdds a list to the start of the current list, then deletes the second list.


Function ajListstrPush

Add a new node at the start of a string list.

Prototype

void ajListstrPush (
      AjPList list,
      AjPStr str
);

TypeNameRead/WriteDescription
AjPListlistModifylist to be changed.
AjPStrstrModifyString data.
void RETURN

From EMBOSS 1.0.0


Function ajListstrPushAppend

Add a new node at the end of the list and add the data pointer.

Prototype

void ajListstrPushAppend (
      AjPList list,
      AjPStr str
);

TypeNameRead/WriteDescription
AjPListlistModifyList to be changed.
AjPStrstrModifyString to append.
void RETURN

From EMBOSS 5.0.0


Function ajListstrPushlist

Adds a list to the start of the current list, then deletes the second list.

Prototype

void ajListstrPushlist (
      AjPList list,
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
AjPList*PlistDeleteAJAX List address to be merged.
void RETURN

From EMBOSS 5.0.0


AjPList: Modifiers

Functions:
ajListstrMapFor each node in the list call function apply, with the address of the string and a client pointer.
ajListstrReverseReverse the order of the nodes in a string list.


Function ajListstrMap

For each node in the list call function apply, with the address of the string and a client pointer.

Prototype

void ajListstrMap (
      AjPList list,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
AjPListlistModifyList.
void functionapplyFunctionFunction to call for each list item.
void*clModifyStandard, usually NULL.
void RETURN

From EMBOSS 1.0.0


Function ajListstrReverse

Reverse the order of the nodes in a string list.

Prototype

void ajListstrReverse (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList
void RETURN

From EMBOSS 1.0.0


AjPList: Removing data

Functions:
ajListstrPopRemove the first node but set pointer to data first.
ajListstrPopLastRemove the last node but set pointer to data first.


Function ajListstrPop

Remove the first node but set pointer to data first.

Prototype

AjBool ajListstrPop (
      AjPList list,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPListlistModifyList
AjPStr*PstrOutputString
AjBool RETURNajTrue on success.

From EMBOSS 1.0.0


Function ajListstrPopLast

Remove the last node but set pointer to data first.

Prototype

AjBool ajListstrPopLast (
      AjPList list,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPListlistModifyList
AjPStr*PstrOutputString
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


AjPList: Element retrieval

Functions:
ajListstrGetLengthget the number of nodes in the linked list.
ajListstrGetMemsizeget the memory used nodes in the linked string list.
ajListstrMapfindFor each node in the list call function apply and return ajTrue when any node is matched by the function.
ajListstrMapreadFor each node in the list call function apply, with the address of the string and a client pointer. The apply function must not modify the list elements.
ajListstrPeekReturn the first node but keep it on the list.
ajListstrToarraycreate an array of the pointers to the data.
ajListstrToarrayAppendappend to an array of the pointers to the data.


Function ajListstrGetLength

get the number of nodes in the linked list.

Prototype

ajulong ajListstrGetLength (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList
ajulong RETURNNumber of nodes in list.

From EMBOSS 5.0.0


Function ajListstrGetMemsize

get the memory used nodes in the linked string list.

Prototype

ajulong ajListstrGetMemsize (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputList
ajulong RETURNNumber of bytes allocated in list.

From EMBOSS 6.5.0


Function ajListstrMapfind

For each node in the list call function apply and return ajTrue when any node is matched by the function.

Prototype

AjBool ajListstrMapfind (
      const AjPList list,
      AjBool function apply,
      void* cl
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjBool functionapplyFunctionFunction to call to test each list item.
void*clModifyStandard, usually NULL.
AjBool RETURNajTrue on success.

From EMBOSS 5.0.0


Function ajListstrMapread

For each node in the list call function apply, with the address of the string and a client pointer. The apply function must not modify the list elements.

Prototype

void ajListstrMapread (
      const AjPList list,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
const AjPListlistInputList.
void functionapplyFunctionFunction to call for each list item.
void*clModifyStandard, usually NULL.
void RETURN

From EMBOSS 5.0.0


Function ajListstrPeek

Return the first node but keep it on the list.

Prototype

AjBool ajListstrPeek (
      const AjPList list,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjPStr*PstrOutputString
AjBool RETURNajTrue on success.

From EMBOSS 2.7.0


Function ajListstrToarray

create an array of the pointers to the data.

Prototype

ajulong ajListstrToarray (
      const AjPList list,
      AjPStr** array
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjPStr**arrayOutputArray of Strings.
ajulong RETURNSize of array of pointers.

From EMBOSS 5.0.0


Function ajListstrToarrayAppend

append to an array of the pointers to the data.

Prototype

ajulong ajListstrToarrayAppend (
      const AjPList list,
      AjPStr** array
);

TypeNameRead/WriteDescription
const AjPListlistInputList
AjPStr**arrayOutputArray of Strings.
ajulong RETURNSize of array of pointers.

From EMBOSS 5.0.0


AjPList: Trace functions

Functions:
ajListstrTraceTraces through a string list and validates it


Function ajListstrTrace

Traces through a string list and validates it

Prototype

void ajListstrTrace (
      const AjPList list
);

TypeNameRead/WriteDescription
const AjPListlistInputlist to be traced.
void RETURN

From EMBOSS 1.0.0


AjPList: Destructors

Functions:
ajListstrFreeFree the list. Do not attempt to free the nodes. For use where the node data has been saved elsewhere, for example by ajListToarray or where the list is a temporary structure referring to permanent data.
ajListstrFreeDataFree all nodes in a string list. Also deletes all the strings. If these are to be preserved, use ajListstrDel instead.


Function ajListstrFree

Free the list. Do not attempt to free the nodes. For use where the node data has been saved elsewhere, for example by ajListToarray or where the list is a temporary structure referring to permanent data.

Prototype

void ajListstrFree (
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPList*PlistDeleteAJAX List address
void RETURN

From EMBOSS 1.0.0


Function ajListstrFreeData

Free all nodes in a string list. Also deletes all the strings. If these are to be preserved, use ajListstrDel instead.

Prototype

void ajListstrFreeData (
      AjPList* Plist
);

TypeNameRead/WriteDescription
AjPList*PlistDeleteAJAX List address
void RETURN

From EMBOSS 5.0.0


Datatype: AjIList

Function is for manipulating lists with string values. Some functions are specially designed to understand string (AjPStr) values.

Sections:
steppingModifiers
modifiersModifiers
Trace functionsMiscellaneous


AjIList: stepping

Functions:
ajListstrIterGetReturns next item using iterator, or steps off the end.
ajListstrIterGetBackReturns next item using back iterator.


Function ajListstrIterGet

Returns next item using iterator, or steps off the end.

Prototype

AjPStr ajListstrIterGet (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
AjPStr RETURNData item returned.

From EMBOSS 6.0.0


Function ajListstrIterGetBack

Returns next item using back iterator.

Prototype

AjPStr ajListstrIterGetBack (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
AjPStr RETURNData item returned.

From EMBOSS 6.0.0


AjIList: modifiers

Functions:
ajListstrIterInsertInsert an item in a list, using an iterator (if not null) to show which position to insert. Otherwise, simply push.
ajListstrIterRemoveRemove an item from a list, using an iterator (if not null) to show which item. Otherwise remove the first item.


Function ajListstrIterInsert

Insert an item in a list, using an iterator (if not null) to show which position to insert. Otherwise, simply push.

Prototype

void ajListstrIterInsert (
      AjIList iter,
      AjPStr str
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
AjPStrstrModifyString to insert.
void RETURN

From EMBOSS 5.0.0


Function ajListstrIterRemove

Remove an item from a list, using an iterator (if not null) to show which item. Otherwise remove the first item.

Prototype

void ajListstrIterRemove (
      AjIList iter
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator.
void RETURN

From EMBOSS 5.0.0


AjIList: Trace functions

Functions:
ajListstrIterTraceTraces a list iterator and validates it


Function ajListstrIterTrace

Traces a list iterator and validates it

Prototype

void ajListstrIterTrace (
      const AjIList iter
);

TypeNameRead/WriteDescription
const AjIListiterInputList iterator to be traced.
void RETURN

From EMBOSS 1.0.0