VizKit  3.3.7
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
VizKit::VisualObject Class Reference

Basic abstract object data type of core objects. More...

#include <VisualObject.h>

Inheritance diagram for VizKit::VisualObject:
VizKit::VisualAnimationComponent VizKit::VisualAsset VizKit::VisualFile VizKit::VisualImage VizKit::VisualNotification VizKit::VisualString VizKit::VisualStringStyle VizKit::VisualTextAutoScrollView

List of all members.

Public Member Functions

 VisualObject ()
 The constructor.
 VisualObject (const VisualItemIdentifier &anIdentifier)
 Another constructor.
virtual ~VisualObject ()
 The destructor.
 VisualObject (const VisualObject &other)
 Copy constructor.
VisualObjectoperator= (const VisualObject &other)
 Assignment operator.
bool operator< (const VisualObject &other) const
 Less than operator.
bool operator> (const VisualObject &other) const
 Greater than operator.
bool operator== (const VisualObject &other) const
 Equality operator.
bool operator!= (const VisualObject &other) const
 Inequality operator.
virtual VisualObjectclone (void) const =0
 Copies the current VisualObject and returns a pointer to a new VisualObject.
const VisualItemIdentifier getIdentifier (void) const
 Returns the identifier of the object item.
bool addData (void *dataPtr, size_t dataSize)
 Adds data to the object.
void freeData (void)
 Deallocates the data if there has been data allocated.
size_t getDataSizeUsed (void)
 Returns the number of bytes currently used by the internal data buffer.
size_t getDataSizeDeclared (void)
 Returns the declared size in bytes of the object.
void setDataSizeDeclared (const size_t &aDataSizeDeclared)
 Sets the declared size in bytes of the object.
bool dataSizeDeclaredHasBeenSet (void)
 Returns whether the declared data size has been set yet.
VisualObjectDatagetVisualObjectData (void)
 Returns a shared pointer to the visualObjectData.
virtual void dataLoadDidEnd (const VisualItemIdentifier &identifier)
 Notification that the loading of data ended.

Protected Member Functions

bool hasData (void)
 Answers the question whether the internal data buffer has data available.
char * getData (void)
 Returns a pointer to the internal data buffer.
size_t getDataSize (void)
 Returns the number of bytes of the internal data buffer.

Private Member Functions

void copyObject (const VisualObject &other)
 Copy method for assignment operator and copy constructor.

Private Attributes

VisualObjectDatavisualObjectData
 Pointer to object data.

Detailed Description

Basic abstract object data type of core objects.


Constructor & Destructor Documentation

The constructor.

Another constructor.

Parameters:
anIdentifierIdentifier of the object.

The destructor.

Copy constructor.

Parameters:
otherReference to another VisualObject.

Member Function Documentation

bool VisualObject::addData ( void *  dataPtr,
size_t  dataSize 
)

Adds data to the object.

Parameters:
dataPtrPointer to data.
dataSizeThe number of bytes of the dataPtr.
Returns:
True on success, false on failure.
Remarks:
The data is copied.
virtual VisualObject* VizKit::VisualObject::clone ( void  ) const [pure virtual]
void VisualObject::copyObject ( const VisualObject other) [private]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualObject.
void VisualObject::dataLoadDidEnd ( const VisualItemIdentifier identifier) [virtual]

Notification that the loading of data ended.

Parameters:
identifierThe identifier of the data load request.
Remarks:
Hook method that can be overridden by subclasses of VisualObject for post-processing of received data.

Reimplemented in VizKit::VisualString, and VizKit::VisualImage.

Returns whether the declared data size has been set yet.

Returns:
Boolean flag answers the question whether the declared data size has been set yet.
void VisualObject::freeData ( void  )

Deallocates the data if there has been data allocated.

char * VisualObject::getData ( void  ) [protected]

Returns a pointer to the internal data buffer.

Returns:
A pointer to the internal data buffer.
size_t VisualObject::getDataSize ( void  ) [protected]

Returns the number of bytes of the internal data buffer.

Returns:
The number of bytes of the internal data buffer.

Returns the declared size in bytes of the object.

Returns:
The declared size in bytes of the object.
Remarks:
The size can be declared by a remote header file before the actual data has been fetched.
size_t VisualObject::getDataSizeUsed ( void  )

Returns the number of bytes currently used by the internal data buffer.

Returns:
The number of bytes currently used by the internal data buffer.

Returns the identifier of the object item.

Returns:
The identifier of the object item.

Returns a shared pointer to the visualObjectData.

Returns:
A shared pointer to the visualObjectData.
Remarks:
The caller has to call release() on the visualObjectData pointer after use.
bool VisualObject::hasData ( void  ) [protected]

Answers the question whether the internal data buffer has data available.

Returns:
True if the internal data buffer has data available, false otherwise.
bool VisualObject::operator!= ( const VisualObject other) const

Inequality operator.

Parameters:
otherAnother VisualObject.
bool VisualObject::operator< ( const VisualObject other) const

Less than operator.

Parameters:
otherAnother VisualObject.
Remarks:
The less than operator is used by std::map for find() and sorting (if VisualObject is used as key_type).
VisualObject & VisualObject::operator= ( const VisualObject other)

Assignment operator.

Parameters:
otherReference to another VisualObject.
bool VisualObject::operator== ( const VisualObject other) const

Equality operator.

Parameters:
otherAnother VisualObject.
bool VisualObject::operator> ( const VisualObject other) const

Greater than operator.

Parameters:
otherAnother VisualObject.
Remarks:
The less than operator is used by std::map for find() and sorting (if VisualObject is used as key_type).
void VisualObject::setDataSizeDeclared ( const size_t &  aDataSizeDeclared)

Sets the declared size in bytes of the object.

Parameters:
aDataSizeDeclaredThe number of bytes declared.
Remarks:
The size can be declared by a remote header file before the actual data has been fetched.

Member Data Documentation

Pointer to object data.


The documentation for this class was generated from the following files:

Generated on Sun May 3 2015 20:26:32 for VizKit by doxygen 1.8.0