mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027932: Improvement of standard attributes usability.
OCAF attributes TDataStd_AsciiString, TDataStd_Integer, TDataStd_Name, TDataStd_Real are extended by possibility to use custom GUID. Now multiple attributes of any of these types can be placed at the same label using different user-defined GUIDs. For this new "Set" methods were added into each attribute, which takes this custom GUID as an argument. Other aspects of management of attributes on labels remain the same. Version number of persistent OCAF documents is incremented. However, the attributes are stored in the same way unless non-standard GUID is used for particular attribute. Previously saved documents are fully supported, but the new documents with this extension used will be non-readable by the previous version of OCAF libraries.
This commit is contained in:
@@ -47,14 +47,10 @@ class StdLPersistent_Value
|
||||
};
|
||||
|
||||
public:
|
||||
typedef integer <TDataStd_Integer> Integer;
|
||||
typedef integer <TDF_TagSource> TagSource;
|
||||
|
||||
typedef string <TDF_Reference> Reference;
|
||||
typedef string <TDataStd_Name> Name;
|
||||
typedef integer <TDF_TagSource> TagSource;
|
||||
typedef string <TDF_Reference> Reference;
|
||||
typedef string <TDataStd_Comment> Comment;
|
||||
typedef string <TDataStd_AsciiString,
|
||||
StdLPersistent_HString::Ascii> AsciiString;
|
||||
|
||||
class UAttribute : public string <TDataStd_UAttribute>
|
||||
{
|
||||
@@ -62,6 +58,27 @@ public:
|
||||
//! Create an empty transient attribuite
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
|
||||
};
|
||||
|
||||
class Integer : public integer <TDataStd_Integer>
|
||||
{
|
||||
public:
|
||||
//! Create an empty transient attribuite
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
|
||||
};
|
||||
|
||||
class Name : public string <TDataStd_Name>
|
||||
{
|
||||
public:
|
||||
//! Create an empty transient attribuite
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
|
||||
};
|
||||
|
||||
class AsciiString : public string <TDataStd_AsciiString, StdLPersistent_HString::Ascii>
|
||||
{
|
||||
public:
|
||||
//! Create an empty transient attribuite
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user