Back to index

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

#include <wx_list.h>

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

List of all members.

Public Member Functions

 wxChildList (void)
 ~wxChildList (void)
int Number (void)
void Append (wxObject *object)
Bool DeleteObject (wxObject *object)
Bool DeleteNode (wxChildNode *node)
wxChildNodeFirst (void)
wxChildNodeFindNode (wxChildNode *after)
wxChildNodeNextNode (int &pos)
void Show (wxObject *object, Bool show)
Bool IsShown (wxObject *object)
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 size
wxChildNode ** nodes

Detailed Description

Definition at line 185 of file wx_list.h.


Constructor & Destructor Documentation

Definition at line 523 of file wb_list.cxx.

{
  n = 0;
  size = 0;
  nodes = NULL;
}

Definition at line 530 of file wb_list.cxx.

{
  
}

Member Function Documentation

Definition at line 535 of file wb_list.cxx.

{
  int i;
  wxChildNode *cn, **naya;

  cn = new WXGC_PTRS wxChildNode;

  cn->owner = this;
  cn->strong = object;
  cn->weak = NULL;
  
  for (i = 0; i < size; i++) {
    if (!nodes[i]) {
      nodes[i] = cn;
      n++;
      return;
    }
  }

  size = (size * 2) + 20;
  naya = new WXGC_PTRS wxChildNode* [size];
  for (i = 0; i < n; i++) {
    naya[i] = nodes[i];
  }

  nodes = naya;
  nodes[n++] = cn;
}

Here is the caller graph for this function:

Definition at line 584 of file wb_list.cxx.

{
  int i;

  for (i = 0; i < size; i++) {
    wxChildNode *nodei;
    nodei = nodes[i];
    if (nodei == node) {
      nodei->strong = NULL;
      nodei->weak = NULL;
      nodes[i] = NULL;
      n--;

      return TRUE;
    }
  }

  return FALSE;
}

Definition at line 564 of file wb_list.cxx.

{
  int i;

  for (i = 0; i < size; i++) {
    wxChildNode *node;
    node = nodes[i];
    if (node && (node->Data() == object)) {
      node->strong = NULL;
      node->weak = NULL;
      nodes[i] = NULL;
      n--;

      return TRUE;
    }
  }

  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 604 of file wb_list.cxx.

{
  int i;

  if (after) {
    for (i = 0; i < size; i++) {
      if (nodes[i] == after)
       break;
    }
    i++;
  } else
    i = 0;

  return NextNode(i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 206 of file wx_list.h.

{ return FindNode(NULL); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 687 of file wb_list.cxx.

{
  int i;

  for (i = 0; i < size; i++) {
    wxChildNode *node;
    node = nodes[i];
    if (node && (node->Data() == object)) {
      return (node->strong) ? TRUE : FALSE;
    }
  }

  return FALSE;
}

Here is the call graph for this function:

Definition at line 620 of file wb_list.cxx.

{
  int i;

  for (i = pos; i < size; i++) {
    if (nodes[i]) {
      wxChildNode *node;
      node = nodes[i];
      
      if (node->Data()) {
       pos = i + 1;
       return node;
      }
      /* GC: */
      node->strong = NULL;
      node->weak = NULL;
      nodes[i] = NULL;
      n--;
    }
  }

  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int wxChildList::Number ( void  ) [inline]

Definition at line 198 of file wx_list.h.

{ return n; }

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 wxChildList::Show ( wxObject object,
Bool  show 
)

Definition at line 644 of file wb_list.cxx.

{
  int i;

  for (i = 0; i < size; i++) {
    wxChildNode *node;
    node = nodes[i];
    if (node && (node->Data() == object)) {
      if (show > 0) {
       if (node->strong)
         return;
       node->strong = object;
       node->weak = NULL;
      } else {
#ifdef MZ_PRECISE_GC
       void *weak;
#else
       wxObject **weak;
#endif

       if (node->weak)
         return;

#ifdef MZ_PRECISE_GC
       /* If show < 0, box should be weaker: it should go to NULL when
          object is finalized. But the GC doesn't do that, so instead we
          check for finalization in node->Data(). */
       weak = GC_malloc_weak_box(gcOBJ_TO_PTR(object), NULL, 0);
#else
       weak = new WXGC_ATOMIC wxObject*;
       *weak = object;
       if (show < 0)
         GC_general_register_disappearing_link((void **)weak, object);
#endif

       node->weak = weak;
       node->strong = NULL;
      }
      return;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 191 of file wx_list.h.

Definition at line 193 of file wx_list.h.

Definition at line 192 of file wx_list.h.


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