Back to index

im-sdk  12.3.91
Classes | Public Member Functions | Private Member Functions | Private Attributes
symbol_mapper Class Reference

#include <IMAuth.hh>

Collaboration diagram for symbol_mapper:
Collaboration graph

List of all members.


struct  sym

Public Member Functions

void set_symbol_value (const char *sn, const char *val)
char * get_symbol_value (const char *sn)
 symbol_mapper ()
 ~symbol_mapper ()

Private Member Functions

void expand_psym_slot (int aSize)

Private Attributes

int alloced_size
int size

Detailed Description

Definition at line 49 of file IMAuth.hh.

Class Documentation

struct symbol_mapper::sym

Definition at line 52 of file IMAuth.hh.

Class Members
char * symname
char * value

Constructor & Destructor Documentation

Definition at line 87 of file IMAuth.hh.

       size = 0;
       alloced_size = 10;
       psym = (sym*) malloc(sizeof(sym) * alloced_size);

Definition at line 93 of file IMAuth.hh.

       int i;
       for (i = 0;i < size;i++) {
           if (psym[i].symname) free(psym[i].symname);
           if (psym[i].value) free(psym[i].value);

Member Function Documentation

void symbol_mapper::expand_psym_slot ( int  aSize) [inline, private]

Definition at line 59 of file IMAuth.hh.

       psym = (sym*) realloc(psym, sizeof(sym) * aSize);
       alloced_size = aSize;

Here is the caller graph for this function:

char* symbol_mapper::get_symbol_value ( const char *  sn) [inline]

Definition at line 79 of file IMAuth.hh.

       int i;
       for (i = 0;i < size;i++)
           if (!strcmp(sn, psym[i].symname))
              return psym[i].value;
       return NULL;

Here is the caller graph for this function:

void symbol_mapper::set_symbol_value ( const char *  sn,
const char *  val 
) [inline]

Definition at line 68 of file IMAuth.hh.

       if (size >= alloced_size)
           expand_psym_slot(size * 2);
       psym[size].symname = strdup(sn);
       psym[size].value = strdup(val);

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 56 of file IMAuth.hh.

Definition at line 58 of file IMAuth.hh.

int symbol_mapper::size [private]

Definition at line 57 of file IMAuth.hh.

The documentation for this class was generated from the following file: