|
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::DocObject * | copyObject (Core::DocObject *o, DocObjectMap ©Map) |
| 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::DocObject * | copyObject (Core::DocObject *o) |
|
Core::DocObject * | copyToDifferentType (Core::DocObject *o, Base::Type typeToCreate, DocObjectMap ©Map) |
| Creates an object of type 'typeToCreate' and copy properties from 'o' to it. Provides map of pairs original-copy. More...
|
|
Core::DocObject * | copySharedObject (Core::DocObject *o, DocObjectMap ©Map) |
| 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::DocObject * | createObjectFromTypeName (const char *typeName) |
| Creates an object from type name and adds it to the document. More...
|
|
Core::DocObject * | createObjectFromType (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::DocObject * | getObjectByGlobalId (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...
|
|
|
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::DocObject * | getObjectById (const DocObject::IdType &id) const |
| Returns the object with this id. More...
|
|
Core::DocObject * | getObjectByUserName (const Base::String &s) const |
| Returns the object with this userName. More...
|
|
void | setRecommendFileNameForSave (const Base::String &s) |
|
virtual void | emitAndNotify (Core::DocChanges &aDocChanges) |
|
| PropertyContainer (void) |
|
| PropertyContainer (const PropertyContainer &rhs) |
|
virtual | ~PropertyContainer (void)=default |
|
bool | addProperty (Core::Property *p, const std::string &name) |
|
Core::Property * | addProperty (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::PropertyUser * | addPropertyUser (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::Property * | getPropertyByName (const std::string &name) const |
| Returns the property with name 'name'. Returns '0' on failure. More...
|
|
Core::Property * | getPropertyByName (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 > |
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::Variant > | getKeyValueMap () 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::Property * | addDynamicProperty (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::Property * | getDynamicPropertyByName (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::PropertyValueMap & | getLastValidPropertyMap () const |
| Returns the last valid PropertyValueMap. More...
|
|
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...
|
|
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) |
|
BaseClass * | operator-> () |
|
BaseClass * | operator-> () const |
|
| BaseClass ()=default |
| Construction. More...
|
|
virtual | ~BaseClass () |
| Destruction. More...
|
|
| 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 () |
|
|
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 ObjectTypeMap & | getTypeMap () const |
|
void | addPropertyLinkError (const std::string &from, const std::string &to) |
|
const DocumentState & | getDocumentState () 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< PropertyLinkDesc > | getLinkDescByProperties (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::DocObject * | addImmutableObjectMaterial (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::DocObject * | getImmutableObjectWithSameValues (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::DocObject * | restoreObject (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 ObjectMap & | getObjectMap () 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 () |
|