dont use struct for C++ class defs
This commit is contained in:
78
src/libCom/timer/timerQueuePassive.cpp
Normal file
78
src/libCom/timer/timerQueuePassive.cpp
Normal 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 ¬ify )
|
||||
{
|
||||
timerQueuePassive *pQueue = new timerQueuePassive ( notify );
|
||||
if ( ! pQueue ) {
|
||||
throwWithLocation ( timer::noMemory () );
|
||||
}
|
||||
return *pQueue;
|
||||
}
|
||||
|
||||
timerQueuePassive::timerQueuePassive ( epicsTimerQueueNotify ¬ifyIn ) :
|
||||
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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user