class TcGfxPfBackgroundLoader

Background loader class

Inheritance:


Public Classes

class TcGfxLoadRequest
Nested Class TcGfxPfBackgroundLoader::TcGfxLoadRequest
class TcGfxBgLoaderObserver
Nested Class TcGfxLoadRequest::TcGfxBgLoaderObserver.
TcGfxBgLoaderObserver(bool observeClass = false)
Constructor.
virtual ~TcGfxBgLoaderObserver()
Destructor.
virtual int gfxLoadUpdate(const TcGfxPfBackgroundLoader::TcGfxLoadRequest& request)
Clients must inherit from this class and override this function if they wish to be informed when the loader has completed the request
TcGfxLoadRequest()
Constructor
~TcGfxLoadRequest()
Destructor
void setCompName(const TcUtString& name)
Set the name to be set in the pfNode
void setFileName(const TcUtString& name)
Set the file name that the loader will search for in the path set by the PFPATH environment variable
void setParentName(const TcUtString& name)
Set the name of the parent node
const TcUtString& getCompName() const
Returns the component name.
const TcUtString& getFileName() const
Returns the file name.
const TcUtString& getParentName() const
Returns the parent name.
void registerRequest(TcGfxBgLoaderObserver *obs)
Registers the observer and sends the request.
void sendAnonymousRequest()
Sends an anonymous load request with no observer.
bool isAccepted()
Returns true if the the load request has been accepted.
int completeRequest()
Informs observers that the request has been completed.

Public Methods

TcGfxPfBackgroundLoader()
Constructor
~TcGfxPfBackgroundLoader()
Destructor
static void addRequest(TcGfxLoadRequest *req)
Add a request to the request queue.
void initSharedMem()
Initialize shared memory.
void handleRequest()
Handle load requests in the application main process
void setPfScene(pfScene *scene)
Used in initialization to place the scene node pointer into shared memory.
void setPfNav(pfDCS *nav)
Used to place the navigation node pointer into shared memory.
static void backgroundLoadCB(void *data)
This is the callback triggered by the DBASE process.
static pfNode* manualPfLookup(pfGroup *, const TcUtString&)
This performs a manual search for a node in performer when pfLookup fails.

Protected Classes

struct TcGfxPfSharedLoaderData
Nested Structure TcGfxPfBackgroundLoader::TcGfxPfSharedLoaderData

Documentation

Background loader class. This class takes care of asynchronous loading of performer models. It must be properly intialized with the performer library and clients must inherit from the nested observer class to complete load requests. The classes are nested to avoid having to declare everything in the public interface or declare each class as a friend.
class TcGfxLoadRequest
Nested Class TcGfxPfBackgroundLoader::TcGfxLoadRequest. This class is used internally by the TcGfxLoadRequestPtr and should not be instantiated by clients. Calls to operator-> sent to the TcGfxLoadRequestPtr class are redirected here.

class TcGfxBgLoaderObserver
Nested Class TcGfxLoadRequest::TcGfxBgLoaderObserver.

TcGfxBgLoaderObserver(bool observeClass = false)
Constructor.

virtual ~TcGfxBgLoaderObserver()
Destructor.

virtual int gfxLoadUpdate(const TcGfxPfBackgroundLoader::TcGfxLoadRequest& request)
Clients must inherit from this class and override this function if they wish to be informed when the loader has completed the request

TcGfxLoadRequest()
Constructor

~TcGfxLoadRequest()
Destructor

void setCompName(const TcUtString& name)
Set the name to be set in the pfNode. This will be the same name given to the TcGfxComponent.

void setFileName(const TcUtString& name)
Set the file name that the loader will search for in the path set by the PFPATH environment variable

void setParentName(const TcUtString& name)
Set the name of the parent node. This node must already exisit in the performer hierarchy prior to sending an ASYNC load request.

const TcUtString& getCompName() const
Returns the component name.

const TcUtString& getFileName() const
Returns the file name.

const TcUtString& getParentName() const
Returns the parent name.

void registerRequest(TcGfxBgLoaderObserver *obs)
Registers the observer and sends the request.

void sendAnonymousRequest()
Sends an anonymous load request with no observer.

bool isAccepted()
Returns true if the the load request has been accepted.

int completeRequest()
Informs observers that the request has been completed.

TcGfxPfBackgroundLoader()
Constructor

~TcGfxPfBackgroundLoader()
Destructor

static void addRequest(TcGfxLoadRequest *req)
Add a request to the request queue.

void initSharedMem()
Initialize shared memory.

void handleRequest()
Handle load requests in the application main process. This method completes processing of handled request and sends a new request to the background DBASE process.

void setPfScene(pfScene *scene)
Used in initialization to place the scene node pointer into shared memory.

void setPfNav(pfDCS *nav)
Used to place the navigation node pointer into shared memory.

static void backgroundLoadCB(void *data)
This is the callback triggered by the DBASE process.

static pfNode* manualPfLookup(pfGroup *, const TcUtString&)
This performs a manual search for a node in performer when pfLookup fails.

struct TcGfxPfSharedLoaderData
Nested Structure TcGfxPfBackgroundLoader::TcGfxPfSharedLoaderData


Direct child classes:
TdGfxPfObject

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de