ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0005804 | Part 06: TTCN-3 Control Interface | New Feature | public | 11-11-2010 13:04 | 30-12-2010 17:07

Reporter | tepelmann |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.1.1 (published 2009-06) |
Target Version | v4.3.1 (published 2011-06) | Fixed in Version | v4.3.1 (published 2011-06) |
Clause Reference(s) | 7.2.2.2.13,8.3.4.13, 9.2, 10.5.3.14
Source (company - Author) | tepelmann

Summary | 0005804: EnumratedValue needs new method/function getInt
Description | In the TTCN-3 core standard we can find meanwhile the enum2int and upcoming the int2enum predefined function. We propose to also give in the TCI the possibility to retrieve the integer value as assigned in TTCN-3 (explicitly or implicitly) and to set the integer value.
Steps To Reproduce |
Additional Information | E.g. for Java IntegerValue getInt(); void setInt(IntegerValue enumIntValue); or for ANSI-C IntegerValue tciGetEnumValueInt(Value inst); void tciSetEnumValueInt(Value inst, IntegerValue enumIntValue);
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
11-11-2010 13:04 | tepelmann | New Issue |
11-11-2010 13:04 | tepelmann | Clause Reference(s) | => 7.2.2.2.13,8.3.4.13, 9.2, 10.5.3.14
11-11-2010 13:04 | tepelmann | Source (company - Author) | => tepelmann
30-11-2010 16:58 | Gyorgy Rethy | Note Added: 0009866 |
30-11-2010 16:58 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
30-11-2010 16:58 | Gyorgy Rethy | Status | new => assigned
30-11-2010 16:58 | Gyorgy Rethy | Target Version | => Edition 4.3.1 (not yet published)
30-12-2010 17:06 | Ina Schieferdecker | Note Added: 0009984 |
30-12-2010 17:07 | Ina Schieferdecker | Status | assigned => resolved
30-12-2010 17:07 | Ina Schieferdecker | Resolution | open => fixed
30-12-2010 17:07 | Ina Schieferdecker | Fixed in Version | => Edition 4.3.1 (not yet published)
30-12-2010 17:07 | Ina Schieferdecker | Status | resolved => closed

Notes

(0009866)
Gyorgy Rethy
30-11-2010 16:58

STF discussion 30-11-2010: comment is correct

(0009984)
Ina Schieferdecker
30-12-2010 17:06

Defined basically as proposed:
/* Abstract Data */
7.2.2.2.13 The abstract data type EnumeratedValue
TInteger getInt() Returns the integer value of this EnumeratedValue. This integer equals the user-assigned integer value in the TTCN 3 specification or the automatically assigned integer value.
setInt(in TInteger intValue) Sets the integer value of this EnumeratedValue. This integer should equal the user-assigned integer value in the TTCN 3 specification or the automatically assigned integer value.
/* Java */
8.3.4.13 EnumeratedValue
EnumeratedValue is mapped to the following interface:
// TCI IDL EnumeratedValue
package org.etsi.ttcn.tci;
public interface EnumeratedValue {
String getEnum ();
void setEnum (String enumValue);
int getInt();
void setInt(int intValue);
}
/* C */
9.2 Value interfaces
Tinteger getInt() unsigned long tciGetEnumInt(Value inst);
setInt(in Tinteger intValue) void tciSetEnumInt(Value inst, unsigned long intValue);
/* C++ */
10.5.3.14 EnumeratedValue
TTCN-3 enumerated value support. It is mapped to the following pure virtual class:
class EnumeratedValue : public virtual TciValue {
public:
virtual ~EnumeratedValue ();
virtual const Tstring & getEnum () const =0;
virtual void setEnum (const Tstring &p_value)=0;
virtual Tinteger getInt() const =0;
virtual void setInt(Tinteger p_int);
virtual Tboolean operator== (const EnumeratedValue &enumVal) const =0;
virtual EnumeratedValue * clone () const =0;
virtual Tboolean operator< (const EnumeratedValue &enumVal) const =0;
}
/* XSD */
11.3.3.17 EnumeratedValue
EnumeratedValue is mapped to the following complex type:
<xsd:complexType name="EnumeratedValue">
<xsd:choice>
<xsd:element name="value" type="SimpleTypes:TString"/>
<xsd:element name="intValue" type="SimpleTypes:TInteger" minOccurs="0"/>
<xsd:element name="null" type="Templates:null"/>
<xsd:element name="omit" type="Templates:omit"/>
</xsd:choice>
</xsd:sequence>
<xsd:attributeGroup ref="Values:ValueAtts"/>
</xsd:complexType>
/* C# */
12.4.4.13 EnumeratedValue
EnumeratedValue is mapped to the following interface:
public interface ITciEnumeratedValue : ITciValue {
string EnumValue { get; set; }
int IntValue { get; set; }
}