View Issue Details

IDProjectCategoryView StatusLast Update
0028689CommunityOCCT:Application Frameworkpublic2017-04-26 14:32
ReporterVico Liang Assigned Tompv 
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Target Version7.2.0 
Summary0028689: add attribute to serialize Standard_Boolean
DescriptionIn previous version Standard_Boolean was actually integer type, In OCCT current version, Standard_Boolean is c++ bool type. It's not convinient to use TDataStd_Integer to handle Standard_Boolean any more, it is necessary to write a new attribute to save or retrieve Standard_Boolean value. The class name can be TDataStd_Boolean or TDataStd_Byte i think.
TagsNo tags attached.
Test case number

Activities

mpv

2017-04-26 11:42

developer   ~0065540

There is no need in such attribute. Normally Boolean flag is managed by presense of attribute at some label or not.

The attribute TDataStd_Tick is created for this. The method label.IsAttribute(TDataStd_Tick::GetID()) will provide the needed Boolean value (if attribute has been set, it returns true, otherwise - false). Use label.ForgetAttribute to make this flag "False".

Or any other attribute may be used in the same way. For an example, TDataStd_UAttribute allows to set as many different Booleans as you want at the same label, identified by GUIDs.

Vico Liang

2017-04-26 13:11

developer   ~0065545

Dear mpv,
You're right, i wasn't aware that TDataStd_Tick and TDataStd_UAttribute can be used to represent boolean value. So this issue can be closed without any action.
Thank you for your information, my problem is resolved.

Issue History

Date Modified Username Field Change
2017-04-25 19:11 Vico Liang New Issue
2017-04-25 19:11 Vico Liang Assigned To => mpv
2017-04-26 11:42 mpv Note Added: 0065540
2017-04-26 11:42 mpv Status new => feedback
2017-04-26 13:11 Vico Liang Note Added: 0065545
2017-04-26 14:32 abv Status feedback => closed
2017-04-26 14:32 abv Resolution open => no change required