dont use struct for C++ class defs

This commit is contained in:
Jeff Hill
2001-02-22 19:52:09 +00:00
parent aca1c5f76e
commit 3fa13a1d8f
8 changed files with 236 additions and 188 deletions

View File

@@ -0,0 +1,78 @@
/*
* $Id$
*
* Author Jeffrey O. Hill
* johill@lanl.gov
* 505 665 1831
*
* Experimental Physics and Industrial Control System (EPICS)
*
* Copyright 1991, the Regents of the University of California,
* and the University of Chicago Board of Governors.
*
* This software was produced under U.S. Government contracts:
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
* and (W-31-109-ENG-38) at Argonne National Laboratory.
*
* Initial development by:
* The Controls and Automation Group (AT-8)
* Ground Test Accelerator
* Accelerator Technology Division
* Los Alamos National Laboratory
*
* Co-developed with
* The Controls and Computing Group
* Accelerator Systems Division
* Advanced Photon Source
* Argonne National Laboratory
*
*/
#define epicsExportSharedSymbols
#include "timerPrivate.h"
tsFreeList < class timerQueuePassive, 0x8 > timerQueuePassive::freeList;
epicsTimerQueuePassive::~epicsTimerQueuePassive () {}
epicsTimerQueuePassive &epicsTimerQueuePassive::create ( epicsTimerQueueNotify &notify )
{
timerQueuePassive *pQueue = new timerQueuePassive ( notify );
if ( ! pQueue ) {
throwWithLocation ( timer::noMemory () );
}
return *pQueue;
}
timerQueuePassive::timerQueuePassive ( epicsTimerQueueNotify &notifyIn ) :
queue ( notifyIn ) {}
timerQueuePassive::~timerQueuePassive () {}
epicsTimer & timerQueuePassive::createTimer ( epicsTimerNotify & notifyIn )
{
timer *pTmr = new timer ( notifyIn, this->queue );
if ( ! pTmr ) {
throwWithLocation ( timer::noMemory () );
}
return *pTmr;
}
void timerQueuePassive::process ()
{
this->queue.process ();
}
double timerQueuePassive::getNextExpireDelay () const
{
return this->queue.delayToFirstExpire ();
}
void timerQueuePassive::show ( unsigned int level ) const
{
printf ( "EPICS non-threaded timer queue at %p\n",
static_cast <const void *> ( this ) );
if ( level >=1u ) {
this->queue.show ( level - 1u );
}
}