- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UObject Class Reference

This is the base class for all dynamic UFO objects. More...

#include <uobject.hpp>

Inheritance diagram for ufo::UObject:

ufo::UCollectable ufo::UButtonGroup ufo::UCaret ufo::UColorObject ufo::UContext ufo::UContextGroup ufo::UCss ufo::UDimensionObject ufo::UDisplay ufo::UDocument ufo::UDocumentFactory ufo::UDrawable ufo::UEvent ufo::UFileArchive ufo::UFocusManager ufo::UFont ufo::UFontMetrics ufo::UGraphics ufo::UIcon ufo::UImageFilter ufo::UImageIO ufo::UInputMap ufo::UInsetsObject ufo::UInteger ufo::UItem ufo::UKeyStroke ufo::ULayoutManager ufo::UMenuManager ufo::UPalette ufo::UPluginBase ufo::UPointObject ufo::UPopup ufo::UPopupManager ufo::UProperties ufo::UProperties::Reader ufo::URectangleObject ufo::URepaintManager ufo::USharedLib ufo::UString ufo::UStyle ufo::UStyleManager ufo::UTextLayout ufo::UToolkit ufo::UValidator ufo::UVertexArray ufo::UVideoDevice ufo::UVideoDriver ufo::UVolatileData ufo::UWidget ufo::UXFrame ufo::UXul List of all members.

Public Member Functions

 UObject (const UObject &)
virtual unsigned int hashCode () const
virtual bool equals (const UObject *obj) const
bool operator== (const UObject &obj) const
virtual UObjectclone () const
virtual std::string toString () const
const std::string & getName () const
void setName (const std::string &newNameA)
unsigned int objCount ()
UCollectabletrackPointer (UCollectable *c)
const UCollectabletrackPointer (const UCollectable *c)
bool releasePointer (UCollectable *c)
bool releasePointer (const UCollectable *c)
void swapPointers (const UCollectable *oldObj, const UCollectable *newObj)
void releaseAllPointers ()
USignal1< UObject * > & sigDestroyed ()

Protected Member Functions

virtual std::ostream & paramString (std::ostream &os) const

Friends

std::ostream & operator<< (std::ostream &os, const UObject &o)
std::ostream & operator<< (std::ostream &os, const UObject *o)

Detailed Description

This is the base class for all dynamic UFO objects.

Author:
Johannes Schmidt


Member Function Documentation

virtual UObject* ufo::UObject::clone  )  const [virtual]
 

tries to make a new object with the same internal data.

Reimplemented in ufo::UColorObject, ufo::UDimensionObject, ufo::UInsetsObject, ufo::UInteger, ufo::UPointObject, ufo::URectangleObject, and ufo::UString.

virtual bool ufo::UObject::equals const UObject obj  )  const [virtual]
 

checks if this object is the same object than obj

Reimplemented in ufo::UKeyStroke, ufo::UInteger, and ufo::UString.

virtual unsigned int ufo::UObject::hashCode  )  const [virtual]
 

returns a std::size_t which is used when UObject pointers are the keys for UHashMap. If equals(UObject*) returns true, these two objects should return the same hash code. If these objects are different, the hash code may be equal.

Returns:
a hash code.

Reimplemented in ufo::UKeyStroke, ufo::UColorObject, ufo::UDimensionObject, ufo::UInsetsObject, ufo::UPointObject, ufo::URectangleObject, and ufo::UString.

unsigned int ufo::UObject::objCount  ) 
 

This method is only for debugging purposes and may be removed without warning.

Returns:
The number of allocated UObject objects.

virtual std::ostream& ufo::UObject::paramString std::ostream &  os  )  const [protected, virtual]
 

Prints some useful internal data to the ostream os. This method is meant only for debugging purposes.

Reimplemented in ufo::UActionEvent, ufo::UEvent, ufo::UFocusEvent, ufo::UInputEvent, ufo::UKeyEvent, ufo::UMouseEvent, ufo::UMouseWheelEvent, ufo::UPropertyChangeEvent, ufo::UImageIO, ufo::UColorObject, ufo::UDimensionObject, ufo::UInsetsObject, ufo::UInteger, ufo::UPalette, ufo::UPointObject, ufo::URectangleObject, ufo::UString, ufo::UCompound, ufo::UStringItem, ufo::UMenu, and ufo::UWidget.

void ufo::UObject::releaseAllPointers  ) 
 

Removes all pointers from the memory tracking list and decreases their reference count by one.

bool ufo::UObject::releasePointer const UCollectable c  ) 
 

Removes the first occurence of c from the memory tracking list and decreases its reference count by 1.

See also:
trackPointer
Parameters:
c The pointer this widget should remove from its memory tracking list. May be NULL.
Returns:
true on success.

bool ufo::UObject::releasePointer UCollectable c  ) 
 

Removes the first occurence of c from the memory tracking list and decreases its reference count by 1.

See also:
trackPointer
Parameters:
c The pointer this widget should remove from its memory tracking list. May be NULL.
Returns:
true on success.

void ufo::UObject::setName const std::string &  newNameA  )  [inline]
 

For debuggin purposes

USignal1< UObject * > & ufo::UObject::sigDestroyed  )  [inline]
 

This signal is fired immediately before this object is destroyed Please note that all information about subclass features is already destroyed.

void ufo::UObject::swapPointers const UCollectable oldObj,
const UCollectable newObj
 

If oldObj does not point to newObj, calls releasePointer with oldObj abd trackPointer with newObj. Both may be NULL.

virtual std::string ufo::UObject::toString  )  const [virtual]
 

std::string representation

Reimplemented in ufo::UKeyStroke, ufo::UInteger, and ufo::UString.

const UCollectable* ufo::UObject::trackPointer const UCollectable c  ) 
 

Increases the reference count of c by 1 and adds c to the internal memory tracking list. Does nothing if c is NULL. You may call trackPointer several times with the same pointer as argument.

See also:
releasePointer
Parameters:
c The pointer this widget should track. May be NULL.
Returns:
The added object or NULL on failure.

UCollectable* ufo::UObject::trackPointer UCollectable c  ) 
 

Increases the reference count of c by 1 and adds c to the internal memory tracking list. Does nothing if c is NULL. You may call trackPointer several times with the same pointer as argument.

See also:
releasePointer
Parameters:
c The pointer this widget should track. May be NULL.
Returns:
The added object or NULL on failure.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const UObject o
[friend]
 

operator to print object data to output streams

std::ostream& operator<< std::ostream &  os,
const UObject o
[friend]
 

operator to print object data to output streams


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt