MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #27932 All Revisions ] Back to Issue ]
Summary 0027932: Improvement of standard attributes usability
Revision 2016-10-05 17:22 by szy
Description Current OCAF approach allows to set on the same label only one Attribute of the same type, for example only one TDataStd_Real attribute.
It is proposed to remove this limitation by adding so called 'user defined' feature to the attribute. I.e. it is proposed to keep GUID (identifying the attribute) as internal field. For example, TDataStd_Real could use the following syntax to set attribute to the given label:

#define DENSITY Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2810")
#define VOLUME Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2811")
TDF_Label aLabel;
TDataStd_Real::Set(aLabel, 1.1); // the current API
TDataStd_Real::Set(aLabel, DENSITY, 1.2);// same attribute type with user defined GUID
TDataStd_Real::Set(aLabel, VOLUME, 1.3); // same attribute type with user defined GUID

The next list of attributes is supposed to be modified:
TDataStd_Real
TDataStd_Integer
TDataStd_Name
TDataStd_AsciiString

TDataStd_RealArray
TDataStd_IntegerArray
TDataStd_BooleanArray
TDataStd_ReferenceArray
TDataStd_ByteArray
TDataStd_ExtStringArray

TDataStd_RealList
TDataStd_IntegerList
TDataStd_BooleanList
TDataStd_ExtStringList
TDataStd_ReferenceList
TDataStd_ListOfByte

TDataStd_IntPackedMap
Revision 2016-10-05 17:18 by szy
Description Current OCAF approach allows to set on the same label only one Attribute of the same type, for example only one TDataStd_Real attribute.
It is proposed to remove this limitation by adding so called 'user defined' feature to the attribute. I.e. it is proposed to keep GUID (identifying the attribute) as internal field. For example, TDataStd_Real could use the following syntax to set attribute to the given label:

#define DENSITY Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2810")
#define VOLUME Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2811")
TDF_Label aLabel;
TDataStd_Real::Set(aLabel, 1.1); // the current API
TDataStd_Real::Set(aLabel, DENSITY, 1.2);// same attribute type with user defined GUID
TDataStd_Real::Set(aLabel, VOLUME, 1.3); // same attribute type with user defined GUID


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker