ETSI's Bug Tracker - Ext Pack: Advanced Parametrization (ES 202 784)
View Issue Details
0007853Ext Pack: Advanced Parametrization (ES 202 784)Clarificationpublic07-08-2019 09:4017-12-2019 10:22
Jacob Wieland - Spirent 
Jens Grabowski 
normalminorhave not tried
closedfixed 
 
v1.6.1 (published 2017-04) 
0007853: classes should allow type parameterization
If a TTCN-3 class shall be mapped to an external class which is generic over types, it should be possible to also model this in TTCN-3 as a generic class.

This will allow mapping of external generic libraries like collections to TTCN-3 without loss of generality.

Example:

type external class @abstract Iterator<T> {
  function hasNext() return boolean;
  function next() return T;
}

type external class @abstract Container<T> {
  function iterator() return Iterator<T>;
  function size() return integer;
  function isEmpty() return boolean;
}

type external class Set<T> extends Container<T> {
}

type external class List<T> extends Container<T> {
}

type external class MapEntr<Key, Value> {
  function getKey() return Key;
  function getValue() return Value;
}

type external class Map<Key,Value> {
  function get(Key key) return Value;
  function put(Key key, Value val);
  function keySet() return Set<Key>;
  function values() return List<Value>;
  function entrySet() return Set<MapEntry<Key, Value>>;
  function containsKey(Key key) return boolean;
  function contains(Value val) return boolean;
}
No tags attached.
docx CR7853.docx (153,932) 08-08-2019 10:02
http://oldforge.etsi.org/mantis/file_download.php?file_id=3845&type=bug
docx CR7853-2.docx (179,778) 08-08-2019 11:29
http://oldforge.etsi.org/mantis/file_download.php?file_id=3847&type=bug
Issue History
07-08-2019 09:40Jacob Wieland - SpirentNew Issue
07-08-2019 09:40Jacob Wieland - SpirentStatusnew => assigned
07-08-2019 09:40Jacob Wieland - SpirentAssigned To => Jacob Wieland - Spirent
07-08-2019 12:30Kristóf SzabadosProjectExt Pack: Object-oriented features (ES 203 790) => Ext Pack: Advanced Parametrization (ES 202 784)
08-08-2019 10:02Jacob Wieland - SpirentFile Added: CR7853.docx
08-08-2019 10:03Jacob Wieland - SpirentNote Added: 0015429
08-08-2019 10:03Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Tomas Urban
08-08-2019 10:03Jacob Wieland - SpirentStatusassigned => confirmed
08-08-2019 11:29Tomas UrbanFile Added: CR7853-2.docx
08-08-2019 11:32Tomas UrbanNote Added: 0015432
08-08-2019 11:32Tomas UrbanAssigned ToTomas Urban => Jacob Wieland - Spirent
08-08-2019 11:32Tomas UrbanCategoryGeneral => Clarification
08-08-2019 13:12Jacob Wieland - SpirentStatusconfirmed => resolved
08-08-2019 13:12Jacob Wieland - SpirentFixed in Version => v1.6.1 (published 2017-04)
08-08-2019 13:12Jacob Wieland - SpirentResolutionopen => fixed
08-08-2019 13:12Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Jens Grabowski
17-12-2019 10:22Jens GrabowskiStatusresolved => closed

Notes
(0015429)
Jacob Wieland - Spirent   
08-08-2019 10:03   
please review
(0015432)
Tomas Urban   
08-08-2019 11:32   
The proposal is fine. I only changed the font from bold to normal in the example (only keywords should be bold) and added p_ prefixes to the parameters to follow the standard naming convention. Please check.