DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Concurrency::Runnable Class Referenceabstract

Public Types

enum  State {
  StateStarting, StateRunning, StateStopping, StateDead,
  StateUnknown
}
 

Public Member Functions

 Runnable (void)
 
virtual ~Runnable (void)
 
void start (void)
 
void stop (void)
 
void join (void)
 
void stopAndJoin (void)
 
void setPriority (Scheduler::Policy policy, unsigned priority)
 
unsigned getPriority (void)
 
State getState (void)
 
bool isCreated (void)
 
bool isStopping (void)
 
bool isRunning (void)
 
bool isStarting (void)
 
bool isDead (void)
 

Protected Member Functions

virtual void run (void)=0
 
virtual void startImpl (void)=0
 
virtual void stopImpl (void)=0
 
virtual void joinImpl (void)=0
 
virtual void setStateImpl (State value)=0
 
virtual State getStateImpl (void)=0
 
virtual void setPriorityImpl (Scheduler::Policy policy, unsigned priority)=0
 
virtual unsigned getPriorityImpl (void)=0
 

Member Enumeration Documentation

Enumerator
StateStarting 
StateRunning 
StateStopping 
StateDead 
StateUnknown 

Constructor & Destructor Documentation

DUNE::Concurrency::Runnable::Runnable ( void  )
inline
virtual DUNE::Concurrency::Runnable::~Runnable ( void  )
inlinevirtual

Member Function Documentation

unsigned DUNE::Concurrency::Runnable::getPriority ( void  )
inline

References getPriorityImpl().

virtual unsigned DUNE::Concurrency::Runnable::getPriorityImpl ( void  )
protectedpure virtual

Implemented in DUNE::Concurrency::Thread.

Referenced by getPriority().

State DUNE::Concurrency::Runnable::getState ( void  )
inline

References getStateImpl().

Referenced by isDead(), isRunning(), isStarting(), and isStopping().

virtual State DUNE::Concurrency::Runnable::getStateImpl ( void  )
protectedpure virtual

Referenced by getState().

bool DUNE::Concurrency::Runnable::isCreated ( void  )
inline
bool DUNE::Concurrency::Runnable::isDead ( void  )
inline

References getState(), and StateDead.

bool DUNE::Concurrency::Runnable::isRunning ( void  )
inline
bool DUNE::Concurrency::Runnable::isStarting ( void  )
inline

References getState(), and StateStarting.

bool DUNE::Concurrency::Runnable::isStopping ( void  )
inline
void DUNE::Concurrency::Runnable::join ( void  )
inline

References joinImpl().

Referenced by stopAndJoin().

virtual void DUNE::Concurrency::Runnable::joinImpl ( void  )
protectedpure virtual

Implemented in DUNE::Concurrency::Thread.

Referenced by join().

virtual void DUNE::Concurrency::Runnable::run ( void  )
protectedpure virtual
void DUNE::Concurrency::Runnable::setPriority ( Scheduler::Policy  policy,
unsigned  priority 
)
inline

References setPriorityImpl().

virtual void DUNE::Concurrency::Runnable::setPriorityImpl ( Scheduler::Policy  policy,
unsigned  priority 
)
protectedpure virtual

Implemented in DUNE::Concurrency::Thread.

Referenced by setPriority().

virtual void DUNE::Concurrency::Runnable::setStateImpl ( State  value)
protectedpure virtual
void DUNE::Concurrency::Runnable::start ( void  )
inline
virtual void DUNE::Concurrency::Runnable::startImpl ( void  )
protectedpure virtual

Implemented in DUNE::Concurrency::Thread.

Referenced by start().

void DUNE::Concurrency::Runnable::stop ( void  )
inline

References stopImpl().

Referenced by DUNE::Daemon::consume(), and stopAndJoin().

void DUNE::Concurrency::Runnable::stopAndJoin ( void  )
inline

References join(), and stop().

Referenced by Transports::FTP::Task::onResourceRelease().

virtual void DUNE::Concurrency::Runnable::stopImpl ( void  )
protectedpure virtual

Implemented in DUNE::Concurrency::Thread.

Referenced by stop().

Collaboration diagram for DUNE::Concurrency::Runnable:
Collaboration graph