All Classes Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
Glympse::IComparable Struct Referenceabstract

The IComparable interface is introduced to provide additional mechanizm of content-oriented objects comparison, which does not conflict with language-specific one (Object.equals in Java and Object.Equals in C#). More...

#include <IComparable.h>

Inheritance diagram for Glympse::IComparable:
Inheritance graph
[legend]

Public Member Functions

virtual bool isEqual (const GCommon &o)=0
 Compares this instance with the specified object and indicates if they are equal. More...
 
- Public Member Functions inherited from Glympse::ICommon
virtual int32 retain ()=0
 Add a reference to our object in a COM-like way.
 
virtual int32 release ()=0
 Release a reference to our object in a COM-like way.
 
virtual int32 hold ()=0
 Add a reference to our object in a COM-like way.
 
virtual int32 unhold ()=0
 Release a reference to our object in a COM-like way.
 
virtual int32 hashCode ()=0
 Returns an integer hash code for this object.
 
virtual bool equals (const GCommonObj &o)=0
 Compares this instance with the specified object and indicates if they are equal. More...
 
virtual GString toString ()=0
 Returns a string containing a concise, human-readable description of this object. More...
 
virtual void attachObject (const GCommon &obj)=0
 Asociates arbitrary object with the instance.
 
virtual GCommon extractObject ()=0
 Extracts associated object or NULL if no association is established.
 

Additional Inherited Members

- Protected Member Functions inherited from Glympse::ICommon
virtual ~ICommon ()
 Destructor is protected to deny explicit object deallocation. More...
 

Detailed Description

The IComparable interface is introduced to provide additional mechanizm of content-oriented objects comparison, which does not conflict with language-specific one (Object.equals in Java and Object.Equals in C#).

Member Function Documentation

virtual bool Glympse::IComparable::isEqual ( const GCommon o)
pure virtual

Compares this instance with the specified object and indicates if they are equal.

In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than NULL is equal to NULL.

Parameters
oThe object to compare this instance with.
Returns
Returns true if the specified object is equal to this object; false otherwise.

The documentation for this struct was generated from the following file: