Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::Object Class Reference

Most objects are derived from this class. This makes it possible to simplify the API, as object pointers can passed and not just void*. More...

Inheritance diagram for jm::Object:
jm::Array< T > jm::Array< T * > jm::AutoreleasePool jm::ByteArray jm::Charset jm::CharsetDecoder jm::DateFormatter jm::Deflater jm::Document jm::EditableObject jm::Exception jm::FloatArray jm::Hashtable jm::Inflater jm::LListElement jm::LinkedList jm::Nurbs jm::PaintingBackend jm::SAXAttributes jm::SAXParser jm::Stream jm::String jm::StringList jm::StringTokenizer jm::Test jm::Thread jm::URI jm::UndoManager jm::XMLWriter jm::ZipEntry jm::ZipFile jm::ZipOutputFile

Public Member Functions

 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Detailed Description

Most objects are derived from this class. This makes it possible to simplify the API, as object pointers can passed and not just void*.

Constructor & Destructor Documentation

◆ Object()

jm::Object::Object ( )
noexcept

Constructor.

◆ ~Object()

virtual jm::Object::~Object ( )
virtualnoexcept

Destructor.

Member Function Documentation

◆ autorelease()

Object * jm::Object::autorelease ( )
noexcept

Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.

Returns
Reference to this object.

◆ displayName()

virtual String jm::Object::displayName ( ) const
virtual

Returns the display name of the object intended to present to a user.

This method should be implemented by objects that want to present the name of the object to the user of an application. For example the diff-algorithm uses this or also the dwg objects.

Reimplemented in jm::LListElement, and jm::LinkedList.

◆ equals()

virtual bool jm::Object::equals ( const Object other) const
virtual

Comparison of objects.

Parameters
otherThe object to compare with.

Reimplemented in jm::String.

◆ highBit()

bool jm::Object::highBit ( ) const
noexcept

◆ printDiffInfo()

virtual void jm::Object::printDiffInfo ( DiffOperation  operation,
Object other 
) const
virtual

Output method for outputting the diff results for the diff algorithm.

Parameters
operationThe calculated diff operation.
otherThe object to compare with.

◆ referenceCount()

int32 jm::Object::referenceCount ( ) const
noexcept

Returns the value of the reference counter.

◆ release()

void jm::Object::release ( )
noexcept

Decreases the reference counter and releases the object immediately when the reference counter becomes 0.

◆ retain()

Object * jm::Object::retain ( )
noexcept

Increases the reference counter of this object by 1.

Note
An object is automatically released when the reference counter becomes 0.
Returns
Reference to this object.

◆ setHighBit()

void jm::Object::setHighBit ( bool  status)
noexcept