GDBMS 1.0
Public Member Functions | Protected Attributes
listi Class Reference

#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_stra separator separated list string that initializes the list. If you want to create an empty list, just pass 0.
separatora char, which is the separator in the initializing string and in the generated strings

Definition at line 17 of file listi.cpp.

listi::~listi ( )

Definition at line 38 of file listi.cpp.


Member Function Documentation

void listi::addelement ( char *  element)

Adds a string to the list.

Parameters:
elementthe 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:
iindex of the element.

Definition at line 67 of file listi.cpp.

int listi::getnum ( )

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:
elementthe 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

char** listi::a [protected]

Definition at line 69 of file listi.h.

char* listi::buf [protected]

Definition at line 70 of file listi.h.

int listi::num [protected]

Definition at line 71 of file listi.h.

char listi::separ [protected]

Definition at line 72 of file listi.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines