#include <listi.h>
List of all members.
Public Member Functions |
| | listi (char *init_str, char separator) |
| | A constructor.
|
| | ~listi () |
| void | addelement (char *element) |
| | Adds a string to the list.
|
| void | removeelement (char *element) |
| | Removes a string from a list.
|
| char * | returnstring () |
| | returns its elements in a form of a separator separated string.
|
| int | getnum () |
| | returns the number of elements in the list.
|
| char * | getith (int i) |
| | Returns the ith element of the list as a string.
|
Protected Attributes |
| char ** | a |
| char * | buf |
| int | num |
| char | separ |
Detailed Description
Definition at line 8 of file listi.h.
Constructor & Destructor Documentation
| listi::listi |
( |
char * |
init_str, |
|
|
char |
separator |
|
) |
| |
A constructor.
- Parameters:
-
| init_str | a separator separated list string that initializes the list. If you want to create an empty list, just pass 0. |
| separator | a char, which is the separator in the initializing string and in the generated strings |
Definition at line 17 of file listi.cpp.
Member Function Documentation
| void listi::addelement |
( |
char * |
element | ) |
|
Adds a string to the list.
- Parameters:
-
| element | the address of the string to be added |
Definition at line 50 of file listi.cpp.
| char * listi::getith |
( |
int |
i | ) |
|
Returns the ith element of the list as a string.
- Parameters:
-
Definition at line 67 of file listi.cpp.
returns the number of elements in the list.
Definition at line 71 of file listi.cpp.
| void listi::removeelement |
( |
char * |
element | ) |
|
Removes a string from a list.
- Parameters:
-
| element | the address of the string to be removed |
Definition at line 75 of file listi.cpp.
| char * listi::returnstring |
( |
| ) |
|
returns its elements in a form of a separator separated string.
Definition at line 101 of file listi.cpp.
Member Data Documentation
The documentation for this class was generated from the following files: