#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "samp.h"
Functions | |
handle_t | samp_newMap () |
Create a new Map object. | |
void | samp_freeMap (Map map) |
Free the given Map object. | |
int | samp_getMapSize (Map map) |
char * | samp_getMapKey (Map map, int index) |
char * | samp_getMapVal (Map map, int index) |
void | samp_setStringInMap (Map map, char *key, char *value) |
Set a string in a Map (append). | |
void | samp_setMapInMap (Map map1, char *key, Map map2) |
Set a Map in a Map (append). | |
void | samp_setListInMap (Map map, char *key, List list) |
Set a List in a Map (append). | |
void | samp_setIntInMap (Map map, char *key, int value) |
Set a Int in a Map (append). | |
void | samp_setFloatInMap (Map map, char *key, float value) |
Set a string in a Map (append). | |
char * | samp_getStringFromMap (Map map, char *key) |
Get a string from the Map. | |
Map | samp_getMapFromMap (Map map, char *key) |
Get a Map from the Map. | |
List | samp_getListFromMap (Map map, char *key) |
Get a LIST from the Map. | |
int | samp_getIntFromMap (Map map, char *key) |
Get a integer from the Map. | |
float | samp_getFloatFromMap (Map map, char *key) |
Get a float from the Map. |
SAMPMAP.C -- (Internal) Interface to support the Map structure
map = samp_newMap () samp_freeMap (Map map)
nelem = samp_getMapSize (Map map) key = samp_getMapKey (Map map, int index) val = samp_getMapVal (Map map, int index)
samp_setStringInMap (Map map, char *value) samp_setMapInMap (Map map1, Map map2) samp_setListInMap (Map map, List list) samp_setIntInMap (Map map, int ival) samp_setFloatInMap (Map map, float rval)
str = samp_getStringFromMap (Map map, char *key) map = samp_getMapFromMap (Map map, char *key) list = samp_getListFromMap (Map map, char *key) ival = samp_getIntFromMap (Map map, char *key) rval = samp_getFloatFromMap (Map map, char *key)
void samp_freeMap | ( | Map | map | ) |
Free the given Map object.
SAMP_FREEMAP -- Free the given Map object
map | Map object to free |
Referenced by samp_envGetHandler(), samp_hubDeclareSubscriptions(), samp_paramGetHandler(), and samp_Ping().
float samp_getFloatFromMap | ( | Map | map, | |
char * | key | |||
) |
Get a float from the Map.
SAMP_GETFLOATFROMMAP -- Get a float from the Map
map | handle to Map object | |
key | Map key |
Referenced by samp_execUserHandler(), and samp_pointAtHandler().
int samp_getIntFromMap | ( | Map | map, | |
char * | key | |||
) |
Get a integer from the Map.
SAMP_GETINTFROMMAP -- Get a integer from the Map
map | handle to Map object | |
key | Map key |
Referenced by samp_execUserHandler(), and samp_tbHighlightHandler().
Get a LIST from the Map.
SAMP_GETLISTFROMMAP -- Get a LIST from the Map
map | handle to Map object | |
key | Map key |
Referenced by samp_execUserHandler(), and samp_tbSelectHandler().
Get a Map from the Map.
SAMP_GETMAPFROMMAP -- Get a Map from the Map
map | handle to Map object | |
key | Map key |
Referenced by samp_execUserHandler(), samp_resConeHandler(), samp_resLoadHandler(), samp_resSiapHandler(), samp_resSsapHandler(), samp_resTapHandler(), samp_resVOSpaceHandler(), samp_specLoadHandler(), and samp_specSSAHandler().
char* samp_getStringFromMap | ( | Map | map, | |
char * | key | |||
) |
Get a string from the Map.
SAMP_GETSTRINGFROMMAP -- Get a string from the Map
map | handle to Map object | |
key | Map key |
Referenced by samp_bibcodeHandler(), samp_cmdExecHandler(), samp_envGetHandler(), samp_envSetHandler(), samp_execUserHandler(), samp_imLoadHandler(), samp_paramGetHandler(), samp_paramSetHandler(), samp_resConeHandler(), samp_resLoadHandler(), samp_resSiapHandler(), samp_resSsapHandler(), samp_resTapHandler(), samp_resVOSpaceHandler(), samp_specLoadHandler(), samp_specSSAHandler(), samp_tbHighlightHandler(), samp_tbLoadFITSHandler(), samp_tbLoadHandler(), samp_tbLoadVOTHandler(), and samp_tbSelectHandler().
handle_t samp_newMap | ( | void | ) |
Create a new Map object.
SAMP_NEWMAP -- Create a new Map object
Referenced by samp_envGetHandler(), samp_getNullMap(), samp_getOKMap(), samp_paramGetHandler(), and sampInit().
void samp_setFloatInMap | ( | Map | map, | |
char * | key, | |||
float | value | |||
) |
Set a string in a Map (append).
SAMP_SETFLOATINMAP -- Set a Float in a Map (append)
map | handle to Map object | |
key | Map key | |
value | value |
void samp_setIntInMap | ( | Map | map, | |
char * | key, | |||
int | value | |||
) |
Set a Int in a Map (append).
SAMP_SETINTINMAP -- Set a Int in a Map (append)
map | handle to Map object | |
key | Map key | |
value | value |
Set a List in a Map (append).
SAMP_SETLISTINMAP -- Set a List in a Map (append)
map | handle to Map object | |
key | Map key | |
list | handle to List object to set |
Set a Map in a Map (append).
SAMP_SETMAPINMAP -- Set a Map in a Map (append)
map1 | handle to Map object | |
key | Map key | |
map2 | handle to Map object to set |
Referenced by samp_envGetHandler(), samp_getOKMap(), samp_paramGetHandler(), and sampInit().
void samp_setStringInMap | ( | Map | map, | |
char * | key, | |||
char * | value | |||
) |
Set a string in a Map (append).
SAMP_SETSTRINGINMAP -- Set a string in a Map (append)
map | handle to Map object | |
key | Map key | |
value | Map value |
Referenced by samp_envGetHandler(), samp_getOKMap(), samp_paramGetHandler(), and sampInit().