Public Member Functions |
| BaseStreamHandler () |
| ~BaseStreamHandler () |
virtual PBoolean | Start (Transport *transport=0) |
virtual PBoolean | Stop (const PString &error=PString::Empty()) |
void | SetAutoReconnect (PBoolean b=true, long timeout=1000) |
PNotifierList & | ElementHandlers () |
Stream * | GetStream () |
virtual PBoolean | Write (const void *buf, PINDEX len) |
virtual PBoolean | Write (const PString &data) |
virtual PBoolean | Write (const PXML &pdu) |
virtual void | OnElement (PXML &pdu) |
virtual void | Main () |
| User override function for the main execution routine of the thread.
|
bool | IsAutoDelete () const |
int | PXBlockOnChildTerminate (int pid, const PTimeInterval &timeout) |
int | PXBlockOnIO (int handle, int type, const PTimeInterval &timeout) |
void | PXAbortBlock () const |
void | PrintOn (ostream &strm) const |
| Standard stream print function.
|
| PThread (PINDEX, AutoDeleteFlag deletion=AutoDeleteThread, Priority priorityLevel=NormalPriority, const PString &threadName=PString::Empty()) |
| Create a new thread instance.
|
| ~PThread () |
| Destroy the thread, this simply calls the Terminate() function with all its restrictions and penalties.
|
virtual void | Restart () |
| Restart a terminated thread using the same stack priority etc that was current when the thread terminated.
|
virtual void | Terminate () |
| Terminate the thread.
|
virtual PBoolean | IsTerminated () const |
| Determine if the thread has been terminated or ran to completion.
|
void | WaitForTermination () const |
| Block and wait for the thread to terminate.
|
PBoolean | WaitForTermination (const PTimeInterval &maxWait) const |
| Block and wait for the thread to terminate.
|
virtual void | Suspend (PBoolean susp=true) |
| Suspend or resume the thread.
|
virtual void | Resume () |
| Resume thread execution, this is identical to Suspend(false) .
|
virtual PBoolean | IsSuspended () const |
| Determine if the thread is currently suspended.
|
virtual void | SetPriority (Priority priorityLevel) |
| Set the priority of the thread relative to other threads in the current process.
|
virtual Priority | GetPriority () const |
| Get the current priority of the thread in the current process.
|
virtual void | SetAutoDelete (AutoDeleteFlag deletion=AutoDeleteThread) |
| Set the flag indicating thread object is to be automatically deleted when the thread ends.
|
void | SetNoAutoDelete () |
| Reet the flag indicating thread object is to be automatically deleted when the thread ends.
|
virtual PString | GetThreadName () const |
| Get the name of the thread.
|
virtual void | SetThreadName (const PString &name) |
| Change the name of the thread.
|
virtual PThreadIdentifier | GetThreadId () const |
| Get operating system specific thread identifier for this thread.
|
bool | GetTimes (Times ×) |
| Get the thread execution times.
|
virtual | ~PObject () |
virtual PObject * | Clone () const |
| Create a copy of the class on the heap.
|
virtual PINDEX | HashFunction () const |
| This function yields a hash value required by the PDictionary class.
|
virtual const char * | GetClass (unsigned ancestor=0) const |
| Get the current dynamic type of the object instance.
|
PBoolean | IsClass (const char *cls) const |
virtual PBoolean | InternalIsDescendant (const char *clsName) const |
| Determine if the dynamic type of the current instance is a descendent of the specified class.
|
virtual Comparison | Compare (const PObject &obj) const |
| Compare the two objects and return their relative rank.
|
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
| Determine the byte wise comparison of two objects.
|
bool | operator== (const PObject &obj) const |
| Compare the two objects.
|
bool | operator!= (const PObject &obj) const |
| Compare the two objects.
|
bool | operator< (const PObject &obj) const |
| Compare the two objects.
|
bool | operator> (const PObject &obj) const |
| Compare the two objects.
|
bool | operator<= (const PObject &obj) const |
| Compare the two objects.
|
bool | operator>= (const PObject &obj) const |
| Compare the two objects.
|
virtual void | ReadFrom (istream &strm) |
| Input the contents of the object from the stream.
|
Additional Inherited Members |
enum | Priority {
LowestPriority,
LowPriority,
NormalPriority,
HighPriority,
HighestPriority,
NumPriorities
} |
| Codes for thread priorities. More...
|
enum | AutoDeleteFlag { AutoDeleteThread,
NoAutoDeleteThread
} |
| Codes for thread autodelete flag. More...
|
enum | Comparison { LessThan = -1,
EqualTo = 0,
GreaterThan = 1
} |
| Result of the comparison operation performed by the Compare() function. More...
|
static void | Sleep (const PTimeInterval &delay) |
| Suspend the current thread for the specified amount of time.
|
static PThreadIdentifier | GetCurrentThreadId () |
static PThread * | Current () |
| Get the currently running thread object instance.
|
static void | Yield () |
| Yield to another thread without blocking.
|
static PThread * | Create (const PNotifier ¬ifier, INT parameter=0, AutoDeleteFlag deletion=AutoDeleteThread, Priority priorityLevel=NormalPriority, const PString &threadName=PString::Empty(), PINDEX stackSize=65536) |
| Create a simple thread executing the specified notifier.
|
static PThread * | Create (const PNotifier ¬ifier, const PString &threadName) |
static const char * | Class () |
| Get the name of the class as a C string.
|
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
| Internal function caled from CompareObjectMemoryDirect()
|