public:
DSList();
Creates a new empty List.
public:
void append(DSListElement * node);
Appends the specified ListElement to the end of the list, as opposed to insert, which inserts it at the top of the list.
Name Description node Specifies the new element. This is not copied, and is inserted directly into the list.
public:
void append(char* Key, void* Data, int cleanup=0);
Appends the specified key/value to the end of the list, as opposed to insert, which inserts it at the top of the list.
Name Description Key Specifies the key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void append(unsigned int Key, void* Data, int cleanup=0);
Appends the specified key/value to the end of the list, as opposed to insert, which inserts it at the top of the list.
Name Description Key Specifies the numeric key of the new value. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void append(char* Key, unsigned int Data, int cleanup=0);
Appends the specified key/value to the end of the list, as opposed to insert, which inserts it at the top of the list.
Name Description Key Specifies the key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void append(unsigned int Key, unsigned int Data, int cleanup=0);
Appends the specified key/value to the end of the list, as opposed to insert, which inserts it at the top of the list.
Name Description Key Specifies the numeric key of the new value. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags. In this call, as both values are numeric, this parameter has no effect. but is retained for consistency.
public:
void close();
Removes all the elements from the list, and destroys data in accordance with the cleanup flags of each element. The List remains available for use.
public:
void delElement(DSListElement* ele);
Removes the specified element from the List.
Name Description ele Points to a ListElement which is to be removed from the list. Its data will be dealt with according to its cleanup flags.
public:
void delHead();
Removes the first element from the List.
public:
void delItem(unsigned int Key);
Removes elements with the specified Key from the List.
Name Description Key Specifies a numeric key corresponding to the items to be removed. Its data will be dealt with according to its cleanup flags.
public:
void delItem(const char* Key);
Removes elements with the specified Key from the List.
Name Description Key Specifies a string key corresponding to the items to be removed. Its data will be dealt with according to its cleanup flags.
public:
void delTail();
Removes the last element from the List.
public:
DSListElement* getElement(unsigned int Key);
Retrieves an element from the list with the specified Key.
Result: A pointer to the requested ListElement in the list, or NULL if the element was not found.
Name Description Key A numeric key corresponding to the desired element.
public:
DSListElement* getElement(const char* Key);
Retrieves an element from the list with the specified Key.
Result: A pointer to the requested ListElement in the list, or NULL if the element was not found.
Name Description Key A string key corresponding to the desired element.
public:
DSListElement* getHead();
Retrieves the first element in the List.
Result: A pointer to the first ListElement in the list, or NULL if there are no elements in the list.public:
unsigned int getNumericValue(const char* Key);
Retrieves the value of an element from the list with the specified Key.
Result: The requested value in the list, or 0 if the element was not found.
Name Description Key A string key corresponding to the desired value.
public:
unsigned int getNumericValue(unsigned int Key);
Retrieves the value of an element from the list with the specified Key.
Result: The requested value in the list, or 0 if the element was not found.
Name Description Key A numeric key corresponding to the desired value.
public:
void* getPtrValue(const char* Key);
Retrieves the value of an element from the list with the specified Key.
Result: A pointer to the requested value in the list, or NULL if the element was not found.
Name Description Key A string key corresponding to the desired value.
public:
void* getPtrValue(unsigned int Key);
Retrieves the value of an element from the list with the specified Key.
Result: A pointer to the requested value in the list, or NULL if the element was not found.
Name Description Key A numeric key corresponding to the desired value.
public:
DSListElement* getTail();
Retrieves the last element in the List.
Result: A pointer to the last ListElement in the list, or NULL if there are no elements in the list.public:
void inSort(char* Key, void* Data, int cleanup=0);
Inserts the specified key/value to the list maintaining ascending order.
Name Description Key Specifies the string key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void inSort(unsigned int Key, void* Data, int cleanup=0);
Inserts the specified key/value to the list, maintaining ascending order.
Name Description Key Specifies the numeric key of the new value. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void inSort(char* Key, unsigned int Data, int cleanup=0);
Inserts the specified key/value to the list, maintaining ascending order.
Name Description Key Specifies the string key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void inSort(unsigned int Key, unsigned int Data, int cleanup=0);
Inserts the specified key/value to the list, maintaining ascending order.
Name Description Key Specifies the numeric key of the new value. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void init();
Creates a new linked list where the constructor can't be used, ie., after allocating a List using malloc. This should not be used in any other case, and the use of malloc is strongly discouraged in favor of new.
public:
void insert(DSListElement * node);
Inserts the specified ListElement to the head of the list.
Name Description node Specifies the new ListElement. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant.
public:
void insert(char* Key, void* Data, int cleanup=0);
Inserts the specified key/value to the head of the list.
Name Description Key Specifies the string key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void insert(unsigned int Key, void* Data, int cleanup=0);
Inserts the specified key/value to the head of the list.
Name Description Key Specifies the numeric key of the new value. Data Specifies the data of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void insert(char* Key, unsigned int Data, int cleanup=0);
Inserts the specified key/value to the head of the list.
Name Description Key Specifies the string key of the new value. Remember, this data is not copied, but the pointer is used directly. You should copy your own data if it isn't constant. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
void insert(unsigned int Key, unsigned int Data, int cleanup=0);
Inserts the specified key/value to the head of the list.
Name Description Key Specifies the numeric key of the new value. Data Specifies the numeric data of the new value. cleanup Specifies the bitwise combination of flags used to clean up data. See the ListElement class for a list of permissable flags.
public:
unsigned int occurenceCount(const char* Key);
Returns the number of occurences of the specified Key there are in the list.
Result: The number of entries of the specified Key in the list.
Name Description Specifies the Key that needs counting.
public:
BOOL setKeyValue(const char* Key, char * data);
Changes the value of the key represented in the list by the specified key. The previous key is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the data was successfully changed, or FALSE of the element could not be found.
Name Description Key A string key corresponding to the desired value. data A pointer to the new key string.
public:
BOOL setKeyValue(const char* Key, unsigned int data);
Changes the value of the key represented in the list by the specified key. The previous key is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the data was successfully changed, or FALSE of the element could not be found.
Name Description Key A string key corresponding to the desired value. data The new numeric key.
public:
BOOL setKeyValue(unsigned int Key, char * data);
Changes the value of the key represented in the list by the specified key. The previous key is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the data was successfully changed, or FALSE of the element could not be found.
Name Description Key A numeric key corresponding to the desired value. data A pointer to the new key string.
public:
BOOL setKeyValue(unsigned int Key, unsigned int data);
Changes the value of the key represented in the list by the specified key. The previous key is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the data was successfully changed, or FALSE of the element could not be found.
Name Description Key A numeric key corresponding to the desired value. data The new numeric key.
public:
BOOL setValue(const char* Key, void * data);
Changes the value of the data represented in the list by the specified key. Any previous data is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the value were successfully changed, or FALSE of the element could not be found.
Name Description Key A string key corresponding to the desired value. data A pointer to the new data.
public:
BOOL setValue(const char* Key, unsigned int data);
Changes the value of the data represented in the list by the specified key. Any previous data is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the value were successfully changed, or FALSE of the element could not be found.
Name Description Key A string key corresponding to the desired value. data A numeric value of the new data.
public:
BOOL setValue(unsigned int Key, void * data);
Changes the value of the data represented in the list by the specified key. Any previous data is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the value were successfully changed, or FALSE of the element could not be found.
Name Description Key A numeric key corresponding to the desired value. data A pointer to the new data.
public:
BOOL setValue(unsigned int Key, unsigned int data);
Changes the value of the data represented in the list by the specified key. Any previous data is destroyed. The cleanup value governing the ListElement remains unaffected by the use of this call.
Result: Returns TRUE if the value were successfully changed, or FALSE of the element could not be found.
Name Description Key A numeric key corresponding to the desired value. data A numeric value of the new data.
public:
BOOL sortAsNumeric(BOOL bDescend=FALSE);
Sorts the linked list by numeric key.
Result: Returns TRUE if the data was successfully sorted, or FALSE if an error occurred.
Name Description bDescend If TRUE, sort in descending order; if FALSE or omitted, sort in ascending order.
public:
BOOL sortAsString(BOOL bDescend=FALSE);
Sorts the linked list by string key.
Result: Returns TRUE if the data was successfully sorted, or FALSE if an error occurred.
Name Description bDescend If TRUE, sort in descending order; if FALSE or omitted, sort in ascending order.
public:
~DSList();
Destroys a List.
Generated with HeaderDoc - © 2000 Apple Computer, Inc. (Last Updated 9/29/2003)