|
SHAPER
9.15.0
|
General object of the application that allows to get/set attributes from the document and compute result of an operation. More...

Public Member Functions | |
| virtual std::wstring | name ()=0 |
| Returns the name of the feature visible by the user in the object browser. More... | |
| virtual std::wstring | name (std::shared_ptr< GeomAPI_Shape > theSubShape)=0 |
| Returns the name of the shape. More... | |
| virtual void | setName (const std::wstring &theName)=0 |
| Defines the name of the feature visible by the user in the object browser. More... | |
| virtual bool | hasUserDefinedName () const =0 |
Return true if the object has been renamed by the user. More... | |
| virtual std::string | version ()=0 |
| Returns version of the feature (empty string if not applicable) More... | |
| virtual void | setVersion (const std::string &theVersion)=0 |
| Initialize the version of the feature. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeDocRef > | document (const std::string &theID)=0 |
| Returns the attribute that references to another document. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeDouble > | real (const std::string &theID)=0 |
| Returns the attribute that contains real value with double precision. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeDoubleArray > | realArray (const std::string &theID)=0 |
| Returns the attribute that contains double values array. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeInteger > | integer (const std::string &theID)=0 |
| Returns the attribute that contains integer value. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeReference > | reference (const std::string &theID)=0 |
| Returns the attribute that contains reference to a feature. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeSelection > | selection (const std::string &theID)=0 |
| Returns the attribute that contains selection to a shape. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeSelectionList > | selectionList (const std::string &theID)=0 |
| Returns the attribute that contains selection to a shape. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeRefAttr > | refattr (const std::string &theID)=0 |
| Returns the attribute that contains reference to an attribute of a feature. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeRefList > | reflist (const std::string &theID)=0 |
| Returns the attribute that contains list of references to features. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeRefAttrList > | refattrlist (const std::string &theID)=0 |
| Returns the attribute that contains list of references to features or reference to an attribute of a feature. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeBoolean > | boolean (const std::string &theID)=0 |
| Returns the attribute that contains boolean value. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeString > | string (const std::string &theID)=0 |
| Returns the attribute that contains boolean value. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeIntArray > | intArray (const std::string &theID)=0 |
| Returns the attribute that contains integer values array. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeStringArray > | stringArray (const std::string &theID)=0 |
| Returns the attribute that contains string values array. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeImage > | image (const std::string &theID)=0 |
| Returns the attribute that contains image. More... | |
| virtual std::shared_ptr< ModelAPI_AttributeTables > | tables (const std::string &theID)=0 |
| Returns the attribute that contains tables. More... | |
| virtual std::shared_ptr< ModelAPI_Attribute > | attribute (const std::string &theID)=0 |
| Returns the generic attribute by identifier. More... | |
| virtual std::list< std::shared_ptr< ModelAPI_Attribute > > | attributes (const std::string &theType)=0 |
| Returns all attributes of the feature of the given type or all attributes if "theType" is empty. More... | |
| virtual std::list< std::string > | attributesIDs (const std::string &theType)=0 |
| Returns all attributes ids of the feature of the given type or all attributes if "theType" is empty. More... | |
| virtual const std::string & | id (const std::shared_ptr< ModelAPI_Attribute > &theAttr)=0 |
| Identifier by the id (not fast, iteration by map) More... | |
| virtual bool | isEqual (const std::shared_ptr< ModelAPI_Data > &theData)=0 |
| Returns true if data belongs to same features. More... | |
| virtual bool | isValid ()=0 |
| Returns true if it is correctly connected to the data model. More... | |
| virtual std::shared_ptr< ModelAPI_Attribute > | addAttribute (const std::string &theID, const std::string theAttrType, const int theIndex=-1)=0 |
| Initializes object by the attributes: must be called just after the object is created for each attribute of the object. More... | |
| virtual std::shared_ptr< ModelAPI_Attribute > | addFloatingAttribute (const std::string &theID, const std::string theAttrType, const std::string &theGroup)=0 |
| Adds a floating attribute (that may be added/removed during the data life) More... | |
| virtual void | allGroups (std::list< std::string > &theGroups)=0 |
| Returns all groups of this data (ordered). More... | |
| virtual void | attributesOfGroup (const std::string &theGroup, std::list< std::shared_ptr< ModelAPI_Attribute > > &theAttrs)=0 |
| Returns an ordered list of attributes that belong to the given group. More... | |
| virtual void | removeAttributes (const std::string &theGroup)=0 |
| Remove all attributes of the given group. More... | |
| virtual void | sendAttributeUpdated (ModelAPI_Attribute *theAttr)=0 |
| Useful method for "set" methods of the attributes: sends an UPDATE event and makes attribute initialized. More... | |
| virtual bool | blockSendAttributeUpdated (const bool theBlock, const bool theSendMessage=true)=0 |
| Blocks sending "attribute updated" if theBlock is true. More... | |
| virtual void | erase ()=0 |
| Erases all the data from the data model. More... | |
| virtual | ~ModelAPI_Data () |
| To virtually destroy the fields of successors. More... | |
| virtual void | execState (const ModelAPI_ExecState theState)=0 |
| Stores the state of the object to execute it later accordingly. More... | |
| virtual ModelAPI_ExecState | execState ()=0 |
| Returns the state of the latest execution of the feature. More... | |
| virtual void | setError (const std::string &theError, bool theSend=true)=0 |
| Registers error during the execution, causes the ExecutionFailed state. More... | |
| virtual std::string | error () const =0 |
| Returns error, arose during the execution. More... | |
| virtual int | featureId () const =0 |
| Returns the identifier of feature-owner, unique in this document. More... | |
| virtual const std::set< std::shared_ptr< ModelAPI_Attribute > > & | refsToMe ()=0 |
| returns all objects referenced to this More... | |
| virtual void | referencesToObjects (std::list< std::pair< std::string, std::list< std::shared_ptr< ModelAPI_Object > > > > &theRefs)=0 |
| returns all references by attributes of this data More... | |
| virtual void | copyTo (std::shared_ptr< ModelAPI_Data > theTarget)=0 |
| Copies all attributes content into theTarget data. More... | |
| virtual std::shared_ptr< ModelAPI_Data > | invalidPtr ()=0 |
| Returns the invalid data pointer (to avoid working with NULL shared pointers in swig) More... | |
| virtual int | updateID ()=0 |
| Identifier of the transaction when object (feature or result) was updated last time. More... | |
| virtual void | setUpdateID (const int theID)=0 |
| Identifier of the transaction when object (feature or result) was updated last time. More... | |
| virtual std::shared_ptr< ModelAPI_Object > | owner ()=0 |
| Returns the owner of this data. More... | |
| virtual bool | isDeleted ()=0 |
| Returns true if the object is deleted, but some data is still kept in memory. More... | |
| virtual void | setIsDeleted (const bool theFlag)=0 |
| Sets true if the object is deleted, but some data is still kept in memory. More... | |
| virtual bool | isPrecedingAttribute (const std::string &theAttribute1, const std::string &theAttribute2) const =0 |
Returns true if theAttribute1 is going earlier than theAttribute2 in the data. More... | |
Protected Member Functions | |
| ModelAPI_Data () | |
| Objects are created for features automatically. More... | |
| virtual bool | isInHistory ()=0 |
| Returns true if "is in history" custom behaviors is defined for the feature. More... | |
| virtual void | setIsInHistory (const bool theFlag)=0 |
| Defines the custom "is in history" behavior. More... | |
| virtual bool | isDisplayed ()=0 |
| Returns true if object must be displayed in the viewer: flag is stored in the data model, so on undo/redo, open/save or recreation of object by history-playing it keeps the original state in the current transaction. More... | |
| virtual void | setDisplayed (const bool theDisplay)=0 |
| Sets the displayed/hidden state of the object. More... | |
Friends | |
| class | ModelAPI_Object |
General object of the application that allows to get/set attributes from the document and compute result of an operation.
|
virtual |
To virtually destroy the fields of successors.
|
protected |
Objects are created for features automatically.
|
pure virtual |
Returns the name of the feature visible by the user in the object browser.
Implemented in Model_Data.
|
pure virtual |
Returns the name of the shape.
Implemented in Model_Data.
|
pure virtual |
Defines the name of the feature visible by the user in the object browser.
Implemented in Model_Data.
|
pure virtual |
Return true if the object has been renamed by the user.
Implemented in Model_Data.
|
pure virtual |
Returns version of the feature (empty string if not applicable)
Implemented in Model_Data.
|
pure virtual |
Initialize the version of the feature.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that references to another document.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains real value with double precision.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains double values array.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains integer value.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains reference to a feature.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains selection to a shape.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains selection to a shape.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains reference to an attribute of a feature.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains list of references to features.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains list of references to features or reference to an attribute of a feature.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains boolean value.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains boolean value.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains integer values array.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains string values array.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains image.
Implemented in Model_Data.
|
pure virtual |
Returns the attribute that contains tables.
Implemented in Model_Data.
|
pure virtual |
Returns the generic attribute by identifier.
| theID | identifier of the attribute |
Implemented in Model_Data.
|
pure virtual |
Returns all attributes of the feature of the given type or all attributes if "theType" is empty.
Implemented in Model_Data.
|
pure virtual |
Returns all attributes ids of the feature of the given type or all attributes if "theType" is empty.
Implemented in Model_Data.
|
pure virtual |
Identifier by the id (not fast, iteration by map)
| theAttr | attribute already created in this data |
Implemented in Model_Data.
|
pure virtual |
Returns true if data belongs to same features.
Implemented in Model_Data.
|
pure virtual |
Returns true if it is correctly connected to the data model.
Implemented in Model_Data.
|
pure virtual |
Initializes object by the attributes: must be called just after the object is created for each attribute of the object.
| theID | identifier of the attribute that can be referenced by this ID later |
| theAttrType | type of the created attribute (received from the type method) |
| theIndex | index of the attribute in the internal data structure, for not-floating attributes it is -1 to let it automatically be added |
Implemented in Model_Data.
|
pure virtual |
Adds a floating attribute (that may be added/removed during the data life)
| theID | identifier of the attribute that can be referenced by this ID later |
| theAttrType | type of the created attribute (received from the type method) |
| theGroup | identifier of the group this attribute belongs to, may be an empty string |
Implemented in Model_Data.
|
pure virtual |
Returns all groups of this data (ordered).
Implemented in Model_Data.
|
pure virtual |
Returns an ordered list of attributes that belong to the given group.
Implemented in Model_Data.
|
pure virtual |
Remove all attributes of the given group.
Implemented in Model_Data.
|
pure virtual |
Useful method for "set" methods of the attributes: sends an UPDATE event and makes attribute initialized.
Implemented in Model_Data.
|
pure virtual |
Blocks sending "attribute updated" if theBlock is true.
| theID | identifier of the attribute that can be referenced by this ID later |
| theAttrType | type of the created attribute (received from the type method) |
Implemented in Model_Data.
|
pure virtual |
Erases all the data from the data model.
Implemented in Model_Data.
|
pure virtual |
Stores the state of the object to execute it later accordingly.
Implemented in Model_Data.
|
pure virtual |
Returns the state of the latest execution of the feature.
Implemented in Model_Data.
|
pure virtual |
Registers error during the execution, causes the ExecutionFailed state.
Implemented in Model_Data.
|
pure virtual |
Returns error, arose during the execution.
Implemented in Model_Data.
|
pure virtual |
Returns the identifier of feature-owner, unique in this document.
Implemented in Model_Data.
|
pure virtual |
returns all objects referenced to this
Implemented in Model_Data.
|
pure virtual |
returns all references by attributes of this data
| theRefs | returned list of pairs: id of referenced attribute and list of referenced objects |
Implemented in Model_Data.
|
pure virtual |
Copies all attributes content into theTarget data.
Implemented in Model_Data.
|
pure virtual |
Returns the invalid data pointer (to avoid working with NULL shared pointers in swig)
Implemented in Model_Data.
|
pure virtual |
Identifier of the transaction when object (feature or result) was updated last time.
Implemented in Model_Data.
|
pure virtual |
Identifier of the transaction when object (feature or result) was updated last time.
This method is called by the updater.
Implemented in Model_Data.
|
pure virtual |
Returns the owner of this data.
Implemented in Model_Data.
|
pure virtual |
Returns true if the object is deleted, but some data is still kept in memory.
Implemented in Model_Data.
|
pure virtual |
Sets true if the object is deleted, but some data is still kept in memory.
Implemented in Model_Data.
|
pure virtual |
Returns true if theAttribute1 is going earlier than theAttribute2 in the data.
|
protectedpure virtual |
Returns true if "is in history" custom behaviors is defined for the feature.
Implemented in Model_Data.
|
protectedpure virtual |
Defines the custom "is in history" behavior.
Implemented in Model_Data.
|
protectedpure virtual |
Returns true if object must be displayed in the viewer: flag is stored in the data model, so on undo/redo, open/save or recreation of object by history-playing it keeps the original state in the current transaction.
|
protectedpure virtual |
Sets the displayed/hidden state of the object.
If it is changed, sends the "redisplay" signal.