DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0031226

Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value

Open CASCADEOCCT:Foundation Classesclosed22 public notes

Search issues

Description

The method TCollection_AsciiString::IsRealValue() of the TCollection_AsciiString class returns true if a string contains a non-real value (e.g. "9999a9").

Steps to reproduce

Not required

Public activity

22 archived notes

Participants are labeled by their role within this record.

01Commenter 1
This is historic implementation of method TCollection_AsciiString::IsRealValue() - it always returned true if the string was started with some characters that can be interpreted as integer or real value. I propose we can document this in the comment to the method, but it is better not to change behavior as it can break some existig code. Perhaps additional Boolean argument can be added indicating the need for a strict check.
02Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
03Commenter 3
+  //! theToCheckFull - argument indicating the need for a strict check is the AsciiString a real value.

Please use @param syntax for documenting arguments.
> argument indicating the need for a strict check is the AsciiString a real value.
when TRUE, checks if entire string defines a real value;
otherwise checks if string starts with a real value
04Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Thu Dec 17 13:21:18 2020 +0300

    kgv remarks:
    - changed description of TCollection_AsciiString::IsRealValue

05Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
06Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Thu Dec 17 14:14:18 2020 +0300

    # fixed code style

07Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
08Commenter 3
Please update existing places of IsRealValue() usage in ViewerTest to use new flag and add a test case.

09Commenter 3
There is OCC11758 command in QABugs_19.cxx which can be extended to verify IsRealValue() in unit-test alike style.
10Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Fri Dec 18 14:26:35 2020 +0300

    # kgv remarks
     - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
     - Updated existing places of IsRealValue() usage in ViewerTest to use new flag

11Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict
    - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
    - Updated existing places of IsRealValue() usage in ViewerTest to use new flag
12Commenter 3
Please fix compiler warnings:

/dn62/builds/CR31226_3-master-KGV/OCCT_SRC/src/TCollection/TCollection_AsciiString.cxx: In member function 'Standard_Boolean TCollection_AsciiString::IsRealValue(Standard_Boolean) const':
/dn62/builds/CR31226_3-master-KGV/OCCT_SRC/src/TCollection/TCollection_AsciiString.cxx:772:23: warning: NULL used in arithmetic [-Wpointer-arith]
[  2%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/Message/Message_Messenger.cxx.o
13Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Fri Dec 18 16:53:58 2020 +0300

    # replaced NULL by '\0'

14Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict
    - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
    - Updated existing places of IsRealValue() usage in ViewerTest to use new flag
15Commenter 2
Branch [archived branch] has been updated by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
Date: Fri Dec 18 22:14:28 2020 +0300

    # fix misprint in test case

16Commenter 3
Please raise the patch
- OCCT branch: [archived branch]

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31226_4-master-KGV/
17Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
18Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
19Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
20Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
21Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
22Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records