PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBThread
Wrapper Class for the IThread interface.
#include <SFBThread.h.hpp>
class SFBThread : public SFBRscPool;
SFMTYPEDEFWRAPPER(SFBThread)

Inheritance diagram

 Inheritance diagram of SFBThreadClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X O O O

Reference

BREW API IThread

Member

Public Functions
SFCError Exit( SInt32 retValue )
Exit the SFBThread execution.
Void Free( VoidPtr ptr )
De-associate a memory pointer with the lifetime of a SFBThread and frees it.
SFXCallbackPtr GetResumeCBK( Void )
Return an initialized SFXCallback for resumption of the thread.
SInt32 HoldRsc( SFBBaseSmp resource )
Associate a generic SFBBase pointer with the lifetime of a thread.
Void Join( SFXCallbackPtr callback , SInt32Ptr retVal )
Schedule a callback to fire when the SFBThread execution ends.
VoidPtr Malloc( UInt32 size )
Allocates memory and associate it with the SFBThread.
static
SFBThreadSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBThread instance.
static
SFBThreadSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBThread instance.
UInt32 ReleaseRsc( SFBBaseSmp resource )
De-associate a generic SFBBase pointer with the lifetime of a SFBThread, and release the SFBBase.
SFCError Start( SInt32 size , PFNTHREAD notify , VoidPtr data )
Start the SFBThread execution.
SFCError Stop( Void )
Stop the SFBThread execution.
Void Suspend( Void )
Suspend the SFBThread execution.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBThread::Exit
Exit the SFBThread execution.
[ public ]
SFCError Exit(
    SInt32 retValue   // return value of SFBThread
);

Reference

BREW API ITHREAD_Exit


SFBThread::Free
De-associate a memory pointer with the lifetime of a SFBThread and frees it.
[ public ]
Void Free(
    VoidPtr ptr   // pointer to free 
);

Reference

BREW API ITHREAD_Free


SFBThread::GetResumeCBK
Return an initialized SFXCallback for resumption of the thread.
[ public ]
SFXCallbackPtr GetResumeCBK(Void);

Reference

BREW API ITHREAD_GetResumeCBK


SFBThread::HoldRsc
Associate a generic SFBBase pointer with the lifetime of a thread.
[ public ]
SInt32 HoldRsc(
    SFBBaseSmp resource   // SFBBase interface to associate
);

Reference

BREW API ITHREAD_HoldRsc


SFBThread::Join
Schedule a callback to fire when the SFBThread execution ends.
[ public ]
Void Join(
    SFXCallbackPtr callback   // where to call when the thread is done 
    SInt32Ptr retVal          // pointer to be filled with the SFBThread's return value 
);

Reference

BREW API ITHREAD_Join


SFBThread::Malloc
Allocates memory and associate it with the SFBThread.
[ public ]
VoidPtr Malloc(
    UInt32 size   // number of bytes to allocate
);

Reference

BREW API ITHREAD_Malloc


SFBThread::NewInstance
Create a new SFBThread instance.
[ public, static ]
SFBThreadSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBThreadSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBThread::ReleaseRsc
De-associate a generic SFBBase pointer with the lifetime of a SFBThread, and release the SFBBase.
[ public ]
UInt32 ReleaseRsc(
    SFBBaseSmp resource   // SFBBase interface to free
);

Reference

BREW API ITHREAD_ReleaseRsc


SFBThread::Start
Start the SFBThread execution.
[ public ]
SFCError Start(
    SInt32 size        // number of bytes to allocate for the SFBThread's stack 
    PFNTHREAD notify   // the SFBThread start function, what is called when the SFBThread begins execution
    VoidPtr data       // the argument to the notify
);

Reference

BREW API ITHREAD_Start


SFBThread::Stop
Stop the SFBThread execution.
[ public ]
SFCError Stop(Void);

Reference

BREW API ITHREAD_Stop


SFBThread::Suspend
Suspend the SFBThread execution.
[ public ]
Void Suspend(Void);

Reference

BREW API ITHREAD_Suspend