OpenLexocad  28.0
Core::CoreDocument Class Reference

#include <CoreDocument.h>

Inheritance diagram for Core::CoreDocument:
Core::PropertyContainer Base::Subject< Core::DocChanges > Base::Persistence Base::BaseClass

Public Types

enum  Status {
  SkipRecompute = 0, KeepTrailingDigits = 1, Closable = 2, Restoring = 3,
  Recomputing = 4, PartialRestore = 5, Importing = 6, PartialDoc = 7,
  AllowPartialRecompute = 8, TempDoc = 9, RestoreError = 10
}
 
- Public Types inherited from Base::Subject< Core::DocChanges >
typedef Observer< Core::DocChangesObserverType
 
typedef Core::DocChanges MessageType
 
typedef Subject< Core::DocChangesSubjectType
 

Public Member Functions

int getDocumentVersion () const
 Returns the version of the document. More...
 
bool addObject (Core::DocObject *e)
 Adds an existing object to the document. More...
 
void removeObject (Core::DocObject *e)
 Removes an object from the document. More...
 
virtual void removeObjectFinal (Core::DocObject *e, bool deep=false)
 Removes an object from the document. More...
 
void removeObjects (const std::vector< Core::DocObject * > &objects)
 Removes objects from the document. More...
 
virtual void onFileOpened ()
 Is called when the file was opened, but before the message FileOpened gets emitted. Can be overwritten to add custom behavior. More...
 
void onBeforeChangeProperty (const Core::DocObject *Who, const Property *What)
 callback from the Document objects before property will be changed More...
 
void onChangedProperty (const Core::DocObject *Who, const Property *What)
 callback from the Document objects after property was changed More...
 
virtual bool onChangedDebug (Core::DocObject *o, Core::Property *p)
 
Base::Type getCopyType () const
 
void clearCopyType ()
 Sets the copy type to Base::Type::badType(), next copied object will be copied as its own type. More...
 
Core::DocObjectcopyObject (Core::DocObject *o, DocObjectMap &copyMap)
 Creates a copy of 'o' and adds it to the document, provides map of pairs original-copy to see which object is a copy of another one. More...
 
Core::DocObjectcopyObject (Core::DocObject *o)
 
Core::DocObjectcopyToDifferentType (Core::DocObject *o, Base::Type typeToCreate, DocObjectMap &copyMap)
 Creates an object of type 'typeToCreate' and copy properties from 'o' to it. Provides map of pairs original-copy. More...
 
Core::DocObjectcopySharedObject (Core::DocObject *o, DocObjectMap &copyMap)
 Copy shared object. This is violating of the share, but in some cases this is useful. Use wisely!! More...
 
template<typename Type >
Type copyObjectShallow (Type o)
 Creates a copy of 'o' and adds it to the document. Performs shallow copy. More...
 
std::vector< Core::DocObject * > getObjects (bool includeDeletedObjects=false) const
 Returns all objects in the document. More...
 
std::vector< const Core::DocObject * > getObjectsConst (bool includeDeletedObjects=false) const
 
virtual std::vector< Core::DocObject * > getObjectsSorted () const
 Returns all objects topologically sorted. More...
 
Core::DocObjectcreateObjectFromTypeName (const char *typeName)
 Creates an object from type name and adds it to the document. More...
 
Core::DocObjectcreateObjectFromType (Base::Type type)
 Creates an object from type and adds it to the document. More...
 
std::vector< Core::DocObject * > getObjectsByTypeName (const std::string &typeName) const
 Returns all objects of typeName. More...
 
virtual void recompute ()
 Recomputes the document. More...
 
virtual void recompute (std::function< void(DOCOBJECTS newObj, DOCOBJECTS updatedObj, DOCOBJECTS deletedObj, DOCOBJECTS_ERROR_MAP errorObj)> onRecomputedCB)
 
virtual bool saveAs (const Base::String &filename)
 Saves the document under this name*. More...
 
Base::String getTmpDirectory ()
 Returns the temporary directory. More...
 
bool isActive () const
 Returns 'true' if the Document is the active Document. Otherwise returns 'false'. More...
 
virtual bool isChanged ()
 Returns 'true' if the document is changed. More...
 
Core::DocObjectgetObjectByGlobalId (const Base::GlobalId &guid) const
 Returns the DocObject with this GUID. More...
 
std::string getDocXMLAsString ()
 
bool testStatusBits (Status pos) const
 return the status bits More...
 
void setStatusBits (Status pos, bool on)
 set the status bits More...
 
methods for the UNDO REDO and Transaction handling

Introduce a new concept of transaction ID. Each transaction must be unique inside the document. Multiple transactions from different documents can be grouped together with the same transaction ID.

When undo, Gui component can query getAvailableUndo(id) to see if it is possible to undo with a given ID. If there more than one undo transactions, meaning that there are other transactions before the given ID. The Gui component shall ask user if he wants to undo multiple steps. And if the user agrees, call undo(id) to unroll all transaction before and including the the one with the give ID. Same applies for redo.

The new transaction ID describe here is fully backward compatible. Calling the APIs with a default id=0 gives the original behavior.

void setUndoMode (int iMode)
 switch the level of Undo/Redo More...
 
int getUndoMode (void) const
 switch the level of Undo/Redo More...
 
void setTransactionMode (int iMode)
 switch the transaction mode More...
 
int openTransaction (const char *name=0)
 
void renameTransaction (const char *name, int id)
 Rename the current transaction if the id matches. More...
 
void commitTransaction ()
 Commit the Command transaction. Do nothing If there is no Command transaction open. More...
 
void abortTransaction ()
 Abort the actually running transaction. More...
 
bool hasPendingTransaction () const
 Check if a transaction is open. More...
 
const char * getPendingTransactionName () const
 Returns pending transaction name. Returns nullptr if there is no pending transaction. More...
 
int getTransactionID (bool undo, unsigned pos=0) const
 Return the undo/redo transaction ID starting from the back. More...
 
bool isTransactionEmpty () const
 
void setUndoLimit (unsigned int UndoMemSize=0)
 Set the Undo limit in Byte! More...
 
void setMaxUndoStackSize (unsigned int UndoMaxStackSize=20)
 Set the Undo limit as stack size. More...
 
unsigned int getMaxUndoStackSize (void) const
 Set the Undo limit as stack size. More...
 
void clearUndos ()
 Remove all stored Undos and Redos. More...
 
int getAvailableUndos (int id=0) const
 Returns the number of stored Undos. If greater than 0 Undo will be effective. More...
 
std::vector< std::string > getAvailableUndoNames () const
 Returns a list of the Undo names. More...
 
bool undo (int id=0)
 Will UNDO one step, returns False if no undo was done (Undos == 0). More...
 
int getAvailableRedos (int id=0) const
 Returns the number of stored Redos. If greater than 0 Redo will be effective. More...
 
std::vector< std::string > getAvailableRedoNames () const
 Returns a list of the Redo names. More...
 
bool redo (int id=0)
 Will REDO one step, returns False if no redo was done (Redos == 0). More...
 
bool isPerformingTransaction () const
 returns true if the document is in an Transaction phase, e.g. currently performing a redo/undo or rollback More...
 
virtual Core::DocObjectgetObjectById (const DocObject::IdType &id) const
 Returns the object with this id. More...
 
Core::DocObjectgetObjectByUserName (const Base::String &s) const
 Returns the object with this userName. More...
 
void setRecommendFileNameForSave (const Base::String &s)
 
virtual void emitAndNotify (Core::DocChanges &aDocChanges)
 
- Public Member Functions inherited from Core::PropertyContainer
 PropertyContainer (void)
 
 PropertyContainer (const PropertyContainer &rhs)
 
virtual ~PropertyContainer (void)=default
 
bool addProperty (Core::Property *p, const std::string &name)
 
Core::PropertyaddProperty (Base::Type t, const std::string &name, const Core::Variant &defaultValue)
 Adds a property to the PropertyContainer. Returns the added property on success, '0' on failure. More...
 
Core::PropertyUseraddPropertyUser (const std::string &name, const Core::Variant &value)
 Convenience method for Python bindings. More...
 
void removeProperty (Core::Property *p, std::string pName)
 Removes a property from the PropertyContainer and deletes it. More...
 
void removeAllProperties ()
 Removes all properties from the PropertyContainer and deletes them. More...
 
Core::PropertygetPropertyByName (const std::string &name) const
 Returns the property with name 'name'. Returns '0' on failure. More...
 
Core::PropertygetPropertyByName (const Base::String &name) const
 Returns the property with name 'name'. Returns '0' on failure. More...
 
virtual const char * getPropertyName (const Property *prop) const
 get the name of a property More...
 
template<typename T >
T * getPropertyByName (const std::string &name) const
 Returns the property of type T with name 'name'. Returns 'nullptr' on failure. More...
 
void getPropertyMap (Core::PropertyMap &) const
 Fills a PropertyMap. More...
 
std::vector< std::pair< Core::Property *, std::string > > getPropertiesAndNameByType (Base::Type type) const
 Returns all properties of type 'type'. More...
 
std::vector< Core::Property * > getPropertiesByType (Base::Type type) const
 
void getLinkProperties (std::vector< Core::Property * > &properties1, std::vector< Core::Property * > &properties2, std::vector< Core::Property * > &properties3) const
 
void getPropertiesByType (Base::Type type, std::vector< Core::Property * > &props) const
 
std::vector< Core::Property * > getPropertiesByTypes (const std::vector< Base::Type > &type) const
 
bool setPropertyFromVariant (const std::string &name, const Core::Variant &value)
 Sets a property to value. More...
 
bool setProperty (const std::string &name, double value)
 
bool setProperty (const std::string &name, int value)
 
bool setProperty (const std::string &name, const Geom::Vec &value)
 
bool setProperty (const std::string &name, const std::list< Geom::Vec > &value)
 
bool setProperty (const std::string &name, const Geom::Trsf &value)
 
bool setProperty (const std::string &name, const std::string &value)
 
bool setProperty (const std::string &name, const char *value)
 
bool setProperty (const std::string &name, const Base::String &value)
 
bool setProperty (const std::string &name, const Geom::Pnt &value)
 
bool setProperty (const std::string &name, const Geom::Pnt2d &value)
 
bool setProperty (const std::string &name, const std::vector< Geom::Pnt > &value)
 
bool setProperty (const std::string &name, const std::vector< Geom::Pnt2d > &value)
 
bool setProperty (const std::string &name, const MD5 &value)
 
bool setProperty (const std::string &name, bool value)
 
bool setProperty (const std::string &name, Core::DocObject *value)
 
bool setProperty (const std::string &name, const Core::DocObject *value)
 
bool setProperty (const std::string &name, const std::unordered_set< Core::DocObject * > &value)
 
bool setProperty (const std::string &name, const std::list< Core::DocObject * > &value)
 
bool setProperty (const std::string &name, const std::vector< int > &value)
 
bool setProperty (const std::string &name, const QFont &value)
 
bool setProperty (const std::string &name, const Draw::DrawStyle &value)
 
bool setProperty (const std::string &name, const Draw::Arrowheads &value)
 
bool setProperty (const std::string &name, const Geom::Dir &value)
 
bool setProperty (const std::string &name, const Geom::Dir2d &value)
 
bool setProperty (const std::string &name, const Base::Color &value)
 
bool setProperty (const std::string &name, const Geom::Ax1 &value)
 
bool setProperty (const std::string &name, const Geom::Ax2 &value)
 
bool setProperty (const std::string &name, const Draw::Texture2Transform &value)
 
bool setProperty (const std::string &name, const std::list< std::list< Geom::Pnt > > &value)
 
bool setProperty (const std::string &name, const std::vector< double > &value)
 
bool setProperty (const std::string &name, pBrepData &value)
 
virtual bool onBeforeChange (Core::Property *p, const Core::Variant &newValue=Core::Variant())
 
virtual void onChanged (Core::Property *p)
 Is called after a property in a PropertyContainer has been changed. More...
 
virtual void onDeleted ()
 Is called when a PropertyContainer's status is set to MarkedForDelete. More...
 
virtual void onNew ()
 Is called when a PropertyContainer's status is set to New. More...
 
virtual void onPropertyStatusBitsChanged (const Property &, unsigned long)
 Is called when the Property StatusBits are changed. More...
 
virtual void save (Base::AbstractWriter &writer, Base::PersistenceVersion &version)
 Saves the PropertyContainer to writer. More...
 
virtual void restore (Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
 Restores the PropertyContainer from reader in specified version. More...
 
bool enableNotify (const bool enable)
 
bool isNotifyEnabled (void) const
 Returns whether notification of changes to the field values in the container is propagated to its auditors. More...
 
void touch ()
 Sets all properties of this PropertyContainer to updated. More...
 
bool isDeleted () const
 
bool isStatusDeleted () const
 Returns true if the status is set to 'Deleted'. More...
 
bool isMarkedForDelete () const
 Returns true if the status is set to 'MarkedForDelete'. More...
 
bool isMarkedForDeleteFinal () const
 Returns true if the status is set to 'MarkedForDeleteFinal'. More...
 
bool isDeletedFinal () const
 Returns true if the status is set to 'DeletedFinal'. More...
 
bool isNew () const
 Returns true if the status is set to 'New'. More...
 
bool isUpdated () const
 Returns true if the status is set to 'Updated'. More...
 
bool isValid () const
 Returns true if the status is set to 'Valid'. More...
 
bool hasErrors () const
 Returns true if the status is set to 'Error'. More...
 
void setData (const std::string &key, void *data)
 Adds arbitrary data for this key to the PropertyContainer (Used in SDK) More...
 
void * getData (const std::string &key, bool *ok=nullptr) const
 Returns data for this key from the PropertyContainer (Used in SDK) More...
 
void removeData (const std::string &key)
 Removes the data from the PropertyContainer (Used in SDK) More...
 
bool hasSameValuesAs (const PropertyContainer *container) const
 Returns 'true' if all values in 'container' match the corresponding property in this PropertyContainer. More...
 
void setPropertyValues (const PropertyContainer *other)
 Copies the property values from 'other' PropertyContainer to this PropertyContainer. More...
 
template<typename T >
getPropertyValueByName (const std::string &propertyName, bool *ok=0) const
 Returns the property value T with this name. If ok=true T holds a valid value. More...
 
virtual void ensureIntegrity ()
 
void integrityMaintained ()
 
void integrityLost ()
 Sets _integrity to false. More...
 
bool checkIntegrity ()
 Returns the value of _integrity. More...
 
virtual bool onChangedDebug (Core::Property *p)
 Is called after a property in a PropertyContainers has been changed, it ignores notify-flag. More...
 
virtual void checkAfterOnDeleted ()
 
Core::PropertyValueMap getPropertyValueMap () const
 Returns a map with the name of the property and its PropertyValue as a struct of the property type and the Core::Variant value. More...
 
std::map< std::string, Core::VariantgetKeyValueMap () const
 Returns all keys and sub keys with their values of this container. More...
 
bool setPropertyFromKeyValue (const std::string &propertyName, const std::string &key, const Core::Variant &value)
 Sets the key in a property to value. More...
 
std::set< Core::Property * > getUpdatedProperties () const
 Returns all properties that were updated since the last recompute. More...
 
void setUpdated ()
 Sets the status to 'Updated' if the old status was 'Valid'. More...
 
void setUpdated (const Core::Property *p)
 
void setHasErrors ()
 Sets the status to 'Error'. More...
 
void setNew ()
 Sets the status to 'New'. More...
 
void setValid ()
 Sets the status to 'Valid'. More...
 
void setDeleted ()
 Sets the status to 'Delete'. More...
 
void setMarkedForDelete ()
 Sets the status to 'MarkedForDelete'. More...
 
void setMarkedForDeleteFinal ()
 Sets the status to 'MarkedForDeleteFinal'. More...
 
void setDeleteFinal ()
 Sets the status to 'DeleteFinal'. More...
 
virtual void breakLinks ()
 Sets all links of this container to null. More...
 
unsigned int getPropertyChangeStatus () const
 
unsigned int getLastPropertyChangeStatus () const
 
void setAllPropertiesValid ()
 Sets the status of all properties to 'Valid'. More...
 
void setPropertyValues (const Core::PropertyValueMap &other)
 Copies the property values from a Core::PropertyValueMap to this PropertyContainer. More...
 
std::vector< Core::Property * > getPropertiesOrdered () const
 Returns the properties in the init order. More...
 
virtual bool check_lx (const char *f, const char *n)
 
virtual Core::PropertyaddDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false)
 
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const
 
virtual bool removeDynamicProperty (const char *name)
 
virtual std::vector< std::string > getDynamicPropertyNames () const
 
virtual Core::PropertygetDynamicPropertyByName (const char *name) const
 
bool rollBack ()
 Brings back the PropertyContainer to its last valid status. More...
 
void saveLastValidPropertyMap ()
 Saves the last valid property map, p.e. before a recompute to enable a rollback. More...
 
const Core::PropertyValueMapgetLastValidPropertyMap () const
 Returns the last valid PropertyValueMap. More...
 
- Public Member Functions inherited from Base::Persistence
virtual void saveDocFile (Base::AbstractWriter &, const Base::String &, const Base::String &)
 This method is used to save large amounts of data to a binary file. More...
 
virtual void restoreDocFile (Base::Reader &, const Base::String &)
 This method is used to restore large amounts of data from a binary file. More...
 
virtual bool mustbeSaved () const
 Return 'true' if this object must always be saved in the file. More...
 
virtual bool createSQL (Base::AbstractWriter &, Base::PersistenceVersion &, bool)
 This method is used to save properties or very small amounts of data to an XML document. More...
 
- Public Member Functions inherited from Base::BaseClass
virtual Type getTypeId (void) const
 
template<typename T >
bool isDerivedFrom () const
 
bool isDerivedFrom (const Type type) const
 
void * operator new (size_t size)
 
void operator delete (void *p)
 
BaseClassoperator-> ()
 
BaseClassoperator-> () const
 
 BaseClass ()=default
 Construction. More...
 
virtual ~BaseClass ()
 Destruction. More...
 
- Public Member Functions inherited from Base::Subject< Core::DocChanges >
 Subject ()
 
virtual ~Subject ()
 
void attach (Observer< Core::DocChanges > *ToObserv)
 
void detach (Observer< Core::DocChanges > *ToObserv)
 
void detachAll ()
 
void notify_internal (Core::DocChanges &rcReason, size_t deep)
 
void notify (Core::DocChanges &rcReason)
 
Observer< Core::DocChanges > * get (const char *Name)
 
void resetObserverTime ()
 
std::map< std::string, double > getObserverTime ()
 

Public Attributes

Core::PropertyText name
 
Core::PropertyText documentVersion
 
Core::PropertyText compatibleInfo
 
Core::PropertyText documentGUID
 
Core::PropertyIndex documentChanges
 
Core::PropertyIndex documentMaxID
 
Core::PropertyIndex application_mainversion
 
Core::PropertyIndex application_minorversion
 
Core::PropertyText documentTypeName
 
Core::PropertyText filename
 
Core::PropertyText createdBy
 
Core::PropertyText creationDate
 
Core::PropertyText lastModifiedBy
 
Core::PropertyText lastModifiedDate
 
Core::PropertyText company
 
Core::PropertyText comment
 
Core::PropertyText projectNumber
 
Core::PropertyText architect
 
Base::String fileName
 
- Public Attributes inherited from Core::PropertyContainer
bool isRestored = false
 
- Public Attributes inherited from Base::BaseClass
long ____deadVal = 0xBADEAFFE
 

Friends

class CoreApplication
 
class CoreDocument_Factory
 
class PropertyGUID
 
class DocumentTimeStampSentinel
 

Signals of the document

boost::signals2::signal< void(Core::DocChanges &)> signalDocChanges
 Signals DocChanges (To be removed) More...
 
boost::signals2::signal< void(const Core::DocObject &)> signalNewObject
 signal on new Object More...
 
boost::signals2::signal< void(const Core::DocObject &)> signalDeletedObject
 signal on deleted Object More...
 
boost::signals2::signal< void(const Core::DocObject &, const Core::Property &)> signalBeforeChangeObject
 signal on visibility changed Object More...
 
boost::signals2::signal< void(const Core::DocObject &, const Core::Property &)> signalChangedObject
 signal on changed Object More...
 
boost::signals2::signal< void()> signalBeforeRecompute
 Signals before recompute. More...
 
boost::signals2::signal< void(const std::vector< Core::DocObject * > &, const std::vector< Core::DocObject * > &, const std::vector< Core::DocObject * > &)> signalRecomputed
 Signals NewObjects, UpdatedObjects, DeletedObjects being recomputed. More...
 
boost::signals2::signal< void()> signalRecomputeError
 Signals a recompute error. More...
 
boost::signals2::signal< void(const std::map< Core::DocObject *, std::vector< std::string >> &)> signalRecomputedErrorObjects
 Signals recomputed error DocObjects. More...
 
boost::signals2::signal< void(const std::vector< Core::LinkError > &)> signalDefectLinks
 Signals defect links from object1 to object2. More...
 
boost::signals2::signal< void()> signalNewFile
 Signals new file. More...
 
DocumentState _state
 
ObjectMap _all_objects_map
 
ObjectVector _all_objects_vector
 
ObjectTypeMap _immutableObjectsMap
 
ObjectTypeMap _typeObjects
 
RelGraph_relGraph
 
RelGraph_relGraphBackLink
 
std::set< Core::DocObject * > _references
 
std::map< Base::GlobalId, Core::DocObject * > _guid_map
 
std::map< long, Core::DocObject * > _ifcId_map
 
bool _hasErrorObjectsInRecompute = false
 
bool _needRestoreBeforeRecompute = false
 
size_t _recomputeCnt = 0
 
bool mSolvingEnabled = true
 
template<typename T >
T * createObject ()
 
template<typename T >
T * addImmutableObject (const Core::PropertyBundle< T > *po)
 
template<typename T >
T * addImmutableObject_NoCheck (Core::PropertyBundle< T > *po)
 
template<typename T >
std::vector< T * > getObjectsByType () const
 Return all object of given type and all derived classes. More...
 
template<typename T >
void getObjectsByType (std::vector< T * > &objs) const
 Returns all objects of type 'T'. More...
 
void getObjectsFromTypeMap (Base::Type t, std::vector< Core::DocObject * > &ret) const
 Returns all objects of type 'T'. More...
 
const ObjectTypeMapgetTypeMap () const
 
void addPropertyLinkError (const std::string &from, const std::string &to)
 
const DocumentStategetDocumentState () const
 
bool checkObjectLinks (const std::vector< const Core::DocObject * > &objvec, std::vector< Core::LinkError > *errors=nullptr)
 Checks the document for errors. Returns false if there is an error. More...
 
bool checkObjectLinks (const std::vector< const Core::DocObject * > &objvec, const std::vector< const Core::DocObject * > &objToCheck, std::vector< Core::LinkError > *errors=nullptr)
 
bool checkDeletedObjectLinks (const std::vector< const Core::DocObject * > &objToCheck, std::vector< Core::LinkError > *errors)
 
bool checkObjectLinks (std::vector< Core::LinkError > *errors)
 
bool checkDeletedObjectLinks (const std::vector< const Core::DocObject * > &objvec, const std::vector< const Core::DocObject * > &objToCheck, std::vector< Core::LinkError > *errors)
 
virtual std::vector< const Core::DocObject * > getInner (const Core::DocObject *me, std::function< bool(const Core::DocObject *)> *allowToAddObject=0)
 Get ALL Links to me, also indirect. More...
 
virtual std::vector< const Core::DocObject * > getOuter (const Core::DocObject *me)
 Get ALL Links from me, also indirect. More...
 
Core::Link getAllLinksByProperties (const Core::DocObject *source) const
 
std::vector< const Core::DocObject * > getLinksByProperties (const Core::DocObject *o) const
 
std::vector< PropertyLinkDescgetLinkDescByProperties (const Core::DocObject *o) const
 
std::vector< const Core::DocObject * > getBackLinksByProperties (const Core::DocObject *source) const
 
void removeLinkInProperties (const Core::DocObject *source, Core::DocObject *link)
 
void removeBackLinkInProperties (const Core::DocObject *source, Core::DocObject *link)
 
std::string dumpGraph (void)
 Returns a string representation of the graph. More...
 
virtual std::vector< std::string > check_graph ()
 
virtual std::vector< const Core::DocObject * > getLinksToMe (const Core::DocObject *o)
 Returns all objects that directly linked to 'o'. More...
 
virtual std::vector< const Core::DocObject * > getBackLinksToMe (const Core::DocObject *o)
 Returns all objects that directly linked to 'o'. More...
 
virtual std::vector< const Core::DocObject * > getLinksFromMe (const Core::DocObject *o)
 Returns all objects 'o' directly linked from 'o'. More...
 
virtual std::vector< const Core::DocObject * > getBackLinksFromMe (const Core::DocObject *o)
 Returns all objects 'o' directly linked from 'o'. More...
 
virtual bool maybeSave ()
 Can be overwritten to check if the undo stack is clean etc. More...
 
std::vector< Core::DocObject * > getObjectsToSave ()
 Returns all objects that will be saved in document. Basically interface for build_savemap(). More...
 
bool saveFile (bool toExport=false, bool saveBackupCopy=false)
 Saves the file. More...
 
bool saveAsFile (const Base::String &filename=Base::String(), bool toExport=false, bool saveBackupCopy=false, const Base::String &initialDir=Base::String())
 Saves a new file under this name. More...
 
bool saveCopy (const Base::String &filename)
 Saves a copy of the current document, no notify, only store the doc under this name. More...
 
bool saveAsFileVersion (int aMajorVersion, int aMinorVersion, const Base::String &filename=Base::String(), bool toExport=false, bool saveBackupCopy=false, const Base::String &initialDir=Base::String(), bool dontRename=false)
 Saves a new file under this name. More...
 
void setOnSaveChangeToDefaultUser (bool onoff)
 If true: Change to default user on next change. Usually from IFC User to Lexocad User. More...
 
bool getOnSaveChangeToDefaultUser () const
 Return whether the user get changed to default user on next save. More...
 
bool askAndSetNewFilename (QString &newFilename, const Base::String &initialDir=Base::String())
 Ask user for filename (if not already passed in as newFilename) and set it to document. Returns false if user cancelled the save. More...
 
void setSaveBlocksUntilFinished (bool onoff)
 If true, saving will block until the whole save is finished and file is ready. More...
 
bool getSaveBlocksUntilFinished () const
 Returns whether saving will block until the whole save is finished and file is ready. More...
 
virtual void addInventorDirectory (const Base::String &)
 Inventor search directories - needs to be stored for IV/Z export, but SoInput is not OK... More...
 
virtual void createGroundPlate_deprecated ()
 To overwrite. Deprecated, do not use. More...
 
void setGuidPolicy (const Base::GlobalId_Policy &policy)
 Sets the default GUID policy. This determines what should be done if identical GUIDs are imported. More...
 
void setGuidPolicy (const Base::String &suffix, const Base::GlobalId_Policy &policy)
 Sets the GUID policy for a file suffix. This determines what should be done if identical GUIDs are imported from files with this suffix. More...
 
Base::GlobalId_Policy getGuidPolicy () const
 Returns the default GUID policy. More...
 
bool getGuidPolicy (const Base::String &suffix, Base::GlobalId_Policy &policy) const
 Returns the GUID policy for a file suffix. More...
 
void addReferenceFrom (Core::DocObject *from)
 
void removeReferenceFrom (Core::DocObject *from)
 
bool hasReferencesFrom (Core::DocObject *from) const
 
const std::set< Core::DocObject * > & getReferences () const
 
void setFullFileName (const Base::String &fullfilename)
 Sets the full file name including the path. More...
 
virtual const char * subject_name (void)
 
virtual bool restoreGlobalAttachment (Base::GlobalAttachment *gAtta, std::istream *, uint64_t streamsize, const Base::String &entryName)
 
bool addFileToZip (const Base::String &entryName, const Base::String &path)
 
bool restoreFileFromZip (const Base::String &entryName, const Base::String &targetpath, bool binaryMode)
 
void forceBackupOnNextSave ()
 Modifies the _lastBackupFileTime to force backup when the document is saved next time. More...
 
bool hasErrorObjectsInRecompute ()
 get result of last recompute More...
 
void resetHasErrorObjectsInRecompute ()
 reset result of last recompute(); More...
 
size_t getRecomputeCount () const
 get count of recomputes() More...
 
virtual void setChanged (bool changed)
 
bool getImmutableObjects (Base::Type t, ObjectSet &set) const
 
virtual Core::DocObjectaddImmutableObjectMaterial (Core::PropertyContainer *pc)
 
void setImportedIFCFile (QString a)
 
QString getImportedIFCFile ()
 
void test_graph ()
 
void onAddLink (PropertyLinkBaseBase *p, Core::DocObject *from, Core::DocObject *o)
 
void onRemoveLink (PropertyLinkBaseBase *p, Core::DocObject *from, Core::DocObject *o)
 
void onAddLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::list< Core::DocObject * > &linkList)
 
void onRemoveLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::list< Core::DocObject * > &linkList)
 
void onAddLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::unordered_set< Core::DocObject * > &linkSet)
 
void onRemoveLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::unordered_set< Core::DocObject * > &linkSet)
 
void onAddBackLink (PropertyLinkBaseBase *p, Core::DocObject *from, Core::DocObject *o)
 
void onRemoveBackLink (PropertyLinkBaseBase *p, Core::DocObject *from, Core::DocObject *o)
 
void onAddBackLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::list< Core::DocObject * > &linkList)
 
void onRemoveBackLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::list< Core::DocObject * > &linkList)
 
void onAddBackLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::unordered_set< Core::DocObject * > &linkSet)
 
void onRemoveBackLinks (PropertyLinkBaseBase *p, Core::DocObject *from, const std::unordered_set< Core::DocObject * > &linkSet)
 
Core::DocObject::IdType getUniqueObjectIdFromInteger (size_t input) const
 
void breakLinks (Core::DocObject *from)
 
Core::Link getInLinks (Core::DocObject *docObj)
 
Core::Link getInBackLinks (Core::DocObject *docObj)
 
Core::Link getOutLinks (Core::DocObject *docObj)
 
Core::Link getOutBackLinks (Core::DocObject *docObj)
 
bool checkRelGraph ()
 
bool replaceLink (Core::DocObject *old, Core::DocObject *newLink)
 
static void getDefaultVersionToSave (int &aMajorVersion, int &aMinorVersion)
 Returns application's mainversion to be saved in the document. More...
 
static void getPreviousVersionToSave (int &aMajorVersion, int &aMinorVersion)
 Returns application's mainversion to be saved in the document saved as PREVIOUS version. More...
 
static QString getPreviousVersionToSaveStr ()
 Returns application's version as string to be displayed in the menu for action Save as PREVIOUS version. More...
 
static std::pair< int, int > getAppVersionFromDocument (Base::String filename)
 
 CoreDocument ()
 
 CoreDocument (const CoreDocument &rhs)
 
virtual ~CoreDocument ()
 
virtual void deleteObject (Core::DocObject *o)
 Physically deletes an object without informing the object maps. More...
 
Core::DocObject::IdType getUniqueObjectId () const
 Returns the next available unique id. More...
 
virtual void addToDocumentMaps (Core::DocObject *o)
 Adds the object to all relevant maps. More...
 
Core::DocObjectgetImmutableObjectWithSameValues (Base::Type t, const Core::PropertyContainer *pc) const
 Returns the object that has the same values as 'pc'. Returns '0' if there is no such object. More...
 
virtual Core::DocObjectrestoreObject (const std::string &typeName, const std::string &typeHierarchy, const std::string &id)
 Tries to restore an object from a given type name. More...
 
void restoreProperty (Core::Property *property, const Base::String &name, Base::AbstractXMLReader &reader, Base::PersistenceVersion &version) override
 Restores property from from reader in specified version. More...
 
virtual void saveDocument (std::shared_ptr< Base::AbstractWriter > writer, int versionMajor2save, int versionMinor2save, bool showProgress)
 Saves the document. More...
 
virtual int restoreDocument (Base::XMLReader &reader, Core::Attachments &attachments)
 Restores the document. Returns the doc version of the restored document. More...
 
virtual std::vector< Core::DocObject * > build_savemap (std::vector< std::string > &delete_log)
 Build a map of the objects that get saved. Objects that are marked for delete get removed. More...
 
virtual void addNewObjectsToGraph ()
 Adds objects with status 'New' to the graph. More...
 
void resolveLinkInDocument (Core::PropertyLinkBase *link)
 After opening a document this method restores the links declared in the document header. More...
 
virtual bool renameTypeFromOlderVersions (int, Base::String &)
 
virtual void checkBeforeObjectRestoring (int, int)
 Is called before restoring objects of a document. More...
 
virtual void checkAndConfigureOpenedDocument ()
 Is called when opening a document. Can be overwritten to do some custom check routines. More...
 
virtual void checkAndConfigureOpenedDocumentAfterRecompute (int, int)
 Is called when opening a document after recompute. Can be overwritten to do some custom check routines. More...
 
virtual bool convertFromOlderVersions (int docVersion, int appVersion)
 
virtual bool getPatchedUserTypes (const Base::String &filename, std::map< QString, QString > &id2TypeMap)
 
virtual void cleanUndoStack ()
 Cleans the undo stack. Must be overwritten. More...
 
virtual void storeDirectory (const QString &, Base::AbstractWriter &)
 Stores directory at given path to zip stream. More...
 
virtual void restoreDirectory (const QString &)
 Restores directory to temp. More...
 
virtual void initDocument (bool)
 Initialize document.. Can be overwritten to do some custom initialization. More...
 
const ObjectMapgetObjectMap () const
 Returns the object map. More...
 
void createTempDirectory ()
 Creates the temporary directory. More...
 
void cleanTempDirectory ()
 Cleans the temporary directory. More...
 
bool maybe_add_GUID (const Base::GlobalId &guid, Core::DocObject *o)
 Adds a guid to the map IF this id is not in use yet. More...
 
void add_GUID (const Base::GlobalId &guid, Core::DocObject *o)
 Adds a guid without checking. More...
 
void remove_GUID (const Base::GlobalId &guid, Core::DocObject *o)
 Removes a guid without checking. More...
 
void waitForSaveIsFinished ()
 Saving runs in Threads, wait for finish. More...
 
bool isCatalogFile () const
 Returns true if this document's file is part of catalog. More...
 
bool createBackupFile (const Base::String &path, bool savePath)
 
bool createBackupFileAfterOpeningDoc (const Base::String &path, bool savePath)
 
void __setEnableTimeStamps__ (bool aOnOff)
 
bool __getEnableTimeStamps__ () const
 
void _checkTransaction (Core::DocObject *pcDelObj, const Property *What, int line)
 checks if a valid transaction is open More...
 
int _openTransaction (const char *name=0, int id=0)
 
void _commitTransaction (bool notify=false)
 Internally called by App::Application to commit the Command transaction. More...
 
void _abortTransaction ()
 Internally called by App::Application to abort the running transaction. More...
 
void _clearRedos ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static std::string encodeAttribute (const std::string &)
 
- Static Public Member Functions inherited from Base::BaseClass
static Type getClassTypeId (void)
 
static void init (void)
 
static void * create (void)
 
static void setIfcNameAndID (const std::string &n, int id)
 
- Protected Types inherited from Core::PropertyContainer
enum  Status {
  Status::New = 1, Status::Updated = 2, Status::Valid = 3, Status::MarkedForDelete = 4,
  Status::MarkedForDeleteFinal, Status::Deleted, Status::DeletedFinal, Status::Error
}
 
- Protected Types inherited from Base::Subject< Core::DocChanges >
typedef std::set< ObserverHolder, CompareObservers > ObserverSetType
 
- Protected Member Functions inherited from Core::PropertyContainer
virtual void onBeforeChangeProperty (const Property *)
 
virtual void onChangedProperty (const Property *)
 
void addPropertiesFrom (const Core::PropertyContainer *other)
 Adds copy of all properties from other to this PropertyContainer. More...
 
virtual void setStatus (Status status)
 
Status getStatus () const
 
bool checkForAlreadyExistingProperty (Core::Property *property)
 
void addChangedProperties (unsigned int propertiesflags)
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0)
 
static void initIfcTypes (const std::string &s, Base::Type classTypeId, int id)
 
- Protected Attributes inherited from Base::Subject< Core::DocChanges >
ObserverSetType _ObserverSet
 
ObserverSetType _ObserverSet_AddedLater
 Set of attached observers. More...
 
ObserverSetType _ObserverSet_AddedLaterCopy
 Set of attached observers at running notify. More...
 
bool _running_notify
 
bool _allDetachedWhileRunningNotify
 
std::list< Core::DocChanges_messages_WhileRunningNotify
 
std::map< std::string, double > _observerTime
 

Member Enumeration Documentation

◆ Status

Enumerator
SkipRecompute 
KeepTrailingDigits 
Closable 
Restoring 
Recomputing 
PartialRestore 
Importing 
PartialDoc 
AllowPartialRecompute 
TempDoc 
RestoreError 

Constructor & Destructor Documentation

◆ CoreDocument() [1/2]

Core::CoreDocument::CoreDocument ( )
protected

◆ CoreDocument() [2/2]

Core::CoreDocument::CoreDocument ( const CoreDocument rhs)
protected

◆ ~CoreDocument()

virtual Core::CoreDocument::~CoreDocument ( )
protectedvirtual

Member Function Documentation

◆ __getEnableTimeStamps__()

bool Core::CoreDocument::__getEnableTimeStamps__ ( ) const
protected

◆ __setEnableTimeStamps__()

void Core::CoreDocument::__setEnableTimeStamps__ ( bool  aOnOff)
protected

◆ _abortTransaction()

void Core::CoreDocument::_abortTransaction ( )
protected

Internally called by App::Application to abort the running transaction.

◆ _checkTransaction()

void Core::CoreDocument::_checkTransaction ( Core::DocObject pcDelObj,
const Property What,
int  line 
)
protected

checks if a valid transaction is open

◆ _clearRedos()

void Core::CoreDocument::_clearRedos ( )
protected

◆ _commitTransaction()

void Core::CoreDocument::_commitTransaction ( bool  notify = false)
protected

Internally called by App::Application to commit the Command transaction.

◆ _openTransaction()

int Core::CoreDocument::_openTransaction ( const char *  name = 0,
int  id = 0 
)
protected

Open a new command Undo/Redo, an UTF-8 name can be specified

Parameters
nametransaction name
idtransaction ID, if 0 then the ID is auto generated.
Returns
: Return the ID of the new transaction.

This function creates an actual transaction regardless of Application AutoTransaction setting.

◆ abortTransaction()

void Core::CoreDocument::abortTransaction ( )

Abort the actually running transaction.

◆ add_GUID()

void Core::CoreDocument::add_GUID ( const Base::GlobalId guid,
Core::DocObject o 
)
protected

Adds a guid without checking.

◆ addFileToZip()

bool Core::CoreDocument::addFileToZip ( const Base::String entryName,
const Base::String path 
)

◆ addImmutableObject()

template<typename T >
T* Core::CoreDocument::addImmutableObject ( const Core::PropertyBundle< T > *  po)
inline

Adds an immutable object to the document using templates. The Core::PropertyBundle is taken to compare the values with all existing immutable objects.

◆ addImmutableObject_NoCheck()

template<typename T >
T* Core::CoreDocument::addImmutableObject_NoCheck ( Core::PropertyBundle< T > *  po)
inline

Adds an immutable object to the document using templates. The Core::PropertyBundle is taken to compare the values with all existing immutable objects.

◆ addImmutableObjectMaterial()

virtual Core::DocObject* Core::CoreDocument::addImmutableObjectMaterial ( Core::PropertyContainer pc)
virtual

◆ addInventorDirectory()

virtual void Core::CoreDocument::addInventorDirectory ( const Base::String )
inlinevirtual

Inventor search directories - needs to be stored for IV/Z export, but SoInput is not OK...

◆ addNewObjectsToGraph()

virtual void Core::CoreDocument::addNewObjectsToGraph ( )
protectedvirtual

Adds objects with status 'New' to the graph.

◆ addObject()

bool Core::CoreDocument::addObject ( Core::DocObject e)

Adds an existing object to the document.

◆ addPropertyLinkError()

void Core::CoreDocument::addPropertyLinkError ( const std::string &  from,
const std::string &  to 
)

◆ addReferenceFrom()

void Core::CoreDocument::addReferenceFrom ( Core::DocObject from)

◆ addToDocumentMaps()

virtual void Core::CoreDocument::addToDocumentMaps ( Core::DocObject o)
protectedvirtual

Adds the object to all relevant maps.

◆ askAndSetNewFilename()

bool Core::CoreDocument::askAndSetNewFilename ( QString &  newFilename,
const Base::String initialDir = Base::String() 
)

Ask user for filename (if not already passed in as newFilename) and set it to document. Returns false if user cancelled the save.

◆ breakLinks()

void Core::CoreDocument::breakLinks ( Core::DocObject from)

◆ build_savemap()

virtual std::vector<Core::DocObject*> Core::CoreDocument::build_savemap ( std::vector< std::string > &  delete_log)
protectedvirtual

Build a map of the objects that get saved. Objects that are marked for delete get removed.

◆ check_graph()

virtual std::vector<std::string> Core::CoreDocument::check_graph ( )
virtual

◆ checkAndConfigureOpenedDocument()

virtual void Core::CoreDocument::checkAndConfigureOpenedDocument ( )
inlineprotectedvirtual

Is called when opening a document. Can be overwritten to do some custom check routines.

◆ checkAndConfigureOpenedDocumentAfterRecompute()

virtual void Core::CoreDocument::checkAndConfigureOpenedDocumentAfterRecompute ( int  ,
int   
)
inlineprotectedvirtual

Is called when opening a document after recompute. Can be overwritten to do some custom check routines.

◆ checkBeforeObjectRestoring()

virtual void Core::CoreDocument::checkBeforeObjectRestoring ( int  ,
int   
)
inlineprotectedvirtual

Is called before restoring objects of a document.

◆ checkDeletedObjectLinks() [1/2]

bool Core::CoreDocument::checkDeletedObjectLinks ( const std::vector< const Core::DocObject * > &  objToCheck,
std::vector< Core::LinkError > *  errors 
)

◆ checkDeletedObjectLinks() [2/2]

bool Core::CoreDocument::checkDeletedObjectLinks ( const std::vector< const Core::DocObject * > &  objvec,
const std::vector< const Core::DocObject * > &  objToCheck,
std::vector< Core::LinkError > *  errors 
)

◆ checkObjectLinks() [1/3]

bool Core::CoreDocument::checkObjectLinks ( const std::vector< const Core::DocObject * > &  objvec,
const std::vector< const Core::DocObject * > &  objToCheck,
std::vector< Core::LinkError > *  errors = nullptr 
)

◆ checkObjectLinks() [2/3]

bool Core::CoreDocument::checkObjectLinks ( const std::vector< const Core::DocObject * > &  objvec,
std::vector< Core::LinkError > *  errors = nullptr 
)

Checks the document for errors. Returns false if there is an error.

◆ checkObjectLinks() [3/3]

bool Core::CoreDocument::checkObjectLinks ( std::vector< Core::LinkError > *  errors)

◆ checkRelGraph()

bool Core::CoreDocument::checkRelGraph ( )

◆ cleanTempDirectory()

void Core::CoreDocument::cleanTempDirectory ( )
protected

Cleans the temporary directory.

◆ cleanUndoStack()

virtual void Core::CoreDocument::cleanUndoStack ( )
inlineprotectedvirtual

Cleans the undo stack. Must be overwritten.

◆ clearCopyType()

void Core::CoreDocument::clearCopyType ( )

Sets the copy type to Base::Type::badType(), next copied object will be copied as its own type.

◆ clearUndos()

void Core::CoreDocument::clearUndos ( )

Remove all stored Undos and Redos.

◆ commitTransaction()

void Core::CoreDocument::commitTransaction ( )

Commit the Command transaction. Do nothing If there is no Command transaction open.

◆ convertFromOlderVersions()

virtual bool Core::CoreDocument::convertFromOlderVersions ( int  docVersion,
int  appVersion 
)
protectedvirtual

Converts document from older version. Is called when a document with an older version number is opened. Returns true if successful, false if failed to convert.

◆ copyObject() [1/2]

Core::DocObject* Core::CoreDocument::copyObject ( Core::DocObject o)

◆ copyObject() [2/2]

Core::DocObject* Core::CoreDocument::copyObject ( Core::DocObject o,
DocObjectMap copyMap 
)

Creates a copy of 'o' and adds it to the document, provides map of pairs original-copy to see which object is a copy of another one.

◆ copyObjectShallow()

template<typename Type >
Type Core::CoreDocument::copyObjectShallow ( Type  o)
inline

Creates a copy of 'o' and adds it to the document. Performs shallow copy.

◆ copySharedObject()

Core::DocObject* Core::CoreDocument::copySharedObject ( Core::DocObject o,
DocObjectMap copyMap 
)

Copy shared object. This is violating of the share, but in some cases this is useful. Use wisely!!

◆ copyToDifferentType()

Core::DocObject* Core::CoreDocument::copyToDifferentType ( Core::DocObject o,
Base::Type  typeToCreate,
DocObjectMap copyMap 
)

Creates an object of type 'typeToCreate' and copy properties from 'o' to it. Provides map of pairs original-copy.

◆ createBackupFile()

bool Core::CoreDocument::createBackupFile ( const Base::String path,
bool  savePath 
)
protected

◆ createBackupFileAfterOpeningDoc()

bool Core::CoreDocument::createBackupFileAfterOpeningDoc ( const Base::String path,
bool  savePath 
)
protected

◆ createGroundPlate_deprecated()

virtual void Core::CoreDocument::createGroundPlate_deprecated ( )
inlinevirtual

To overwrite. Deprecated, do not use.

◆ createObject()

template<typename T >
T* Core::CoreDocument::createObject ( )
inline

Creates and adds a new object to the document using templates. If a Core::PropertyBundle is given the object is initialized with these properties.

◆ createObjectFromType()

Core::DocObject* Core::CoreDocument::createObjectFromType ( Base::Type  type)

Creates an object from type and adds it to the document.

◆ createObjectFromTypeName()

Core::DocObject* Core::CoreDocument::createObjectFromTypeName ( const char *  typeName)

Creates an object from type name and adds it to the document.

◆ createTempDirectory()

void Core::CoreDocument::createTempDirectory ( )
protected

Creates the temporary directory.

◆ deleteObject()

virtual void Core::CoreDocument::deleteObject ( Core::DocObject o)
protectedvirtual

Physically deletes an object without informing the object maps.

◆ dumpGraph()

std::string Core::CoreDocument::dumpGraph ( void  )

Returns a string representation of the graph.

◆ emitAndNotify()

virtual void Core::CoreDocument::emitAndNotify ( Core::DocChanges aDocChanges)
virtual

◆ forceBackupOnNextSave()

void Core::CoreDocument::forceBackupOnNextSave ( )

Modifies the _lastBackupFileTime to force backup when the document is saved next time.

◆ getAllLinksByProperties()

Core::Link Core::CoreDocument::getAllLinksByProperties ( const Core::DocObject source) const

◆ getAppVersionFromDocument()

static std::pair<int,int> Core::CoreDocument::getAppVersionFromDocument ( Base::String  filename)
static

◆ getAvailableRedoNames()

std::vector<std::string> Core::CoreDocument::getAvailableRedoNames ( ) const

Returns a list of the Redo names.

◆ getAvailableRedos()

int Core::CoreDocument::getAvailableRedos ( int  id = 0) const

Returns the number of stored Redos. If greater than 0 Redo will be effective.

◆ getAvailableUndoNames()

std::vector<std::string> Core::CoreDocument::getAvailableUndoNames ( ) const

Returns a list of the Undo names.

◆ getAvailableUndos()

int Core::CoreDocument::getAvailableUndos ( int  id = 0) const

Returns the number of stored Undos. If greater than 0 Undo will be effective.

◆ getBackLinksByProperties()

std::vector<const Core::DocObject*> Core::CoreDocument::getBackLinksByProperties ( const Core::DocObject source) const

◆ getBackLinksFromMe()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getBackLinksFromMe ( const Core::DocObject o)
virtual

Returns all objects 'o' directly linked from 'o'.

◆ getBackLinksToMe()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getBackLinksToMe ( const Core::DocObject o)
virtual

Returns all objects that directly linked to 'o'.

◆ getCopyType()

Base::Type Core::CoreDocument::getCopyType ( ) const

Return type of which new copied element should be created. setCopyType is intentionally not available because it is decided in copy methods.

◆ getDefaultVersionToSave()

static void Core::CoreDocument::getDefaultVersionToSave ( int &  aMajorVersion,
int &  aMinorVersion 
)
static

Returns application's mainversion to be saved in the document.

◆ getDocumentState()

const DocumentState& Core::CoreDocument::getDocumentState ( ) const

◆ getDocumentVersion()

int Core::CoreDocument::getDocumentVersion ( ) const

Returns the version of the document.

◆ getDocXMLAsString()

std::string Core::CoreDocument::getDocXMLAsString ( )

◆ getGuidPolicy() [1/2]

Base::GlobalId_Policy Core::CoreDocument::getGuidPolicy ( ) const

Returns the default GUID policy.

◆ getGuidPolicy() [2/2]

bool Core::CoreDocument::getGuidPolicy ( const Base::String suffix,
Base::GlobalId_Policy policy 
) const

Returns the GUID policy for a file suffix.

◆ getImmutableObjects()

bool Core::CoreDocument::getImmutableObjects ( Base::Type  t,
ObjectSet set 
) const

◆ getImmutableObjectWithSameValues()

Core::DocObject* Core::CoreDocument::getImmutableObjectWithSameValues ( Base::Type  t,
const Core::PropertyContainer pc 
) const
protected

Returns the object that has the same values as 'pc'. Returns '0' if there is no such object.

◆ getImportedIFCFile()

QString Core::CoreDocument::getImportedIFCFile ( )

◆ getInBackLinks()

Core::Link Core::CoreDocument::getInBackLinks ( Core::DocObject docObj)

◆ getInLinks()

Core::Link Core::CoreDocument::getInLinks ( Core::DocObject docObj)

◆ getInner()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getInner ( const Core::DocObject me,
std::function< bool(const Core::DocObject *)> *  allowToAddObject = 0 
)
virtual

Get ALL Links to me, also indirect.

◆ getLinkDescByProperties()

std::vector<PropertyLinkDesc> Core::CoreDocument::getLinkDescByProperties ( const Core::DocObject o) const

◆ getLinksByProperties()

std::vector<const Core::DocObject*> Core::CoreDocument::getLinksByProperties ( const Core::DocObject o) const

◆ getLinksFromMe()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getLinksFromMe ( const Core::DocObject o)
virtual

Returns all objects 'o' directly linked from 'o'.

◆ getLinksToMe()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getLinksToMe ( const Core::DocObject o)
virtual

Returns all objects that directly linked to 'o'.

◆ getMaxUndoStackSize()

unsigned int Core::CoreDocument::getMaxUndoStackSize ( void  ) const

Set the Undo limit as stack size.

◆ getObjectByGlobalId()

Core::DocObject* Core::CoreDocument::getObjectByGlobalId ( const Base::GlobalId guid) const

Returns the DocObject with this GUID.

◆ getObjectById()

virtual Core::DocObject* Core::CoreDocument::getObjectById ( const DocObject::IdType id) const
virtual

Returns the object with this id.

◆ getObjectByUserName()

Core::DocObject* Core::CoreDocument::getObjectByUserName ( const Base::String s) const

Returns the object with this userName.

◆ getObjectMap()

const ObjectMap& Core::CoreDocument::getObjectMap ( ) const
protected

Returns the object map.

◆ getObjects()

std::vector<Core::DocObject*> Core::CoreDocument::getObjects ( bool  includeDeletedObjects = false) const

Returns all objects in the document.

◆ getObjectsByType() [1/2]

template<typename T >
std::vector<T*> Core::CoreDocument::getObjectsByType ( ) const
inline

Return all object of given type and all derived classes.

◆ getObjectsByType() [2/2]

template<typename T >
void Core::CoreDocument::getObjectsByType ( std::vector< T * > &  objs) const
inline

Returns all objects of type 'T'.

◆ getObjectsByTypeName()

std::vector<Core::DocObject*> Core::CoreDocument::getObjectsByTypeName ( const std::string &  typeName) const

Returns all objects of typeName.

◆ getObjectsConst()

std::vector<const Core::DocObject*> Core::CoreDocument::getObjectsConst ( bool  includeDeletedObjects = false) const

◆ getObjectsFromTypeMap()

void Core::CoreDocument::getObjectsFromTypeMap ( Base::Type  t,
std::vector< Core::DocObject * > &  ret 
) const

Returns all objects of type 'T'.

◆ getObjectsSorted()

virtual std::vector<Core::DocObject*> Core::CoreDocument::getObjectsSorted ( ) const
virtual

Returns all objects topologically sorted.

◆ getObjectsToSave()

std::vector<Core::DocObject*> Core::CoreDocument::getObjectsToSave ( )

Returns all objects that will be saved in document. Basically interface for build_savemap().

◆ getOnSaveChangeToDefaultUser()

bool Core::CoreDocument::getOnSaveChangeToDefaultUser ( ) const

Return whether the user get changed to default user on next save.

◆ getOutBackLinks()

Core::Link Core::CoreDocument::getOutBackLinks ( Core::DocObject docObj)

◆ getOuter()

virtual std::vector<const Core::DocObject*> Core::CoreDocument::getOuter ( const Core::DocObject me)
virtual

Get ALL Links from me, also indirect.

◆ getOutLinks()

Core::Link Core::CoreDocument::getOutLinks ( Core::DocObject docObj)

◆ getPatchedUserTypes()

virtual bool Core::CoreDocument::getPatchedUserTypes ( const Base::String filename,
std::map< QString, QString > &  id2TypeMap 
)
protectedvirtual

◆ getPendingTransactionName()

const char* Core::CoreDocument::getPendingTransactionName ( ) const

Returns pending transaction name. Returns nullptr if there is no pending transaction.

◆ getPreviousVersionToSave()

static void Core::CoreDocument::getPreviousVersionToSave ( int &  aMajorVersion,
int &  aMinorVersion 
)
static

Returns application's mainversion to be saved in the document saved as PREVIOUS version.

◆ getPreviousVersionToSaveStr()

static QString Core::CoreDocument::getPreviousVersionToSaveStr ( )
static

Returns application's version as string to be displayed in the menu for action Save as PREVIOUS version.

◆ getRecomputeCount()

size_t Core::CoreDocument::getRecomputeCount ( ) const

get count of recomputes()

◆ getReferences()

const std::set<Core::DocObject*>& Core::CoreDocument::getReferences ( ) const

◆ getSaveBlocksUntilFinished()

bool Core::CoreDocument::getSaveBlocksUntilFinished ( ) const

Returns whether saving will block until the whole save is finished and file is ready.

◆ getTmpDirectory()

Base::String Core::CoreDocument::getTmpDirectory ( )

Returns the temporary directory.

◆ getTransactionID()

int Core::CoreDocument::getTransactionID ( bool  undo,
unsigned  pos = 0 
) const

Return the undo/redo transaction ID starting from the back.

◆ getTypeMap()

const ObjectTypeMap& Core::CoreDocument::getTypeMap ( ) const

◆ getUndoMode()

int Core::CoreDocument::getUndoMode ( void  ) const

switch the level of Undo/Redo

◆ getUniqueObjectId()

Core::DocObject::IdType Core::CoreDocument::getUniqueObjectId ( ) const
protected

Returns the next available unique id.

◆ getUniqueObjectIdFromInteger()

Core::DocObject::IdType Core::CoreDocument::getUniqueObjectIdFromInteger ( size_t  input) const

◆ hasErrorObjectsInRecompute()

bool Core::CoreDocument::hasErrorObjectsInRecompute ( )

get result of last recompute

◆ hasPendingTransaction()

bool Core::CoreDocument::hasPendingTransaction ( ) const

Check if a transaction is open.

◆ hasReferencesFrom()

bool Core::CoreDocument::hasReferencesFrom ( Core::DocObject from) const

◆ initDocument()

virtual void Core::CoreDocument::initDocument ( bool  )
inlineprotectedvirtual

Initialize document.. Can be overwritten to do some custom initialization.

◆ isActive()

bool Core::CoreDocument::isActive ( ) const

Returns 'true' if the Document is the active Document. Otherwise returns 'false'.

◆ isCatalogFile()

bool Core::CoreDocument::isCatalogFile ( ) const
protected

Returns true if this document's file is part of catalog.

◆ isChanged()

virtual bool Core::CoreDocument::isChanged ( )
virtual

Returns 'true' if the document is changed.

◆ isPerformingTransaction()

bool Core::CoreDocument::isPerformingTransaction ( ) const

returns true if the document is in an Transaction phase, e.g. currently performing a redo/undo or rollback

◆ isTransactionEmpty()

bool Core::CoreDocument::isTransactionEmpty ( ) const

Check if a transaction is open and its list is empty. If no transaction is open true is returned.

◆ maybe_add_GUID()

bool Core::CoreDocument::maybe_add_GUID ( const Base::GlobalId guid,
Core::DocObject o 
)
protected

Adds a guid to the map IF this id is not in use yet.

◆ maybeSave()

virtual bool Core::CoreDocument::maybeSave ( )
inlinevirtual

Can be overwritten to check if the undo stack is clean etc.

◆ onAddBackLink()

void Core::CoreDocument::onAddBackLink ( PropertyLinkBaseBase p,
Core::DocObject from,
Core::DocObject o 
)

◆ onAddBackLinks() [1/2]

void Core::CoreDocument::onAddBackLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::list< Core::DocObject * > &  linkList 
)

◆ onAddBackLinks() [2/2]

void Core::CoreDocument::onAddBackLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::unordered_set< Core::DocObject * > &  linkSet 
)

◆ onAddLink()

void Core::CoreDocument::onAddLink ( PropertyLinkBaseBase p,
Core::DocObject from,
Core::DocObject o 
)

◆ onAddLinks() [1/2]

void Core::CoreDocument::onAddLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::list< Core::DocObject * > &  linkList 
)

◆ onAddLinks() [2/2]

void Core::CoreDocument::onAddLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::unordered_set< Core::DocObject * > &  linkSet 
)

◆ onBeforeChangeProperty()

void Core::CoreDocument::onBeforeChangeProperty ( const Core::DocObject Who,
const Property What 
)

callback from the Document objects before property will be changed

◆ onChangedDebug()

virtual bool Core::CoreDocument::onChangedDebug ( Core::DocObject o,
Core::Property p 
)
virtual

◆ onChangedProperty()

void Core::CoreDocument::onChangedProperty ( const Core::DocObject Who,
const Property What 
)

callback from the Document objects after property was changed

◆ onFileOpened()

virtual void Core::CoreDocument::onFileOpened ( )
inlinevirtual

Is called when the file was opened, but before the message FileOpened gets emitted. Can be overwritten to add custom behavior.

◆ onRemoveBackLink()

void Core::CoreDocument::onRemoveBackLink ( PropertyLinkBaseBase p,
Core::DocObject from,
Core::DocObject o 
)

◆ onRemoveBackLinks() [1/2]

void Core::CoreDocument::onRemoveBackLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::list< Core::DocObject * > &  linkList 
)

◆ onRemoveBackLinks() [2/2]

void Core::CoreDocument::onRemoveBackLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::unordered_set< Core::DocObject * > &  linkSet 
)

◆ onRemoveLink()

void Core::CoreDocument::onRemoveLink ( PropertyLinkBaseBase p,
Core::DocObject from,
Core::DocObject o 
)

◆ onRemoveLinks() [1/2]

void Core::CoreDocument::onRemoveLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::list< Core::DocObject * > &  linkList 
)

◆ onRemoveLinks() [2/2]

void Core::CoreDocument::onRemoveLinks ( PropertyLinkBaseBase p,
Core::DocObject from,
const std::unordered_set< Core::DocObject * > &  linkSet 
)

◆ openTransaction()

int Core::CoreDocument::openTransaction ( const char *  name = 0)

Open a new command Undo/Redo, an UTF-8 name can be specified

Parameters
nametransaction name

This function calls App::Application::setActiveTransaction(name) instead to setup a potential transaction which will only be created if there is actual changes.

◆ recompute() [1/2]

virtual void Core::CoreDocument::recompute ( )
virtual

Recomputes the document.

◆ recompute() [2/2]

virtual void Core::CoreDocument::recompute ( std::function< void(DOCOBJECTS newObj, DOCOBJECTS updatedObj, DOCOBJECTS deletedObj, DOCOBJECTS_ERROR_MAP errorObj)>  onRecomputedCB)
virtual

Recomputes the document. Takes a lambda as an argument -> { /*CODE*‍/ auto onRecomputedCB = [this] (DOCOBJECTS newObj, DOCOBJECTS updatedObj, DOCOBJECTS deletedObj, DOCOBJECTS_ERROR_MAP errorObj); }

◆ redo()

bool Core::CoreDocument::redo ( int  id = 0)

Will REDO one step, returns False if no redo was done (Redos == 0).

◆ remove_GUID()

void Core::CoreDocument::remove_GUID ( const Base::GlobalId guid,
Core::DocObject o 
)
protected

Removes a guid without checking.

◆ removeBackLinkInProperties()

void Core::CoreDocument::removeBackLinkInProperties ( const Core::DocObject source,
Core::DocObject link 
)

◆ removeLinkInProperties()

void Core::CoreDocument::removeLinkInProperties ( const Core::DocObject source,
Core::DocObject link 
)

◆ removeObject()

void Core::CoreDocument::removeObject ( Core::DocObject e)

Removes an object from the document.

◆ removeObjectFinal()

virtual void Core::CoreDocument::removeObjectFinal ( Core::DocObject e,
bool  deep = false 
)
virtual

Removes an object from the document.

◆ removeObjects()

void Core::CoreDocument::removeObjects ( const std::vector< Core::DocObject * > &  objects)

Removes objects from the document.

◆ removeReferenceFrom()

void Core::CoreDocument::removeReferenceFrom ( Core::DocObject from)

◆ renameTransaction()

void Core::CoreDocument::renameTransaction ( const char *  name,
int  id 
)

Rename the current transaction if the id matches.

◆ renameTypeFromOlderVersions()

virtual bool Core::CoreDocument::renameTypeFromOlderVersions ( int  ,
Base::String  
)
inlineprotectedvirtual

Handles renaming of types between versions. This method looks whether it is necessary to create object of different type when restoring objects. Returns True if something was changed, false when there is no change.

◆ replaceLink()

bool Core::CoreDocument::replaceLink ( Core::DocObject old,
Core::DocObject newLink 
)

◆ resetHasErrorObjectsInRecompute()

void Core::CoreDocument::resetHasErrorObjectsInRecompute ( )

reset result of last recompute();

◆ resolveLinkInDocument()

void Core::CoreDocument::resolveLinkInDocument ( Core::PropertyLinkBase link)
protected

After opening a document this method restores the links declared in the document header.

◆ restoreDirectory()

virtual void Core::CoreDocument::restoreDirectory ( const QString &  )
inlineprotectedvirtual

Restores directory to temp.

◆ restoreDocument()

virtual int Core::CoreDocument::restoreDocument ( Base::XMLReader reader,
Core::Attachments attachments 
)
protectedvirtual

Restores the document. Returns the doc version of the restored document.

◆ restoreFileFromZip()

bool Core::CoreDocument::restoreFileFromZip ( const Base::String entryName,
const Base::String targetpath,
bool  binaryMode 
)

◆ restoreGlobalAttachment()

virtual bool Core::CoreDocument::restoreGlobalAttachment ( Base::GlobalAttachment gAtta,
std::istream *  ,
uint64_t  streamsize,
const Base::String entryName 
)
virtual

◆ restoreObject()

virtual Core::DocObject* Core::CoreDocument::restoreObject ( const std::string &  typeName,
const std::string &  typeHierarchy,
const std::string &  id 
)
protectedvirtual

Tries to restore an object from a given type name.

◆ restoreProperty()

void Core::CoreDocument::restoreProperty ( Core::Property property,
const Base::String name,
Base::AbstractXMLReader reader,
Base::PersistenceVersion version 
)
overrideprotectedvirtual

Restores property from from reader in specified version.

Reimplemented from Core::PropertyContainer.

◆ saveAs()

virtual bool Core::CoreDocument::saveAs ( const Base::String filename)
virtual

Saves the document under this name*.

◆ saveAsFile()

bool Core::CoreDocument::saveAsFile ( const Base::String filename = Base::String(),
bool  toExport = false,
bool  saveBackupCopy = false,
const Base::String initialDir = Base::String() 
)

Saves a new file under this name.

◆ saveAsFileVersion()

bool Core::CoreDocument::saveAsFileVersion ( int  aMajorVersion,
int  aMinorVersion,
const Base::String filename = Base::String(),
bool  toExport = false,
bool  saveBackupCopy = false,
const Base::String initialDir = Base::String(),
bool  dontRename = false 
)

Saves a new file under this name.

◆ saveCopy()

bool Core::CoreDocument::saveCopy ( const Base::String filename)

Saves a copy of the current document, no notify, only store the doc under this name.

◆ saveDocument()

virtual void Core::CoreDocument::saveDocument ( std::shared_ptr< Base::AbstractWriter writer,
int  versionMajor2save,
int  versionMinor2save,
bool  showProgress 
)
protectedvirtual

Saves the document.

◆ saveFile()

bool Core::CoreDocument::saveFile ( bool  toExport = false,
bool  saveBackupCopy = false 
)

Saves the file.

◆ setChanged()

virtual void Core::CoreDocument::setChanged ( bool  changed)
virtual

◆ setFullFileName()

void Core::CoreDocument::setFullFileName ( const Base::String fullfilename)

Sets the full file name including the path.

◆ setGuidPolicy() [1/2]

void Core::CoreDocument::setGuidPolicy ( const Base::GlobalId_Policy policy)

Sets the default GUID policy. This determines what should be done if identical GUIDs are imported.

◆ setGuidPolicy() [2/2]

void Core::CoreDocument::setGuidPolicy ( const Base::String suffix,
const Base::GlobalId_Policy policy 
)

Sets the GUID policy for a file suffix. This determines what should be done if identical GUIDs are imported from files with this suffix.

◆ setImportedIFCFile()

void Core::CoreDocument::setImportedIFCFile ( QString  a)

◆ setMaxUndoStackSize()

void Core::CoreDocument::setMaxUndoStackSize ( unsigned int  UndoMaxStackSize = 20)

Set the Undo limit as stack size.

◆ setOnSaveChangeToDefaultUser()

void Core::CoreDocument::setOnSaveChangeToDefaultUser ( bool  onoff)

If true: Change to default user on next change. Usually from IFC User to Lexocad User.

◆ setRecommendFileNameForSave()

void Core::CoreDocument::setRecommendFileNameForSave ( const Base::String s)

◆ setSaveBlocksUntilFinished()

void Core::CoreDocument::setSaveBlocksUntilFinished ( bool  onoff)

If true, saving will block until the whole save is finished and file is ready.

◆ setStatusBits()

void Core::CoreDocument::setStatusBits ( Status  pos,
bool  on 
)

set the status bits

◆ setTransactionMode()

void Core::CoreDocument::setTransactionMode ( int  iMode)

switch the transaction mode

◆ setUndoLimit()

void Core::CoreDocument::setUndoLimit ( unsigned int  UndoMemSize = 0)

Set the Undo limit in Byte!

◆ setUndoMode()

void Core::CoreDocument::setUndoMode ( int  iMode)

switch the level of Undo/Redo

◆ storeDirectory()

virtual void Core::CoreDocument::storeDirectory ( const QString &  ,
Base::AbstractWriter  
)
inlineprotectedvirtual

Stores directory at given path to zip stream.

◆ subject_name()

virtual const char* Core::CoreDocument::subject_name ( void  )
inlinevirtual

Reimplemented from Base::Subject< Core::DocChanges >.

◆ test_graph()

void Core::CoreDocument::test_graph ( )

◆ testStatusBits()

bool Core::CoreDocument::testStatusBits ( Status  pos) const

return the status bits

◆ undo()

bool Core::CoreDocument::undo ( int  id = 0)

Will UNDO one step, returns False if no undo was done (Undos == 0).

◆ waitForSaveIsFinished()

void Core::CoreDocument::waitForSaveIsFinished ( )
protected

Saving runs in Threads, wait for finish.

Friends And Related Function Documentation

◆ CoreApplication

friend class CoreApplication
friend

◆ CoreDocument_Factory

friend class CoreDocument_Factory
friend

◆ DocumentTimeStampSentinel

friend class DocumentTimeStampSentinel
friend

◆ PropertyGUID

friend class PropertyGUID
friend

Member Data Documentation

◆ _all_objects_map

ObjectMap Core::CoreDocument::_all_objects_map
protected

◆ _all_objects_vector

ObjectVector Core::CoreDocument::_all_objects_vector
protected

◆ _guid_map

std::map<Base::GlobalId, Core::DocObject*> Core::CoreDocument::_guid_map
protected

◆ _hasErrorObjectsInRecompute

bool Core::CoreDocument::_hasErrorObjectsInRecompute = false
protected

◆ _ifcId_map

std::map<long, Core::DocObject*> Core::CoreDocument::_ifcId_map
protected

◆ _immutableObjectsMap

ObjectTypeMap Core::CoreDocument::_immutableObjectsMap
protected

◆ _needRestoreBeforeRecompute

bool Core::CoreDocument::_needRestoreBeforeRecompute = false
protected

◆ _recomputeCnt

size_t Core::CoreDocument::_recomputeCnt = 0
protected

◆ _references

std::set<Core::DocObject*> Core::CoreDocument::_references
protected

◆ _relGraph

RelGraph* Core::CoreDocument::_relGraph
protected

◆ _relGraphBackLink

RelGraph* Core::CoreDocument::_relGraphBackLink
protected

◆ _state

DocumentState Core::CoreDocument::_state
protected

◆ _typeObjects

ObjectTypeMap Core::CoreDocument::_typeObjects
protected

◆ application_mainversion

Core::PropertyIndex Core::CoreDocument::application_mainversion

◆ application_minorversion

Core::PropertyIndex Core::CoreDocument::application_minorversion

◆ architect

Core::PropertyText Core::CoreDocument::architect

◆ comment

Core::PropertyText Core::CoreDocument::comment

◆ company

Core::PropertyText Core::CoreDocument::company

◆ compatibleInfo

Core::PropertyText Core::CoreDocument::compatibleInfo

◆ createdBy

Core::PropertyText Core::CoreDocument::createdBy

◆ creationDate

Core::PropertyText Core::CoreDocument::creationDate

◆ documentChanges

Core::PropertyIndex Core::CoreDocument::documentChanges

◆ documentGUID

Core::PropertyText Core::CoreDocument::documentGUID

◆ documentMaxID

Core::PropertyIndex Core::CoreDocument::documentMaxID

◆ documentTypeName

Core::PropertyText Core::CoreDocument::documentTypeName

◆ documentVersion

Core::PropertyText Core::CoreDocument::documentVersion

◆ filename

Core::PropertyText Core::CoreDocument::filename

◆ fileName

Base::String Core::CoreDocument::fileName

◆ lastModifiedBy

Core::PropertyText Core::CoreDocument::lastModifiedBy

◆ lastModifiedDate

Core::PropertyText Core::CoreDocument::lastModifiedDate

◆ mSolvingEnabled

bool Core::CoreDocument::mSolvingEnabled = true
protected

◆ name

Core::PropertyText Core::CoreDocument::name

◆ projectNumber

Core::PropertyText Core::CoreDocument::projectNumber

◆ signalBeforeChangeObject

boost::signals2::signal<void(const Core::DocObject&, const Core::Property&)> Core::CoreDocument::signalBeforeChangeObject

signal on visibility changed Object

signal before changing an Object

◆ signalBeforeRecompute

boost::signals2::signal<void()> Core::CoreDocument::signalBeforeRecompute

Signals before recompute.

◆ signalChangedObject

boost::signals2::signal<void(const Core::DocObject&, const Core::Property&)> Core::CoreDocument::signalChangedObject

signal on changed Object

◆ signalDefectLinks

boost::signals2::signal<void(const std::vector<Core::LinkError>&)> Core::CoreDocument::signalDefectLinks

Signals defect links from object1 to object2.

◆ signalDeletedObject

boost::signals2::signal<void(const Core::DocObject&)> Core::CoreDocument::signalDeletedObject

signal on deleted Object

◆ signalDocChanges

boost::signals2::signal<void(Core::DocChanges&)> Core::CoreDocument::signalDocChanges

Signals DocChanges (To be removed)

◆ signalNewFile

boost::signals2::signal<void()> Core::CoreDocument::signalNewFile

Signals new file.

◆ signalNewObject

boost::signals2::signal<void(const Core::DocObject&)> Core::CoreDocument::signalNewObject

signal on new Object

◆ signalRecomputed

boost::signals2::signal<void(const std::vector<Core::DocObject*>&, const std::vector<Core::DocObject*>&,const std::vector<Core::DocObject*>&)> Core::CoreDocument::signalRecomputed

Signals NewObjects, UpdatedObjects, DeletedObjects being recomputed.

◆ signalRecomputedErrorObjects

boost::signals2::signal<void(const std::map<Core::DocObject*, std::vector<std::string>>&)> Core::CoreDocument::signalRecomputedErrorObjects

Signals recomputed error DocObjects.

◆ signalRecomputeError

boost::signals2::signal<void()> Core::CoreDocument::signalRecomputeError

Signals a recompute error.


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