ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details
0005489Part 06: TTCN-3 Control InterfaceTechnicalpublic22-03-2010 14:3025-03-2010 10:54
Andrus Lehtmets 
Ina Schieferdecker 
highmajorhave not tried
closedfixed 
 
v4.2.1 (published 2010-07)v4.2.1 (published 2010-07) 
TCI C++ mapping, part 6
 Elvior
0005489: TCI C++ mapping fixes
TCI C++ mapping fixes separated from TRI ones. Fixes are agreed with MTP and INRIA.
No tags attached.
related to 0005485closed Ina Schieferdecker Part 05: TTCN-3 Runtime Interface  C++ mapping issues in TRI and TCI specifications (v. 4.1.1) 
related to 0005885closed Ina Schieferdecker Part 06: TTCN-3 Control Interface Inconsistency in mapping UniversalCharstringValue (implies platform dependency) 
doc CPP_Mapping_Fixes_for_TCI.doc (26,624) 22-03-2010 14:30
http://oldforge.etsi.org/mantis/file_download.php?file_id=2344&type=bug
zip es_20187306v040103.zip (1,360,255) 25-03-2010 10:53
http://oldforge.etsi.org/mantis/file_download.php?file_id=2362&type=bug
Issue History
22-03-2010 14:30Andrus LehtmetsNew Issue
22-03-2010 14:30Andrus LehtmetsFile Added: CPP_Mapping_Fixes_for_TCI.doc
22-03-2010 14:30Andrus LehtmetsClause Reference(s) => TCI C++ mapping, part 6
22-03-2010 14:30Andrus LehtmetsSource (company - Author) => Elvior
22-03-2010 14:56Ina SchieferdeckerRelationship addedrelated to 0005485
22-03-2010 15:50Ina SchieferdeckerProjectTTCN-3 Change Requests => Part 06: TTCN-3 Control Interface
22-03-2010 15:50Ina SchieferdeckerStatusnew => assigned
22-03-2010 15:50Ina SchieferdeckerAssigned To => Ina Schieferdecker
22-03-2010 15:59Raul AlfonsoNote Added: 0009244
22-03-2010 16:18Gyorgy RethyPrioritynormal => high
22-03-2010 16:18Gyorgy RethyTarget Version => Edition 4.2.1 (not yet published)
23-03-2010 08:04Andrus LehtmetsNote Added: 0009247
23-03-2010 08:07Ina SchieferdeckerNote Added: 0009248
23-03-2010 11:03Raul AlfonsoNote Added: 0009253
23-03-2010 11:46Andrus LehtmetsNote Added: 0009254
23-03-2010 12:58Ina SchieferdeckerNote Added: 0009260
23-03-2010 16:22Ina SchieferdeckerNote Added: 0009268
23-03-2010 16:37Ina SchieferdeckerFile Added: es_20187306v040103.zip
24-03-2010 16:15Ina SchieferdeckerNote Edited: 0009248
24-03-2010 16:15Ina SchieferdeckerNote Edited: 0009260
24-03-2010 16:16Ina SchieferdeckerNote Edited: 0009260
24-03-2010 16:16Ina SchieferdeckerNote Added: 0009285
24-03-2010 16:18Ina SchieferdeckerFile Deleted: es_20187306v040103.zip
24-03-2010 16:19Ina SchieferdeckerFile Added: es_20187306v040103.zip
24-03-2010 16:20Ina SchieferdeckerAssigned ToIna Schieferdecker => Gyorgy Rethy
24-03-2010 16:20Ina SchieferdeckerStatusassigned => resolved
24-03-2010 16:20Ina SchieferdeckerResolutionopen => fixed
24-03-2010 16:20Ina SchieferdeckerFixed in Version => Edition 4.2.1 (not yet published)
24-03-2010 16:48Ina SchieferdeckerFile Deleted: es_20187306v040103.zip
24-03-2010 16:48Ina SchieferdeckerFile Added: es_20187306v040103.zip
25-03-2010 10:53Ina SchieferdeckerFile Deleted: es_20187306v040103.zip
25-03-2010 10:53Ina SchieferdeckerFile Added: es_20187306v040103.zip
25-03-2010 10:54Ina SchieferdeckerAssigned ToGyorgy Rethy => Ina Schieferdecker
25-03-2010 10:54Ina SchieferdeckerStatusresolved => closed
25-05-2011 18:04Ina SchieferdeckerRelationship addedrelated to 0005885

Notes
(0009244)
Raul Alfonso   
22-03-2010 15:59   
MTP is disagreed with the point 2.3 of the document. For us,

  typedef wchar_t TuniversalChar

is OK.
(0009247)
Andrus Lehtmets   
23-03-2010 08:04   
"The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text." (http://en.wikipedia.org/wiki/Wide_character [^])

TuniversalChar type should not be derived from wchart_t, because the size of individual characters of TTCN-3 universal charstrings is 4 bytes. Therefore TuniversalChar should be derived from 4 bytes instead:

either like in C mapping
Universal Char typedef unsigned char TciUCValue[4]
or like Elvior proposed:
typedef unsigned long TuniversalChar
(0009248)
Ina Schieferdecker   
23-03-2010 08:07   
(edited on: 24-03-2010 16:15)
Single characters are miscellaneous types for that purpose only. Still, single characters are treated differently in the mappings:
 
Java
    Tchar --> char
    Tuniversalchar --> int
 
C
    Tchar --> char
    Tuniversalchar --> TciUCValue
 
C++
    Tchar --> char
    Tuniversalchar --> wchar_t

The simplest seems to be to agree on integer types (32 bits are enough).

(0009253)
Raul Alfonso   
23-03-2010 11:03   
wchar_t shall be as wide as necessary to hold the largest character in the code sets of the locales that an implementation supports. If one platform doesn't support all characters of ISO/IEC 10646, wchar_t will not be able to handle all characters, but I think it is a platform (or c++ compiler) restriction, not a problem in C++ mapping.
wchar_t was introduced to represent wide char and I don't see any reason to not use this type.
For example, Tinteger can not work with "all integer" and it is not a problem
(0009254)
Andrus Lehtmets   
23-03-2010 11:46   
Elvior is strongly against using wchar_t. We support Ina's suggestion to use 32 bits integer types there.
more information about problems and sizes of wchar_t when using different compilers could be found at http://hristov.com/oblog/blog/post/2009/04/07/of-wchar_t/ [^]
(0009260)
Ina Schieferdecker   
23-03-2010 12:58   
(edited on: 24-03-2010 16:16)
This would mean

Java
    Tchar --> char
    Tuniversalchar --> int
 
C
    Tchar --> char
    Tuniversalchar --> long
 
C++
    Tchar --> char
    Tuniversalchar --> long

Please let the STF know if that is ok.

(0009268)
Ina Schieferdecker   
23-03-2010 16:22   
Implemented with the following changes:

- AddressType is not a class template but a class

- using operator== instead of equals

- removed the explicitly assigned constants in 10.5.2.14 TciTypeClass as that is still under discussion

- missing semicolons were already added

- change to the mapping of universal character (in chapter 10.5.1) still open as it is under discussion
(0009285)
Ina Schieferdecker   
24-03-2010 16:16   
Agreement was finally to go for

Java
    Tchar --> char
    Tuniversalchar --> int
 
C
    Tchar --> char
    Tuniversalchar --> wchar_t
 
C++
    Tchar --> char
    Tuniversalchar --> wchar_t