Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Threads - ThreadC
 

  PUBLIC
ThreadC::ThreadC(void)
ThreadC::ThreadC(ThreadBodyC &)
ThreadC::Body(void)
ThreadC::Body(void) const
ThreadC::Execute(void)
ThreadC::Terminate(void)
ThreadC::SetPriority(int)
ThreadC::ID(void) const
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   ThreadC   
 
Thread handle.
 
include "Ravl/Threads/Thread.hh"
Created:02/07/1999 
Source file:Ravl/OS/Threads/Posix/Thread.hh
User Level:Normal
Library:RavlThreads
In Scope:RavlN

Comments:
Note: The thread itself holds a reference count on the object. this reference count is held until the thread terminates. Another thread can initiate shutdown by calling the Terminate() function.

Parent Classes: Derived Classes: Methods:
ThreadC()
Default constructor.
Creates an invalid handle.

ThreadC(ThreadBodyC & bod)
Body constructor.

ThreadBodyC & Body()
Access body.

const ThreadBodyC & Body() const
Access body.

bool Execute()
Start thread running.
use this command to start thread running after it has been created. This function can only be called once.

void Terminate()
Terminate thread.
Call to stop the thread running. THEAD SAFE.

bool SetPriority(int pri)
Set the priority of the process 0 to 32767, Higher faster. THEAD SAFE.

UIntT ID() const
Get a unique ID for this thread. NB. An id may no be assigned to the thread until after Execute() has been called. THEAD SAFE.

#include "Ravl/RefCounter.hh"
const RCHandleC<ThreadBodyC> & operator =(const RCHandleC<ThreadBodyC> & oth)
Assign handle.

RCHandleC<ThreadBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<ThreadBodyC> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<ThreadBodyC> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

ThreadBodyC & Body()
Access body of object.

const ThreadBodyC & Body() const
Constant access to body of object.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<ThreadBodyC> & obj)

istream & operator >>(istream & strm,RCHandleC<ThreadBodyC> & obj)


Maintainer:Charles Galambos, Created: 02/07/1999, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002