ETSI's Bug Tracker - Ext Pack: Object-oriented features (ES 203 790)
View Issue Details
0007868Ext Pack: Object-oriented features (ES 203 790)[All Projects] Generalpublic26-08-2019 15:2909-01-2020 16:03
Jacob Wieland - Spirent 
Jens Grabowski 
normalminorhave not tried
closedfixed 
0007868: External classes should be allowed internal members (direct and inherited)
An external class at the moment is not allowed any internal members.

But, sometimes a default implementation based on the external functions (and possibly using some additional internal state) would be useful. At the moment, this implementation needs to be added for every internal class extending the same external class.

As this restriction does not really add anything useful and just forces duplication of code, it should be removed.

All classes marked as @external and their subclasses may add functions without bodies. These functions are implicitly external methods. Abstract methods in external classes which are also marked @abstract shall be marked @abstract (to distinguish them from the external methods). Abstract methods can also be implemented by external methods.

EXAMPLE:

type component Counter {
  var integer v_counter := 0;
}

function nextCounter() runs on Counter return integer {
  v_counter := v_counter + 1;
  return v_counter;
}

type class @abstract MyObject runs on Counter {
  const integer id;
  create() {
    this.id := nextCounter();
  }

  public function @abstract getName() return charstring;
  
  public function getId() return integer {
    return id;
  }

  public function toString() return charstring {
    return getName() & int2str(id);
  }
 
}

type class external MyExternalObject extens MyObject {
  function getName() return charstring;
}
No tags attached.
related to 0007856closed Jens Grabowski Implicit constructor shall only provide parameters for non-var fields without initializer 
related to 0007830closed Jens Grabowski Clarification request for OO features (order or member initializer and constructor) 
docx CR7868.docx (156,261) 28-08-2019 15:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=3865&type=bug
docx CR7868-2.docx (177,833) 16-12-2019 11:41
http://oldforge.etsi.org/mantis/file_download.php?file_id=3867&type=bug
docx CR7868-3.docx (156,299) 16-12-2019 17:23
http://oldforge.etsi.org/mantis/file_download.php?file_id=3876&type=bug
docx CR7868-4.docx (186,802) 18-12-2019 10:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=3890&type=bug
docx CR7868-5.docx (160,510) 18-12-2019 11:02
http://oldforge.etsi.org/mantis/file_download.php?file_id=3892&type=bug
Issue History
26-08-2019 15:29Jacob Wieland - SpirentNew Issue
27-08-2019 09:35Kristóf SzabadosNote Added: 0015465
27-08-2019 14:31Jacob Wieland - SpirentNote Added: 0015476
27-08-2019 14:31Jacob Wieland - SpirentAssigned To => Jacob Wieland - Spirent
27-08-2019 14:31Jacob Wieland - SpirentStatusnew => assigned
28-08-2019 08:19Kristóf SzabadosNote Added: 0015479
28-08-2019 15:17Jacob Wieland - SpirentFile Added: CR7868.docx
28-08-2019 15:17Jacob Wieland - SpirentNote Added: 0015491
28-08-2019 15:17Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Tomas Urban
28-08-2019 15:17Jacob Wieland - SpirentStatusassigned => confirmed
16-12-2019 11:41Tomas UrbanFile Added: CR7868-2.docx
16-12-2019 11:44Tomas UrbanNote Added: 0015519
16-12-2019 11:44Tomas UrbanStatusconfirmed => resolved
16-12-2019 11:44Tomas UrbanResolutionopen => fixed
16-12-2019 11:44Tomas UrbanAssigned ToTomas Urban => Jens Grabowski
16-12-2019 17:23Kristóf SzabadosFile Added: CR7868-3.docx
16-12-2019 17:23Kristóf SzabadosNote Added: 0015529
18-12-2019 09:25Jens GrabowskiAssigned ToJens Grabowski => Tomas Urban
18-12-2019 09:25Jens GrabowskiStatusresolved => assigned
18-12-2019 09:26Jens GrabowskiNote Added: 0015569
18-12-2019 09:27Tomas UrbanRelationship addedrelated to 0007856
18-12-2019 09:27Tomas UrbanRelationship addedrelated to 0007830
18-12-2019 10:17Tomas UrbanFile Added: CR7868-4.docx
18-12-2019 10:19Tomas UrbanNote Added: 0015573
18-12-2019 10:19Tomas UrbanAssigned ToTomas Urban => Jacob Wieland - Spirent
18-12-2019 10:19Tomas UrbanStatusassigned => confirmed
18-12-2019 11:02Jacob Wieland - SpirentFile Added: CR7868-5.docx
18-12-2019 11:03Jacob Wieland - SpirentNote Added: 0015577
18-12-2019 11:03Jacob Wieland - SpirentStatusconfirmed => resolved
18-12-2019 11:03Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Jens Grabowski
09-01-2020 16:03Jens GrabowskiStatusresolved => closed

Notes
(0015465)
Kristóf Szabados   
27-08-2019 09:35   
please note, that external classes can currently not derive from non-external classes (in your example).
(0015476)
Jacob Wieland - Spirent   
27-08-2019 14:31   
STF-discussions: allow mixing of internal members and external members in external classes and also allow deriving external classes from non classes with internal implementation parts.
(0015479)
Kristóf Szabados   
28-08-2019 08:19   
"allow deriving external classes from non classes" was actually "allow deriving external classes from non external classes"
(0015491)
Jacob Wieland - Spirent   
28-08-2019 15:17   
please review
(0015519)
Tomas Urban   
16-12-2019 11:44   
I made one simple correction, otherwise the CR is fine and resolves the raised issue. It can be added to the next version of the specification.
(0015529)
Kristóf Szabados   
16-12-2019 17:23   
minor typo fix.
"Es the underlying external constructor " -> "As the underlying external constructor "
(0015569)
Jens Grabowski   
18-12-2019 09:26   
conflicts with 7856, 7830
(0015573)
Tomas Urban   
18-12-2019 10:19   
Merged with changes from 0007856 and 0007830. Please review the merged document.
(0015577)
Jacob Wieland - Spirent   
18-12-2019 11:03   
Changed an are back to an is but otherwise, it seems fine to me.