Archon::X3D::Loader::Job Struct Reference

This class represents one request for a set of alternative URIs. More...

#include <archon/x3d/server/load.H>

Inheritance diagram for Archon::X3D::Loader::Job:

Inheritance graph
[legend]
Collaboration diagram for Archon::X3D::Loader::Job:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Job (Ref< Loader >, Uri baseUri, const vector< string > &uriList, UriType uriType, Ref< AbstractFileServer > fileServer=0)
virtual ~Job ()
bool isCompleted ()
 Return true if this job is completed either successfully or with failiure.
void wait ()
 Wait for this job to complete either successfully or with failiure.
void kill ()
 Send a termination request to this job.
Ref< const ContentsgetContents ()
 Returns null if the job is not completet yet or if it failed to load anything.

Protected Member Functions

virtual void onCompletion ()
 Called by the loading thread to indicate completion.

Detailed Description

This class represents one request for a set of alternative URIs.

You must instantiate it yourself and submit the objects through Loader::submitJob. Note that it is a reference counted object, and thus should primarily be refered to with Ref<Loader> references. You may use the class "as is" or derive it if you want to receive completion notification.

Note that protected derivation is required because RefObjectBase is a virtual base class of Utilities::Job, meaning that classes derived from Loader::Job need to be able to access the constructor of Utilities::Job.

See also:
Loader::onCompletion

Definition at line 193 of file load.H.


Constructor & Destructor Documentation

Archon::X3D::Loader::Job::Job Ref< Loader ,
Uri  baseUri,
const vector< string > &  uriList,
UriType  uriType,
Ref< AbstractFileServer fileServer = 0
 

Parameters:
fileServer If not null this refers to a server that will handle file-scheme URIs.

Definition at line 79 of file load.C.


Member Function Documentation

Ref< const Loader::Contents > Archon::X3D::Loader::Job::getContents  ) 
 

Returns null if the job is not completet yet or if it failed to load anything.

To determine if the job is still running you must either call 'isCompleted' or 'wait' or override the onCompletion method.

Definition at line 104 of file load.C.

void Archon::X3D::Loader::Job::kill  ) 
 

Send a termination request to this job.

It does not wait for the thread to terminate though.

Definition at line 98 of file load.C.

virtual void Archon::X3D::Loader::Job::onCompletion  )  [inline, protected, virtual]
 

Called by the loading thread to indicate completion.

Override this one if you want to receive the notification.

Definition at line 236 of file load.H.


The documentation for this struct was generated from the following files:
Generated on Sun Jul 30 23:00:28 2006 for Archon by  doxygen 1.4.4