QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::ObjectBase Struct Reference
[QServer]

Generic reference counted object. More...

#include <Q/q.h>

Inheritance diagram for Q::ObjectBase:

Q::Application Q::BoundsReactor Q::ConceptIterator Q::Database Q::FullTriangleIterator Q::Layer Q::List Q::Object Q::ObjectIterator Q::Playback Q::Query Q::SampleIterator Q::Scope Q::ScopeReactor Q::Screen Q::SpeakerSet Q::TransformIterator Q::TriangleIterator Q::VertexIterator Q::WedgeIterator List of all members.

Public Types

typedef unsigned int Handle
typedef unsigned int ClassType

Public Member Functions

 ObjectBase ()
 ObjectBase (const ObjectBase &o)
 ~ObjectBase ()
ObjectBaseoperator= (const ObjectBase &obj)
bool valid () const
int operator== (const ObjectBase &obj) const
int operator!= (const ObjectBase &obj) const
int operator< (const ObjectBase &obj) const
int operator<= (const ObjectBase &obj) const
Handle handle () const
void setHandle (Handle h)
ClassType type () const

Detailed Description

Generic reference counted object.

Generic object. Provides the machinery for reference counting. The ObjectBase class actually just manages a handle referencing the underlying object.


Member Typedef Documentation

typedef unsigned int Q::ObjectBase::ClassType
 

Q Class Type

typedef unsigned int Q::ObjectBase::Handle
 

Abstracted type for storing the handle id.


Constructor & Destructor Documentation

Q::ObjectBase::ObjectBase  ) 
 

Create a null object reference.

Q::ObjectBase::ObjectBase const ObjectBase o  ) 
 

Create a copy of an existing object reference.

Q::ObjectBase::~ObjectBase  ) 
 

Destroy the object reference. If this is the last reference to the object, the object might be deleted

See also:
Q::Object::~Object.


Member Function Documentation

Handle Q::ObjectBase::handle  )  const
 

Return the value of the underlying object handle.

int Q::ObjectBase::operator!= const ObjectBase obj  )  const
 

Return non-zero if this reference is to a different object than obj.

int Q::ObjectBase::operator< const ObjectBase obj  )  const
 

Return non-zero if this reference is less than the reference obj. This provides an implementation-dependent ordering for object references which can be used to support efficient sorting of references. For instance, this allows object references to be used as keys in searching structures such as Utils::AVLTree<K,V>.

int Q::ObjectBase::operator<= const ObjectBase obj  )  const
 

Return non-zero if this reference is less than or equal to the reference obj.

ObjectBase& Q::ObjectBase::operator= const ObjectBase obj  ) 
 

Change this object reference to one which references the object referenced by obj.

int Q::ObjectBase::operator== const ObjectBase obj  )  const
 

Return non-zero if this reference is to the same object as obj.

void Q::ObjectBase::setHandle Handle  h  ) 
 

Set the underlying object handle to h.

ClassType Q::ObjectBase::type  )  const
 

Return the typecode for the instance of this object if it is valid or zero otherwise.

bool Q::ObjectBase::valid  )  const
 

Return true if this reference is to an existing object, otherwise false. An object reference is invalid if its handle is zero or if the underlying object has been deleted (for instance if Object::destroy was called by someone else).

Reimplemented in Q::ObjectIterator, Q::ConceptIterator, Q::Query, Q::TriangleIterator, Q::VertexIterator, Q::WedgeIterator, Q::SampleIterator, Q::FullTriangleIterator, and Q::TransformIterator.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004