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

Objects of this class have additional functions for comfortable user interaction. For example the undo- management is more easy usable, also the connection to the user interface can be done more automatic. More...

Inheritance diagram for jm::EditableObject:
jm::Object

Public Member Functions

 EditableObject (Document *doc)
 Default constructor.
 
virtual void regenerate ()
 Determines that the visual representation should be renewed for this object in the next run.
 
virtual void regenerationDone ()
 This method should be called by the regeneration method after the visual representation of this object has been updated.
 
virtual bool shouldRegenerate () const
 Returns the regeneration status.
 
Documentdocument () const
 Returns the document this object belongs to.
 
virtual Status setMember (String *pointer, const String &value)
 The method set the value to the member the pointer references.
 
virtual Status setMember (int64 *pointer, int64 value, int64 rangeMin=INT64_MIN, int64 rangeMax=INT64_MAX)
 The method set the value to the member the pointer references.
 
virtual Status setMember (double *pointer, double value)
 The method set the value to the member the pointer references.
 
virtual Status setMember (bool *pointer, bool value)
 
virtual Status setMember (uint8 *pointer, uint8 value)
 
virtual Status setMember (int16 *pointer, int16 value)
 
virtual Status setMember (size_t *pointer, size_t value)
 
virtual Status setMember (Vertex2 *pointer, const Vertex2 &value)
 
virtual Status setMember (Vertex3 *pointer, const Vertex3 &value)
 
Status openTransaction ()
 Begins an editing transaction;.
 
Status closeTransaction ()
 Closes an transaction;.
 
- Public Member Functions inherited from jm::Object
 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

Objects of this class have additional functions for comfortable user interaction. For example the undo- management is more easy usable, also the connection to the user interface can be done more automatic.

Constructor & Destructor Documentation

◆ EditableObject()

jm::EditableObject::EditableObject ( Document doc)
explicit

Default constructor.

Parameters
docThe document, this object belongs to.

Member Function Documentation

◆ closeTransaction()

Status jm::EditableObject::closeTransaction ( )

Closes an transaction;.

◆ document()

Document * jm::EditableObject::document ( ) const

Returns the document this object belongs to.

◆ openTransaction()

Status jm::EditableObject::openTransaction ( )

Begins an editing transaction;.

◆ regenerate()

virtual void jm::EditableObject::regenerate ( )
virtual

Determines that the visual representation should be renewed for this object in the next run.

◆ regenerationDone()

virtual void jm::EditableObject::regenerationDone ( )
virtual

This method should be called by the regeneration method after the visual representation of this object has been updated.

◆ setMember() [1/9]

virtual Status jm::EditableObject::setMember ( bool *  pointer,
bool  value 
)
virtual

◆ setMember() [2/9]

virtual Status jm::EditableObject::setMember ( double *  pointer,
double  value 
)
virtual

The method set the value to the member the pointer references.

The pointer must point to a member which is part of this or derived object. Here also the Undo-Manager is called for registering the change.

Parameters
pointerThe pointer to the double member.
valueThe new value for the member.
Returns
jm::Status::eInvalidInput if value is NaN, jm::Status::eOK if value is equal to current value if set successfully.

◆ setMember() [3/9]

virtual Status jm::EditableObject::setMember ( int16 *  pointer,
int16  value 
)
virtual

◆ setMember() [4/9]

virtual Status jm::EditableObject::setMember ( int64 *  pointer,
int64  value,
int64  rangeMin = INT64_MIN,
int64  rangeMax = INT64_MAX 
)
virtual

The method set the value to the member the pointer references.

The pointer must point to a member which is part of this or derived object. Here also the Undo-Manager is called for registering the change.

With the range values, a specified range for the input can be defined. For example, if you set rangeMin to 0, this method only accept positive numbers.

Parameters
pointerThe pointer to the Integer member.
valueThe new value for the member.
rangeMinMinimum valid value. Default is INT64_MIN
rangeMaxMaximum valid value. Default is INT64_MAX
Returns
jm::Status::eOK on success ur if value is equal to current value and jm::Status::eInvalidInput, if value is out of range.

◆ setMember() [5/9]

virtual Status jm::EditableObject::setMember ( size_t *  pointer,
size_t  value 
)
virtual

◆ setMember() [6/9]

virtual Status jm::EditableObject::setMember ( String pointer,
const String value 
)
virtual

The method set the value to the member the pointer references.

The pointer must point to a member which is part of this or derived object. Here also the Undo-Manager is called for registering the change.

Parameters
pointerThe pointer to the String member.
valueThe new value for the member.
Returns
jm::Status::eOK on success or if value is equal to current value.

◆ setMember() [7/9]

virtual Status jm::EditableObject::setMember ( uint8 *  pointer,
uint8  value 
)
virtual

◆ setMember() [8/9]

virtual Status jm::EditableObject::setMember ( Vertex2 pointer,
const Vertex2 value 
)
virtual

◆ setMember() [9/9]

virtual Status jm::EditableObject::setMember ( Vertex3 pointer,
const Vertex3 value 
)
virtual

◆ shouldRegenerate()

virtual bool jm::EditableObject::shouldRegenerate ( ) const
virtual

Returns the regeneration status.