nakedmudv3.6/
nakedmudv3.6/lib/
nakedmudv3.6/lib/help/A/
nakedmudv3.6/lib/help/B/
nakedmudv3.6/lib/help/C/
nakedmudv3.6/lib/help/D/
nakedmudv3.6/lib/help/G/
nakedmudv3.6/lib/help/H/
nakedmudv3.6/lib/help/J/
nakedmudv3.6/lib/help/L/
nakedmudv3.6/lib/help/M/
nakedmudv3.6/lib/help/O/
nakedmudv3.6/lib/help/P/
nakedmudv3.6/lib/help/R/
nakedmudv3.6/lib/help/S/
nakedmudv3.6/lib/help/W/
nakedmudv3.6/lib/logs/
nakedmudv3.6/lib/misc/
nakedmudv3.6/lib/players/
nakedmudv3.6/lib/txt/
nakedmudv3.6/lib/world/
nakedmudv3.6/lib/world/examples/
nakedmudv3.6/lib/world/examples/mproto/
nakedmudv3.6/lib/world/examples/oproto/
nakedmudv3.6/lib/world/examples/reset/
nakedmudv3.6/lib/world/examples/rproto/
nakedmudv3.6/lib/world/examples/trigger/
nakedmudv3.6/lib/world/limbo/
nakedmudv3.6/lib/world/limbo/room/
nakedmudv3.6/lib/world/limbo/rproto/
nakedmudv3.6/src/alias/
nakedmudv3.6/src/dyn_vars/
nakedmudv3.6/src/editor/
nakedmudv3.6/src/example_module/
nakedmudv3.6/src/help2/
nakedmudv3.6/src/set_val/
nakedmudv3.6/src/socials/
nakedmudv3.6/src/time/
#ifndef __DYN_VARS_H
#define __DYN_VARS_H
//*****************************************************************************
//
// dyn_vars.c
//
// This module allows key/value pairs to be dynamically created on characters,
// objects, and rooms. Values can be strings, integers, or doubles. If a value
// is called for in the wrong type (e.g. you're trying to get a string as an 
// integer) the module will automagically handle the conversion. Variable types
// default to ints.
//
//*****************************************************************************

//
// This must be put at the top of mud.h so the rest of the MUD knows that
// we've got the alias module installed
// #define MODULE_DYN_VARS
//


// the different types of data we can store
#define DYN_VAR_STRING        0
#define DYN_VAR_INT           1
#define DYN_VAR_LONG          2
#define DYN_VAR_DOUBLE        3



//
// prepare dyn_vars for use
//
void         init_dyn_vars   (void);

int          charGetVarType   (CHAR_DATA *ch, const char *key);
int          charGetInt       (CHAR_DATA *ch, const char *key);
long         charGetLong      (CHAR_DATA *ch, const char *key);
double       charGetDouble    (CHAR_DATA *ch, const char *key);
const char  *charGetString    (CHAR_DATA *ch, const char *key);
void         charSetInt       (CHAR_DATA *ch, const char *key, int val);
void         charSetLong      (CHAR_DATA *ch, const char *key, long val);
void         charSetDouble    (CHAR_DATA *ch, const char *key, double val);
void         charSetString    (CHAR_DATA *ch, const char *key, const char *val);
bool         charHasVar       (CHAR_DATA *ch, const char *key);
void         charDeleteVar    (CHAR_DATA *ch, const char *key);

int          objGetVarType   (OBJ_DATA *ch, const char *key);
int          objGetInt       (OBJ_DATA *ch, const char *key);
long         objGetLong      (OBJ_DATA *ch, const char *key);
double       objGetDouble    (OBJ_DATA *ch, const char *key);
const char  *objGetString    (OBJ_DATA *ch, const char *key);
void         objSetInt       (OBJ_DATA *ch, const char *key, int val);
void         objSetLong      (OBJ_DATA *ch, const char *key, long val);
void         objSetDouble    (OBJ_DATA *ch, const char *key, double val);
void         objSetString    (OBJ_DATA *ch, const char *key, const char *val);
bool         objHasVar       (OBJ_DATA *ch, const char *key);
void         objDeleteVar    (OBJ_DATA *ch, const char *key);

int          roomGetVarType   (ROOM_DATA *ch, const char *key);
int          roomGetInt       (ROOM_DATA *ch, const char *key);
long         roomGetLong      (ROOM_DATA *ch, const char *key);
double       roomGetDouble    (ROOM_DATA *ch, const char *key);
const char  *roomGetString    (ROOM_DATA *ch, const char *key);
void         roomSetInt       (ROOM_DATA *ch, const char *key, int val);
void         roomSetLong      (ROOM_DATA *ch, const char *key, long val);
void         roomSetDouble    (ROOM_DATA *ch, const char *key, double val);
void         roomSetString    (ROOM_DATA *ch, const char *key, const char *val);
bool         roomHasVar       (ROOM_DATA *ch, const char *key);
void         roomDeleteVar    (ROOM_DATA *ch, const char *key);

#endif // __DYN_VARS_H