IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2004, 12:44:25 PM (22 years ago)
Author:
desonia
Message:

fixed some stupid indent-induced formating problems and added doxygen
comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psList.h

    r1407 r1426  
    1010 *  @ingroup LinkedList
    1111 *
    12  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333 */
    3434enum {
    35     PS_LIST_HEAD = 0,           // /< at head
    36     PS_LIST_TAIL = -1,                     // /< at tail
    37     PS_LIST_PREVIOUS = -2,                 // /< previous element
    38     PS_LIST_CURRENT = -3,                  // /< current element
    39     PS_LIST_NEXT = -4,                     // /< next element
    40     PS_LIST_UNKNOWN = -5                   // /< unknown position (should be last in enum list)
     35    PS_LIST_HEAD = 0,           ///< at head
     36    PS_LIST_TAIL = -1,                     ///< at tail
     37    PS_LIST_PREVIOUS = -2,                 ///< previous element
     38    PS_LIST_CURRENT = -3,                  ///< current element
     39    PS_LIST_NEXT = -4,                     ///< next element
     40    PS_LIST_UNKNOWN = -5                   ///< unknown position (should be last in enum list)
    4141};
    4242
     
    4444typedef struct psListElem
    4545{
    46     struct psListElem *prev;    // /< previous link in list
    47     struct psListElem *next;    // /< next link in list
    48     void *data;                 // /< real data item
     46    struct psListElem *prev;    ///< previous link in list
     47    struct psListElem *next;    ///< next link in list
     48    void *data;                 ///< real data item
    4949}
    5050psListElem;
     
    5757typedef struct
    5858{
    59     unsigned int size;          // /< number of elements on list
    60     psListElem *head;           // /< first element on list (may be NULL)
    61     psListElem *tail;           // /< last element on list (may be NULL)
    62     psListElem *iter;           // /< iteration cursor
    63     unsigned int iterIndex;     // /< the numeric position of the iteration cursor in the list
    64     pthread_mutex_t lock;       // /< mutex to lock a node during changes
     59    unsigned int size;          ///< number of elements on list
     60    psListElem *head;           ///< first element on list (may be NULL)
     61    psListElem *tail;           ///< last element on list (may be NULL)
     62    psListElem *iter;           ///< iteration cursor
     63    unsigned int iterIndex;     ///< the numeric position of the iteration cursor in the list
     64    pthread_mutex_t lock;       ///< mutex to lock a node during changes
    6565}
    6666psList;
     
    7171 */
    7272psList *psListAlloc(void *data
    73                     // /< initial data item; may be NULL if no an empty psList is desired
     73                    ///< initial data item; may be NULL if no an empty psList is desired
    7474                   )
    7575;
     
    8080 *                      NULL, the return value will also be NULL.
    8181 */
    82 bool psListAdd(psList * restrict list,  // /< list to add to (if NULL, nothing is done)
    83                void *data,      // /< data item to add.  If NULL, list is not modified.
    84                int where        // /< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     82bool psListAdd(psList * restrict list,  ///< list to add to (if NULL, nothing is done)
     83               void *data,      ///< data item to add.  If NULL, list is not modified.
     84               int where        ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
    8585              );
    8686
     
    9090 */
    9191bool psListRemove(psList * restrict list,
    92                   // /< list to remove element from
     92                  ///< list to remove element from
    9393                  void *data,
    94                   // /< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
     94                  ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
    9595                  int which
    96                   // /< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
     96                  ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
    9797                 );
    9898
     
    104104 *                      NULL is returned.
    105105 */
    106 void *psListGet(psList * restrict list, // /< list to retrieve element from
    107                 int which       // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
     106void *psListGet(psList * restrict list, ///< list to retrieve element from
     107                int which       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
    108108               );
    109109
     
    112112 *
    113113 */
    114 void psListSetIterator(psList * restrict list,  // /< list to retrieve element from
    115                        int where        // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL
     114void psListSetIterator(psList * restrict list,  ///< list to retrieve element from
     115                       int where        ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    116116                      );
    117117
     
    123123 *                      parameter was NULL.
    124124 */
    125 void *psListGetNext(psList * restrict list      // /< list to retrieve element from
     125void *psListGetNext(psList * restrict list      ///< list to retrieve element from
    126126                   );
    127127
     
    133133 *                      iterator is not valid or list parameter was NULL.
    134134 */
    135 void *psListGetCurrent(psList * restrict list   // /< list to retrieve element from
     135void *psListGetCurrent(psList * restrict list   ///< list to retrieve element from
    136136                      );
    137137
     
    143143 *                      parameter was NULL.
    144144 */
    145 void *psListGetPrevious(psList * restrict list  // /< list to retrieve element from
     145void *psListGetPrevious(psList * restrict list  ///< list to retrieve element from
    146146                       );
    147147
     
    151151 *                      or NULL if the given dlist parameter is NULL.
    152152 */
    153 psArray *psListToArray(psList * dlist   // /< List to convert
     153psArray *psListToArray(psList * dlist   ///< List to convert
    154154                      );
    155155
     
    159159 *                      or NULL is the given arr parameter is NULL.
    160160 */
    161 psList *psArrayToList(psArray * arr     // /< vector to convert
     161psList *psArrayToList(psArray * arr     ///< vector to convert
    162162                     );
    163163
Note: See TracChangeset for help on using the changeset viewer.