sampList.c File Reference

(Internal) interface to support the List structure. More...

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "samp.h"

Functions

handle_t samp_newList ()
 Create a new List object.
void samp_freeList (List list)
 Free the given List object.
int samp_listLen (List list)
 Get number of elements in a List.
void samp_setStringInList (List list, char *value)
 Set a string in a List (append).
void samp_setMapInList (List list, Map map)
 Set a Map in a List (append).
void samp_setListInList (List list1, List list2)
 Set a List in another List (append).
void samp_setIntInList (List list, int ival)
 Set an Int in a List (append).
void samp_setFloatInList (List list, float rval)
 Set a Float in a List (append).
char * samp_getStringFromList (List list, int index)
 Get a string from the List.
Map samp_getMapFromList (List list, int index)
 Get a Map from the List.
List samp_getListFromList (List list, int index)
 Get a List from the List.
int samp_getIntFromList (List list, int index)
float samp_getFloatFromList (List list, int index)
 Get a Float from the List.


Detailed Description

(Internal) interface to support the List structure.

SAMPLIST.C -- (Internal) interface to support the List structure.

list = samp_newList () samp_freeList (List list)

samp_setStringInList (List list, char *value) samp_setMapInList (List list, Map map) samp_setListInList (List list1, List list2) samp_setIntInList (List list, int val) samp_setFloatInList (List list, float val)

str = samp_getStringFromList (List list, int index) map = samp_getMapFromList (List list, int index) list = samp_getListFromList (List list, int index) ival = samp_getIntFromList (List list, int index) rval = samp_getFloatFromList (List list, int index)

Author:
Mike Fitzpatrick
Date:
7/10/09

Function Documentation

void samp_freeList ( List  list  ) 

Free the given List object.

SAMP_FREELIST -- Free the given List object

Parameters:
list List object handle
Returns:
nothing

Referenced by samp_mapClients().

float samp_getFloatFromList ( List  list,
int  index 
)

Get a Float from the List.

SAMP_GETFLOATFROMLIST -- Get a Float from the List

Parameters:
list List object handle
index List index containing the desired value
Returns:
int value

List samp_getListFromList ( List  list,
int  index 
)

Get a List from the List.

Get an Int from the List.

SAMP_GETLISTFROMLIST -- Get a List from the List

Parameters:
list List object handle
index List index containing the List
Returns:
List handle
SAMP_GETINTFROMLIST -- Get an Int from the List

Parameters:
list List object handle
index List index containing the desired value
Returns:
int value

Map samp_getMapFromList ( List  list,
int  index 
)

Get a Map from the List.

SAMP_GETMAPFROMLIST -- Get a Map from the List

Parameters:
list List object handle
index List index containing the Map
Returns:
Map handle

char* samp_getStringFromList ( List  list,
int  index 
)

Get a string from the List.

SAMP_GETSTRINGFROMLIST -- Get a string from the List

Parameters:
list List object handle
index List index containing the string
Returns:
character string

Referenced by samp_mapClients().

int samp_listLen ( List  list  ) 

Get number of elements in a List.

SAMP_LISTLEN -- Get number of elements in a List.

Parameters:
list List object handle
Returns:
nothing

Referenced by samp_GetRegisteredClients(), samp_GetSubscribedClients(), samp_mapClients(), and samp_tbSelectHandler().

handle_t samp_newList ( void   ) 

Create a new List object.

SAMP_NEWLIST -- Create a new List object

Returns:
handle to List object

Referenced by samp_GetRegisteredClients(), samp_GetSubscribedClients(), and sampInit().

void samp_setFloatInList ( List  list,
float  rval 
)

Set a Float in a List (append).

SAMP_SETFLOATINLIST -- Set a Float in a List (append)

Parameters:
list1 List object handle
rval Float value to be appended
Returns:
nothing

void samp_setIntInList ( List  list,
int  ival 
)

Set an Int in a List (append).

SAMP_SETINTINLIST -- Set an Int in a List (append)

Parameters:
list1 List object handle
ival Integer value to be appended
Returns:
nothing

void samp_setListInList ( List  list1,
List  list2 
)

Set a List in another List (append).

SAMP_SETLISTINLIST -- Set a List in another List (append)

Parameters:
list1 List object handle
list2 List to be appended
Returns:
nothing

void samp_setMapInList ( List  list,
Map  map 
)

Set a Map in a List (append).

SAMP_SETMAPINLIST -- Set a Map in a List (append)

Parameters:
list List object handle
map Map object to be set
Returns:
nothing

void samp_setStringInList ( List  list,
char *  value 
)

Set a string in a List (append).

SAMP_SETSTRINGINLIST -- Set a string in a List (append)

Parameters:
list List object handle
value string value to set
Returns:
nothing

Referenced by samp_GetRegisteredClients(), and samp_GetSubscribedClients().


Generated on Wed Aug 31 13:23:14 2011 for SAMP Client Library by  doxygen 1.5.9