OpenLexocad  28.0
Core::SharedObject Class Referenceabstract

The SharedObject is an interface that must be implemented by all classes that want to share their resources when copied within the same document. More...

#include <SharedObject.h>

Public Member Functions

virtual ~SharedObject ()=default
 

Protected Member Functions

virtual Core::DocObjectcopyShared (Core::CoreDocument *toDoc, DocObjectMap &copyMap)=0
 

Friends

class CoreDocument
 

Detailed Description

The SharedObject is an interface that must be implemented by all classes that want to share their resources when copied within the same document.

Derived classes must implement the 'copyShared()' method. These objects are treated differently in

See also
Core::CoreDocument::copyObject(). The standard implementation is:
{
if (getDocument() == toDoc) return this;
else return App::LxObject::copy(toDoc, copyMap);
}
Since
26.0

Constructor & Destructor Documentation

◆ ~SharedObject()

virtual Core::SharedObject::~SharedObject ( )
virtualdefault

Member Function Documentation

◆ copyShared()

virtual Core::DocObject* Core::SharedObject::copyShared ( Core::CoreDocument toDoc,
DocObjectMap copyMap 
)
protectedpure virtual

Friends And Related Function Documentation

◆ CoreDocument

friend class CoreDocument
friend

The documentation for this class was generated from the following file:
Core::CoreDocument
Definition: CoreDocument.h:269
Core::DocObjectMap
std::map< Core::DocObject *, Core::DocObject * > DocObjectMap
Definition: DocObject.h:50
DocObjectMap
Core::DocObjectMap DocObjectMap
Definition: Property.h:254
Core::DocObject
Definition: DocObject.h:54
Core::SharedObject::copyShared
virtual Core::DocObject * copyShared(Core::CoreDocument *toDoc, DocObjectMap &copyMap)=0