Back to index

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

#include <Timer.h>

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

List of all members.

Public Member Functions

 wxTimer (void *ctx=NULL)
 ~wxTimer (void)
void SetContext (void *ctx)
int Interval (void)
Bool Start (int millisec=-1, Bool one_shot=FALSE)
void Stop (void)
virtual void Notify (void)
void Dequeue (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 interval
Bool one_shot
double expiration
wxTimernext
wxTimerprev
voidcontext
WXTYPE __type
void__gc_external

Detailed Description

Definition at line 34 of file Timer.h.


Constructor & Destructor Documentation

wxTimer::wxTimer ( void ctx = NULL)

Definition at line 1778 of file mred.cxx.

 : wxObject(WXGC_NO_CLEANUP)
#endif
{
  __type = wxTYPE_TIMER;

  next = prev = NULL;

  if (!ctx)
    ctx = (void *)MrEdGetContext();

  context = ctx;
}

Here is the call graph for this function:

Definition at line 1793 of file mred.cxx.

{
}

Member Function Documentation

Definition at line 1855 of file mred.cxx.

{
  if (!prev) {
    if (((MrEdContext *)context)->timers == this) {
      ((MrEdContext *)context)->timers = next;
      if (!next)
        scheme_hash_set(timer_contexts, (Scheme_Object *)context, NULL);
    }
  }

  if (prev)
    prev->next = next;
  if (next)
    next->prev = prev;

  next = prev = NULL;
}

Here is the caller 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 wxTimer::Interval ( void  ) [inline]

Definition at line 41 of file Timer.h.

{ return interval; };
virtual void wxTimer::Notify ( void  ) [inline, virtual]

Reimplemented in wxXtTimer, and os_wxTimer.

Definition at line 45 of file Timer.h.

{}

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;}

Definition at line 1797 of file mred.cxx.

{
  context = ctx;
}
Bool wxTimer::Start ( int  millisec = -1,
Bool  one_shot = FALSE 
)

Reimplemented in wxXtTimer.

Definition at line 1802 of file mred.cxx.

{
  double now;

  if (prev || next || (((MrEdContext *)context)->timers == this))
    return FALSE;

  if (((MrEdContext *)context)->killed)
    scheme_signal_error("start in timer%%: the current eventspace has been shutdown");
  
  interval = millisec;
  if (interval <= 0)
    interval = 1;
  one_shot = !!_one_shot;

  now = scheme_get_inexact_milliseconds();
  expiration = now + interval;

  if (((MrEdContext *)context)->timers) {
    wxTimer *t = ((MrEdContext *)context)->timers;

    while (1) {
      int later;

      later = (expiration >= t->expiration);

      if (!later) {
       prev = t->prev;
       t->prev = this;
       next = t;
       if (prev)
         prev->next = this;
       else
         ((MrEdContext *)context)->timers = this;
       return TRUE;
      }

      if (!t->next) {
       t->next = this;
       prev = t;

       return TRUE;
      }
      t = t->next;
    }
  } else {
    ((MrEdContext *)context)->timers = this;
    scheme_hash_set(timer_contexts, (Scheme_Object *)context, scheme_true);
  }

  return TRUE;
}

Here is the caller graph for this function:

Definition at line 1873 of file mred.cxx.

{
  Dequeue();

  interval = -1;
}

Here is the call graph for this function:

Here is the caller 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 56 of file Timer.h.

Definition at line 54 of file Timer.h.

Definition at line 50 of file Timer.h.

Definition at line 55 of file Timer.h.

Definition at line 51 of file Timer.h.

Definition at line 55 of file Timer.h.


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