View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027932 | Open CASCADE | OCCT:Application Framework | public | 2016-10-05 17:18 | 2016-12-09 16:39 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.0.0 | ||||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027932: Improvement of standard attributes usability | ||||
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 | ||||
Steps To Reproduce | The branch CR27932_2 was created rebased to master: the description is updated. | ||||
Additional information and documentation updates | 1)Modified sources: TDataStd TDataStd_AsciiString.cx TDataStd_AsciiString.hx TDataStd_Integer.cxx TDataStd_Integer.hxx TDataStd_Name.cxx TDataStd_Name.hxx TDataStd_Real.cxx TDataStd_Real.hxx DDataStd DDataStd_BasicCommands.cxx DDataStd_NameCommands.cxx BinLDrivers BinLDrivers.cxx BinMDataStd BinMDataStd_AsciiStringDriver.cxx BinMDataStd_IntegerDriver.cxx BinMDataStd_NameDriver.cxx BinMDataStd_RealDriver.cxx XmlMDataStd XmlMDataStd_AsciiStringDriver.cxx XmlMDataStd_IntegerDriver.cxx XmlMDataStd_NameDriver.cxx XmlMDataStd_RealDriver.cxx StdLPersistent StdLPersistent_Real.hxx StdLPersistent_Value.cxx StdLPersistent_Value.hxx Standard Standard_GUID.cxx Standard_GUID.hxx 2)Description The listed attributes (TDataStd_Integer, TDataStd_Real, TDataStd_Name, TDataStd_AsciiString) received the new feature to be user defined. It allows to set at the same Label as many attributes of the same type as you want. Let's consider it on example of the TDataStd_Real attribute. The previous version of the attribute allows to set the attribute using static method Set in next way: static Handle(TDataStd_Real) Set (const TDF_Label& label, const Standard_Real value); The is a default form which is kept by the attribute. It uses for the attribute identification the default GUID - TDataStd_Real::GetID(). In case if you want to use the new feature (user defined Real attribute), for example to define several attributes which should keep a value of the same type - Standard_Real, but to be associated with different user's notions (or objects) the new static method Set should be used. In our example we will define two Real attributes which presents two customer's objects - Density and Volume and will be put on the same Label. #define DENSITY Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2810") #define VOLUME Standard_GUID("12e9454b-6dbc-11d4-b9c8-0060b0ee2811") TDF_Label aLabel = ...; // Real attribute type with user defined GUID associated with user's object "Density" TDataStd_Real::Set(aLabel, DENSITY, 1.2); // Real attribute type with user defined GUID associated with user's object "Volume" TDataStd_Real::Set(aLabel, VOLUME, 185.5); To find an user defined Real attribute just use a corresponding GUID: Handle (TDataStd_Real anAtt; aLabel.FindAttribute (DENSITY, anAtt); | ||||
Tags | No tags attached. | ||||
Test case number | caf basic A4, A5, A6, B4, B6, E4, E5, E6, N4, N5, N6 | ||||
|
Branch CR27932 has been created by szy. SHA-1: 448e5bee3f2a1fabb00a2ccce50be368a3186ac0 Detailed log of new commits: Author: szy Date: Thu Oct 13 17:07:52 2016 +0300 0027932: Improvement of standard attributes usability. 1. Modified sources 2. Added new testing scripts |
|
Removed the limitation (one attribute of the same type per label) for the next set of standard attributes: 1)TDataStd_Integer 2)TDataStd_Real 3)TDataStd_Name 4)TDataStd_AsciiString There is no regressions. Review, please. |
|
For me it is ok. Please, continue with other attributes. |
|
Resolved. I will split content of the current issue to two parts (taking into account that one of our customers is interesting in this extension): 1)simple data: Integer, Real, Name, AsciiString 2)data containers:IntegerArray, RealArray and so on... It will allow speed up the first part of the patch. |
|
Reviewed. Test, please. |
|
Branch CR27932 has been updated forcibly by mkv. SHA-1: c21a071d4029a4a550ac56abaa9ab925ab5a7cf9 |
|
Dear BugMaster, Branch CR27932 was rebased on current master of occt git-repository. SHA-1: c21a071d4029a4a550ac56abaa9ab925ab5a7cf9 |
|
Dear BugMaster, Branch CR27932 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: c21a071d4029a4a550ac56abaa9ab925ab5a7cf9 Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 63 (63 on master) Windows: 0 (0 on master) MacOS : 1141 Regressions/Differences/Improvements: http://occt-tests/CR27932-master-OCCT/Debian70-64/summary.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/summary.html Failed: bugs step bug27313 gdt dimensions A1, A2, A3, A4, A5, A6, A7, A8, A9 gdt export A1, A2, A3, A4, A5, A6, A7, A8, A9, B1, B2, B3, B4, B5 gdt import A1, A2, A3, A4, A5 gdt presentation A1, A2, A3, A4, A9, B1, B4 gdt tolerances A1, A2 Testing cases: http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A4.html caf basic A4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A5.html caf basic A5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A6.html caf basic A6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/B4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/B4.html caf basic B4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/B6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/B6.html caf basic B6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E4.html caf basic E4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E5.html caf basic E5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E6.html caf basic E6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N4.html caf basic N4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N5.html caf basic N5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N6.html caf basic N6: OK Testing on Linux: occt component : Total MEMORY difference: 91066997 / 90394512 [+0.74%] Total CPU difference: 19299.019999999902 / 19420.269999999935 [-0.62%] products component : Total MEMORY difference: 30091122 / 30067436 [+0.08%] Total CPU difference: 5317.859999999957 / 5271.7599999999675 [+0.87%] Testing on Windows: occt component : Total MEMORY difference: 57242327 / 57250244 [-0.01%] Total CPU difference: 19022.075535598615 / 18101.186032498666 [+5.09%] products component : Total MEMORY difference: 21302191 / 21265221 [+0.17%] Total CPU difference: 5480.049928299974 / 5148.189000999964 [+6.45%] There are no differences in images found by testdiff. |
|
Dear szy, Branch CR27932 has been rejected due to: - regressions/differences/improvements |
|
Branch CR27932_1 has been created by szy. SHA-1: 16387063fdaa9eed4b55632ff06cd4b5e67ca0c9 Detailed log of new commits: Author: szy Date: Thu Oct 27 17:55:43 2016 +0300 0027932: Improvement of standard attributes usability. Extension of simple standard attributes: Integer, Real, Name, AsciiString. |
|
Regressions fixed in branch CR27932_1. |
|
Reviewed. Test, please. |
|
Branch CR27932_1 has been updated forcibly by mkv. SHA-1: d6fa7c0857830b61e408d5f41d7b1294954303d2 |
|
Dear BugMaster, Branch CR27932_1 was rebased on current master of occt git-repository. SHA-1: d6fa7c0857830b61e408d5f41d7b1294954303d2 |
|
Dear BugMaster, Branch CR27932_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: d6fa7c0857830b61e408d5f41d7b1294954303d2 Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component :1 Linux: 63 (63 on master) Windows: 0 (0 on master) MacOS : 1142 Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A4.html caf basic A4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A5.html caf basic A5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/A6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/A6.html caf basic A6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/B4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/B4.html caf basic B4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/B6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/B6.html caf basic B6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E4.html caf basic E4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E5.html caf basic E5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/E6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/E6.html caf basic E6: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N4.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N4.html caf basic N4: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N5.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N5.html caf basic N5: OK http://occt-tests/CR27932-master-OCCT/Debian70-64/caf/basic/N6.html http://occt-tests/CR27932-master-OCCT/Windows-64-VC10/caf/basic/N6.html caf basic N6: OK Testing on Linux: occt component : Total MEMORY difference: 91508883 / 90750518 [+0.84%] Total CPU difference: 19423.23999999989 / 19313.739999999896 [+0.57%] products component : Total MEMORY difference: 30570595 / 30591759 [-0.07%] Total CPU difference: 5319.779999999979 / 5294.23999999997 [+0.48%] Testing on Windows: occt component : Total MEMORY difference: 57319429 / 57321116 [-0.00%] Total CPU difference: 17968.241980298597 / 18220.18359529866 [-1.38%] products component : Total MEMORY difference: 21510427 / 21474056 [+0.17%] Total CPU difference: 5210.714201799966 / 5260.400520299964 [-0.94%] There are no differences in images found by testdiff. |
|
Dear BugMaster, Branch CR27932_1 is TESTED. |
|
Branch CR27932_1 has been updated by mkv. SHA-1: 271a0dcfcbaee9390ac36f3e20107225356f688a Detailed log of new commits: Author: mkv Date: Wed Nov 2 14:29:00 2016 +0300 Test case for issue CR27932 |
|
Dear BugMaster, additional test case was pushed to branch CR27932_1 of occt git-repository http://occt-tests/CR27932_1-master-OCCT/Debian70-64/caf/basic/B5.html http://occt-tests/CR27932_1-master-OCCT/Windows-64-VC10/caf/basic/B5.html caf basic B5: OK |
|
Branch CR27932_2 has been created by mpv. SHA-1: 0b547b55eacc9c7f53bf868c1dd46066e82f6962 Detailed log of new commits: Author: mpv Date: Tue Nov 8 11:29:14 2016 +0300 Several simple and most popular OCAF attributes are extended: TDataStd_AsciiString, TDataStd_Integer, TDataStd_Name, TDataStd_Real. Now such attribute of one type may 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 management of attributes on label stays the same. The format of stored/retrieved document is unchanged until a developer does not start to use this new functionality. Thus, the previously saved documents are fully supported, but the new documents with this extension used will be not-readable by the previous version of OCAF libraries. |
|
The branch CR27932_2 is prepared, ready for re-testing and integration into 7.1.0. |
|
Tested in scope of CR0-IR-2016-11-08 |
|
Branch CR27932 has been deleted by kgv. SHA-1: c21a071d4029a4a550ac56abaa9ab925ab5a7cf9 |
|
Branch CR27932_1 has been deleted by kgv. SHA-1: 271a0dcfcbaee9390ac36f3e20107225356f688a |
|
Branch CR27932_2 has been deleted by kgv. SHA-1: 0b547b55eacc9c7f53bf868c1dd46066e82f6962 |
occt: master fa53efef 2016-10-27 14:55:43
Committer: abv Details Diff |
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. |
Affected Issues 0027932 |
|
mod - src/BinLDrivers/BinLDrivers.cxx | Diff File | ||
mod - src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx | Diff File | ||
mod - src/BinMDataStd/BinMDataStd_IntegerDriver.cxx | Diff File | ||
mod - src/BinMDataStd/BinMDataStd_NameDriver.cxx | Diff File | ||
mod - src/BinMDataStd/BinMDataStd_RealDriver.cxx | Diff File | ||
mod - src/DDataStd/DDataStd_BasicCommands.cxx | Diff File | ||
mod - src/DDataStd/DDataStd_NameCommands.cxx | Diff File | ||
mod - src/Standard/Standard_GUID.cxx | Diff File | ||
mod - src/Standard/Standard_GUID.hxx | Diff File | ||
mod - src/StdLPersistent/StdLPersistent_Real.hxx | Diff File | ||
mod - src/StdLPersistent/StdLPersistent_Value.cxx | Diff File | ||
mod - src/StdLPersistent/StdLPersistent_Value.hxx | Diff File | ||
mod - src/TDataStd/TDataStd_AsciiString.cxx | Diff File | ||
mod - src/TDataStd/TDataStd_AsciiString.hxx | Diff File | ||
mod - src/TDataStd/TDataStd_Integer.cxx | Diff File | ||
mod - src/TDataStd/TDataStd_Integer.hxx | Diff File | ||
mod - src/TDataStd/TDataStd_Name.cxx | Diff File | ||
mod - src/TDataStd/TDataStd_Name.hxx | Diff File | ||
mod - src/TDataStd/TDataStd_Real.cxx | Diff File | ||
mod - src/TDataStd/TDataStd_Real.hxx | Diff File | ||
mod - src/XCAFDoc/XCAFDoc_Datum.cxx | Diff File | ||
mod - src/XCAFDoc/XCAFDoc_Dimension.cxx | Diff File | ||
mod - src/XCAFDoc/XCAFDoc_GeomTolerance.cxx | Diff File | ||
mod - src/XmlMDataStd/XmlMDataStd_AsciiStringDriver.cxx | Diff File | ||
mod - src/XmlMDataStd/XmlMDataStd_IntegerDriver.cxx | Diff File | ||
mod - src/XmlMDataStd/XmlMDataStd_NameDriver.cxx | Diff File | ||
mod - src/XmlMDataStd/XmlMDataStd_RealDriver.cxx | Diff File | ||
add - tests/caf/basic/A4 | Diff File | ||
add - tests/caf/basic/A5 | Diff File | ||
add - tests/caf/basic/A6 | Diff File | ||
add - tests/caf/basic/B4 | Diff File | ||
add - tests/caf/basic/B5 | Diff File | ||
add - tests/caf/basic/B6 | Diff File | ||
add - tests/caf/basic/E4 | Diff File | ||
add - tests/caf/basic/E5 | Diff File | ||
add - tests/caf/basic/E6 | Diff File | ||
add - tests/caf/basic/N4 | Diff File | ||
add - tests/caf/basic/N5 | Diff File | ||
add - tests/caf/basic/N6 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-10-05 17:18 |
|
New Issue | |
2016-10-05 17:18 |
|
Assigned To | => szy |
2016-10-05 17:19 |
|
Status | new => assigned |
2016-10-05 17:22 |
|
Description Updated | |
2016-10-13 17:08 | git | Note Added: 0058682 | |
2016-10-13 17:15 |
|
Note Added: 0058683 | |
2016-10-13 17:15 |
|
Assigned To | szy => mpv |
2016-10-13 17:15 |
|
Status | assigned => resolved |
2016-10-13 17:15 |
|
Steps to Reproduce Updated | |
2016-10-14 11:35 |
|
Additional Information Updated | |
2016-10-14 19:45 |
|
Note Added: 0058747 | |
2016-10-14 19:45 |
|
Assigned To | mpv => szy |
2016-10-14 19:45 |
|
Status | resolved => assigned |
2016-10-17 11:43 |
|
Note Added: 0058769 | |
2016-10-17 11:43 |
|
Status | assigned => resolved |
2016-10-17 11:44 |
|
Note Added: 0058770 | |
2016-10-17 11:44 |
|
Assigned To | szy => bugmaster |
2016-10-17 11:44 |
|
Status | resolved => reviewed |
2016-10-17 11:47 |
|
Assigned To | bugmaster => mkv |
2016-10-17 12:13 | git | Note Added: 0058772 | |
2016-10-17 19:30 |
|
Note Added: 0058826 | |
2016-10-17 19:31 |
|
Note Added: 0058827 | |
2016-10-17 19:32 |
|
Note Added: 0058828 | |
2016-10-17 19:32 |
|
Assigned To | mkv => szy |
2016-10-17 19:32 |
|
Status | reviewed => assigned |
2016-10-17 19:33 |
|
Test case number | => caf basic A4, A5, A6, B4, B6, E4, E5, E6, N4, N5, N6 |
2016-10-27 17:56 | git | Note Added: 0059290 | |
2016-10-27 17:58 |
|
Note Added: 0059291 | |
2016-10-27 17:58 |
|
Status | assigned => resolved |
2016-10-27 17:58 |
|
Note Added: 0059292 | |
2016-10-27 17:58 |
|
Assigned To | szy => bugmaster |
2016-10-27 17:58 |
|
Status | resolved => reviewed |
2016-10-27 18:18 |
|
Assigned To | bugmaster => mkv |
2016-10-28 15:13 | git | Note Added: 0059340 | |
2016-11-02 12:13 |
|
Note Added: 0059760 | |
2016-11-02 12:14 |
|
Note Added: 0059761 | |
2016-11-02 12:14 |
|
Note Added: 0059762 | |
2016-11-02 12:14 |
|
Assigned To | mkv => bugmaster |
2016-11-02 12:14 |
|
Status | reviewed => tested |
2016-11-02 14:29 | git | Note Added: 0059784 | |
2016-11-02 14:29 |
|
Note Added: 0059785 | |
2016-11-02 16:21 |
|
Target Version | 7.1.0 => 7.2.0 |
2016-11-03 12:25 |
|
Target Version | 7.2.0 => 7.1.0 |
2016-11-08 11:29 | git | Note Added: 0059983 | |
2016-11-08 11:31 |
|
Assigned To | bugmaster => mpv |
2016-11-08 11:31 |
|
Status | tested => assigned |
2016-11-08 11:32 |
|
Status | assigned => resolved |
2016-11-08 11:32 |
|
Steps to Reproduce Updated | |
2016-11-08 11:33 |
|
Note Added: 0059984 | |
2016-11-08 11:33 |
|
Assigned To | mpv => bugmaster |
2016-11-08 11:33 |
|
Status | resolved => reviewed |
2016-11-09 11:53 |
|
Note Added: 0060083 | |
2016-11-09 11:53 |
|
Status | reviewed => tested |
2016-11-09 17:43 |
|
Changeset attached | => occt master fa53efef |
2016-11-09 17:43 |
|
Assigned To | bugmaster => abv |
2016-11-09 17:43 |
|
Status | tested => verified |
2016-11-09 17:43 |
|
Resolution | open => fixed |
2016-12-07 11:25 | git | Note Added: 0061207 | |
2016-12-07 11:25 | git | Note Added: 0061208 | |
2016-12-07 11:30 | git | Note Added: 0061251 | |
2016-12-09 16:30 |
|
Status | verified => closed |
2016-12-09 16:39 |
|
Fixed in Version | => 7.1.0 |