ETSI's Bug Tracker - Ext Pack: Object-oriented features (ES 203 790)
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007868 | Ext Pack: Object-oriented features (ES 203 790) | [All Projects] General | public | 26-08-2019 15:29 | 09-01-2020 16:03

Reporter | Jacob Wieland - Spirent |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |

Summary | 0007868: External classes should be allowed internal members (direct and inherited)

Description

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;
}

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0007856 | closed | Jens Grabowski | Implicit constructor shall only provide parameters for non-var fields without initializer
related to | 0007830 | closed | Jens Grabowski | Clarification request for OO features (order or member initializer and constructor)

Attached Files

CR7868.docx (156,261) 28-08-2019 15:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=3865&type=bug
CR7868-2.docx (177,833) 16-12-2019 11:41
http://oldforge.etsi.org/mantis/file_download.php?file_id=3867&type=bug
CR7868-3.docx (156,299) 16-12-2019 17:23
http://oldforge.etsi.org/mantis/file_download.php?file_id=3876&type=bug
CR7868-4.docx (186,802) 18-12-2019 10:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=3890&type=bug
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
Date Modified | Username | Field | Change
26-08-2019 15:29 | Jacob Wieland - Spirent | New Issue |
27-08-2019 09:35 | KristÃ³f Szabados | Note Added: 0015465 |
27-08-2019 14:31 | Jacob Wieland - Spirent | Note Added: 0015476 |
27-08-2019 14:31 | Jacob Wieland - Spirent | Assigned To | => Jacob Wieland - Spirent
27-08-2019 14:31 | Jacob Wieland - Spirent | Status | new => assigned
28-08-2019 08:19 | KristÃ³f Szabados | Note Added: 0015479 |
28-08-2019 15:17 | Jacob Wieland - Spirent | File Added: CR7868.docx |
28-08-2019 15:17 | Jacob Wieland - Spirent | Note Added: 0015491 |
28-08-2019 15:17 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
28-08-2019 15:17 | Jacob Wieland - Spirent | Status | assigned => confirmed
16-12-2019 11:41 | Tomas Urban | File Added: CR7868-2.docx |
16-12-2019 11:44 | Tomas Urban | Note Added: 0015519 |
16-12-2019 11:44 | Tomas Urban | Status | confirmed => resolved
16-12-2019 11:44 | Tomas Urban | Resolution | open => fixed
16-12-2019 11:44 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
16-12-2019 17:23 | KristÃ³f Szabados | File Added: CR7868-3.docx |
16-12-2019 17:23 | KristÃ³f Szabados | Note Added: 0015529 |
18-12-2019 09:25 | Jens Grabowski | Assigned To | Jens Grabowski => Tomas Urban
18-12-2019 09:25 | Jens Grabowski | Status | resolved => assigned
18-12-2019 09:26 | Jens Grabowski | Note Added: 0015569 |
18-12-2019 09:27 | Tomas Urban | Relationship added | related to 0007856
18-12-2019 09:27 | Tomas Urban | Relationship added | related to 0007830
18-12-2019 10:17 | Tomas Urban | File Added: CR7868-4.docx |
18-12-2019 10:19 | Tomas Urban | Note Added: 0015573 |
18-12-2019 10:19 | Tomas Urban | Assigned To | Tomas Urban => Jacob Wieland - Spirent
18-12-2019 10:19 | Tomas Urban | Status | assigned => confirmed
18-12-2019 11:02 | Jacob Wieland - Spirent | File Added: CR7868-5.docx |
18-12-2019 11:03 | Jacob Wieland - Spirent | Note Added: 0015577 |
18-12-2019 11:03 | Jacob Wieland - Spirent | Status | confirmed => resolved
18-12-2019 11:03 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
09-01-2020 16:03 | Jens Grabowski | Status | resolved => 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.