LibreOffice
LibreOffice 5.0 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
salhelper::Thread Class Referenceabstract

A safe encapsulation of osl::Thread. More...

#include <thread.hxx>

Inheritance diagram for salhelper::Thread:
salhelper::SimpleReferenceObject osl::Thread

Public Member Functions

 Thread (char const *name)
 
void launch ()
 Launch the thread. More...
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static void * operator new (std::size_t size)
 
static void operator delete (void *pointer)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 see general class documentation More...
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 see general class documentation More...
 
static void operator delete (void *pPtr)
 see general class documentation More...
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 see general class documentation More...
 

Protected Member Functions

virtual ~Thread ()
 
virtual void execute ()=0
 The main function executed by the thread. More...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject ()
 

Additional Inherited Members

- Private Member Functions inherited from osl::Thread
 Thread ()
 
bool create ()
 
bool createSuspended ()
 
virtual void suspend ()
 
virtual void resume ()
 
virtual void terminate ()
 
virtual void join ()
 
bool isRunning () const
 
void setPriority (oslThreadPriority Priority)
 
oslThreadPriority getPriority () const
 
oslThreadIdentifier getIdentifier () const
 
virtual bool schedule ()
 
 operator oslThread () const
 
- Static Private Member Functions inherited from osl::Thread
static void * operator new (size_t nSize)
 
static void operator delete (void *pMem)
 
static void * operator new (size_t, void *pMem)
 
static void operator delete (void *, void *)
 
static oslThreadIdentifier getCurrentIdentifier ()
 
static void wait (const TimeValue &Delay)
 
static void yield ()
 
static void setName (char const *name) throw ()
 

Detailed Description

A safe encapsulation of osl::Thread.

Since
LibreOffice 3.6

Constructor & Destructor Documentation

salhelper::Thread::Thread ( char const *  name)
Parameters
namethe thread name, see osl_setThreadName; must be a non-null null terminated string
virtual salhelper::Thread::~Thread ( )
protectedvirtual

Reimplemented from osl::Thread.

Member Function Documentation

virtual void salhelper::Thread::execute ( )
protectedpure virtual

The main function executed by the thread.

Any uncaught exceptions lead to std::terminate.

void salhelper::Thread::launch ( )

Launch the thread.

This function must be called at most once.

Each call of this function should eventually be followed by a call to osl::Thread::join before exit(3), to ensure the thread is no longer relying on any infrastructure while that infrastructure is being shut down in atexit handlers.

static void salhelper::Thread::operator delete ( void *  pointer)
inlinestatic
static void* salhelper::Thread::operator new ( std::size_t  size)
inlinestatic

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