Back to index

plt-scheme  4.2.1
Public Member Functions | Public Attributes
wxTypeTree Class Reference

#include <TypeTree.h>

Inheritance diagram for wxTypeTree:
Inheritance graph
[legend]
Collaboration diagram for wxTypeTree:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxTypeTree (void)
 ~wxTypeTree (void)
void AddType (WXTYPE t, WXTYPE parent, char *name)
char * GetName (WXTYPE t)
void Put (long value, wxObject *object)
void Put (const char *value, wxObject *object)
wxObjectGet (long value)
wxObjectGet (const char *value)
wxObjectDelete (long key)
wxObjectDelete (const char *key)
int MakeKey (const char *string)
int MakeKey (long val)
void BeginFind (void)
wxNodeNext (void)
void DeleteContents (Bool flag)
void Clear (void)
void install_cleanup ()
voidoperator new (size_t size)
voidoperator new (size_t size, GCPlacement gcp)
voidoperator new (size_t size, void *p)
voidoperator new (size_t size)
voidoperator new (size_t size, GCPlacement gcp)
void operator delete (void *obj)
void operator delete (void *, void *)
void operator delete (void *obj)
voidoperator new[] (size_t size)
voidoperator new[] (size_t size, GCPlacement gcp)
voidoperator new[] (size_t size, void *p)
void operator delete[] (void *obj)
void operator delete[] (void *, void *)

Public Attributes

int n
int current_position
wxNodecurrent_node
wxList ** hash_table
WXTYPE __type
void__gc_external

Detailed Description

Definition at line 60 of file TypeTree.h.


Constructor & Destructor Documentation

Definition at line 109 of file TypeTree.cc.

                           : wxHashTable(wxKEY_INTEGER)
{
  unsigned int i;

  // Define explicit type hierarchy
  for (i = 0; i < wxNumberOf(init_types); i++) {
    AddType(init_types[i].my_type,
           init_types[i].parent_type,
           init_types[i].my_name);
  }
}

Here is the call graph for this function:

Definition at line 121 of file TypeTree.cc.

{
}

Member Function Documentation

void wxTypeTree::AddType ( WXTYPE  t,
WXTYPE  parent,
char *  name 
)

Definition at line 125 of file TypeTree.cc.

{
    wxTypeDef *typ;
    typ = DEBUG_NEW wxTypeDef;
    typ->type   = type;
    typ->parent = parent;
    typ->name   = copystring(name);
    Put((long)type, (wxObject*)typ);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxHashTable::BeginFind ( void  ) [inherited]

Definition at line 187 of file wb_hash.cxx.

Here is the caller graph for this function:

void wxHashTable::Clear ( void  ) [inherited]

Definition at line 232 of file wb_hash.cxx.

{
  int i;
  for (i = 0; i < n; i++) {
    if (hash_table[i])  {
      wxList *l;
      l = hash_table[i];
      l->Clear();
    }
  }
}

Here is the call graph for this function:

wxObject * wxHashTable::Delete ( long  key) [inherited]

Definition at line 126 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key), wxKEY_INTEGER, FALSE);

  if (l) {
    wxNode *node;
    node = l->Find(key);
    if (node) {
      wxObject *data;
      data = node->Data();
      l->DeleteNode(node);
      return data;
    }
  }
  return NULL;
}

Here is the call graph for this function:

wxObject * wxHashTable::Delete ( const char *  key) [inherited]

Definition at line 145 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key), wxKEY_STRING, FALSE);

  if (l) {
    wxNode *node;
    node = l->Find(key);
    if (node) {
      wxObject *data;
      data = node->Data();
      l->DeleteNode(node);
      return data;
    }
  }

  return NULL;
}

Here is the call graph for this function:

void wxHashTable::DeleteContents ( Bool  flag) [inherited]

Definition at line 220 of file wb_hash.cxx.

{
  int i;
  for (i = 0; i < n; i++) {
    if (hash_table[i]) {
      wxList *l;
      l = hash_table[i];
      l->DeleteContents(flag);
    }
  }
}

Here is the call graph for this function:

wxObject * wxHashTable::Get ( long  value) [inherited]

Definition at line 94 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key), wxKEY_INTEGER, FALSE);

  if (l) {
    wxNode *node;
    node = l->Find(key);
    if (node)
      return node->Data();
  }

  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

wxObject * wxHashTable::Get ( const char *  value) [inherited]

Definition at line 110 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key), wxKEY_STRING, FALSE);

  if (l) {
    wxNode *node;
    node = l->Find (key);
    if (node)
      return node->Data();
  }

  return NULL;
}

Here is the call graph for this function:

char* wxTypeTree::GetName ( WXTYPE  t) [inline]

Definition at line 66 of file TypeTree.h.

{ return wxGetTypeName(t); }

Here is the call graph for this function:

Definition at line 99 of file wxGC.cxx.

{
  GC_finalization_proc old_fn;
  void *old_data;

# ifdef MZ_PRECISE_GC
#  define ALLOW_NON_BASE 0
#  define CHECK_BASE 0
# else
#  ifdef wx_xt
#   define ALLOW_NON_BASE 0
#   define CHECK_BASE 0
#  else
#   ifdef WIN32
#    define ALLOW_NON_BASE 0
#    define CHECK_BASE 1
#    define CRASH_ON_NONBASE 1
#   else
#    define ALLOW_NON_BASE 1
#    define CHECK_BASE 0
#   endif
#  endif
# endif

# if CHECK_BASE || ALLOW_NON_BASE
  if (GC_base(this) != (void *)this) {
#  if ALLOW_NON_BASE
    return;
#  else
#   ifdef CRASH_ON_NONBASE
    *(long *)0x0 = 1;
#   else
    printf("Clean-up object is not the base object\n");
    abort();
#   endif
#  endif
  }
# endif

  GC_register_finalizer_ignore_self(gcOBJ_TO_PTR(this), 
                                CAST_GCP GC_cleanup, NULL, 
                                CAST_GCPP &old_fn, &old_data);

# if CHECK_BASE
  if (old_fn) {
#  ifdef CRASH_ON_NONBASE
       *(long *)0x0 = 1;
#  else
    printf("Object already has a clean-up\n");
    abort();
#  endif
  }
# endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

int wxHashTable::MakeKey ( const char *  string) [inherited]

Definition at line 165 of file wb_hash.cxx.

{
  long int_key = 0;

  while (*string) {
    int_key += (unsigned char) *string++;
  }

  if (int_key < 0)
    int_key = -int_key;

  return int_key % n;
}

Here is the caller graph for this function:

int wxHashTable::MakeKey ( long  val) [inherited]

Definition at line 179 of file wb_hash.cxx.

{
  if (int_key < 0)
    int_key = -int_key;

  return int_key % n;
}
wxNode * wxHashTable::Next ( void  ) [inherited]

Definition at line 193 of file wb_hash.cxx.

{
  wxNode *found = NULL;
  Bool end = FALSE;
  while (!end && !found) {
    if (!current_node) {
      current_position++;
      if (current_position >= n) {
       current_position = -1;
       current_node = NULL;
       end = TRUE;
      } else {
       wxList *l;
       l = hash_table[current_position];
       if (l) {
         current_node = l->First();
         found = current_node;
       }
      }
    } else {
      current_node = current_node->Next ();
      found = current_node;
    }
  }
  return found;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gc::operator delete ( void obj) [inline, inherited]
void gc::operator delete ( void obj) [inline, inherited]

Definition at line 287 of file gc_cpp.h.

                                           {
    GC_FREE( obj );}

Here is the caller graph for this function:

void gc::operator delete ( void ,
void  
) [inline, inherited]

Definition at line 291 of file gc_cpp.h.

{}
void gc::operator delete[] ( void obj) [inline, inherited]

Definition at line 305 of file gc_cpp.h.

                                             {
    gc::operator delete( obj );}

Here is the call graph for this function:

void gc::operator delete[] ( void ,
void  
) [inline, inherited]

Definition at line 309 of file gc_cpp.h.

{}
void* gc::operator new ( size_t  size) [inline, inherited]
void* gc::operator new ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]
void * gc::operator new ( size_t  size) [inline, inherited]

Definition at line 273 of file gc_cpp.h.

                                           {
    return GC_MALLOC( size );}

Here is the caller graph for this function:

void * gc::operator new ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]

Definition at line 276 of file gc_cpp.h.

                                                            {
    if (gcp == UseGC) 
        return GC_MALLOC( size );
    else if (gcp == PointerFreeGC)
       return GC_MALLOC_ATOMIC( size );
    else
        return GC_MALLOC_UNCOLLECTABLE( size );}
void * gc::operator new ( size_t  size,
void p 
) [inline, inherited]

Definition at line 284 of file gc_cpp.h.

                                                    {
    return p;}
void * gc::operator new[] ( size_t  size) [inline, inherited]

Definition at line 296 of file gc_cpp.h.

                                             {
    return gc::operator new( size );}

Here is the call graph for this function:

void * gc::operator new[] ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]

Definition at line 299 of file gc_cpp.h.

                                                              {
    return gc::operator new( size, gcp );}

Here is the call graph for this function:

void * gc::operator new[] ( size_t  size,
void p 
) [inline, inherited]

Definition at line 302 of file gc_cpp.h.

                                                      {
    return p;}
void wxHashTable::Put ( long  value,
wxObject object 
) [inherited]

Definition at line 76 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key));

  l->Append(key, object);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxHashTable::Put ( const char *  value,
wxObject object 
) [inherited]

Definition at line 85 of file wb_hash.cxx.

{
  wxList *l;

  l = GetList(MakeKey(key), wxKEY_STRING);

  l->Append(key, object);
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 146 of file wxGC.h.

WXTYPE wxObject::__type [inherited]

Definition at line 77 of file Object.h.

Definition at line 42 of file wx_hash.h.

Definition at line 41 of file wx_hash.h.

Definition at line 44 of file wx_hash.h.

int wxHashTable::n [inherited]

Definition at line 40 of file wx_hash.h.


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