Commit 01bbc578 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

updated to the latest fixes.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 5a0b7515
......@@ -285,7 +285,8 @@ public class TitanCharacter_String_identification_context__negotiation_template
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int l_idx=0; l_idx<list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 0; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).match_omit_(legacy)) {
return template_selection==template_sel.VALUE_LIST;
}
......@@ -410,13 +411,15 @@ public class TitanCharacter_String_identification_context__negotiation_template
}
return true;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (int list_count = 0; list_count < list_value.size(); list_count++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_value.get(list_count).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching an uninitialized/unsupported template of type CHARACTER STRING.identification.context-negotiation.");
}
......@@ -462,17 +465,19 @@ public class TitanCharacter_String_identification_context__negotiation_template
switch (template_selection) {
case SPECIFIC_VALUE:
return new TitanInteger(2);
case VALUE_LIST:
case VALUE_LIST: {
if (list_value.isEmpty()) {
throw new TtcnError("Internal error: Performing sizeof() operation on a template of type CHARACTER STRING.identification.context-negotiation containing an empty list.");
}
final int item_size = list_value.get(0).size_of().get_int();
for (int l_idx = 1; l_idx < list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 1; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).size_of().get_int() != item_size) {
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING.identification.context-negotiation containing a value list with different sizes.");
}
}
return new TitanInteger(item_size);
}
case OMIT_VALUE:
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING.identification.context-negotiation containing omit value.");
case ANY_VALUE:
......@@ -512,9 +517,10 @@ public class TitanCharacter_String_identification_context__negotiation_template
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < list_value.size(); list_count++) {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -522,6 +528,7 @@ public class TitanCharacter_String_identification_context__negotiation_template
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -619,12 +626,14 @@ public class TitanCharacter_String_identification_context__negotiation_template
transfer__syntax.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(list_value.size());
for (int i = 0; i < list_value.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
list_value.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized/unsupported template of type CHARACTER STRING.identification.context-negotiation.");
}
......
......@@ -285,7 +285,8 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int l_idx=0; l_idx<list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 0; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).match_omit_(legacy)) {
return template_selection==template_sel.VALUE_LIST;
}
......@@ -410,13 +411,15 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
}
return true;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (int list_count = 0; list_count < list_value.size(); list_count++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_value.get(list_count).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching an uninitialized/unsupported template of type CHARACTER STRING.identification.syntaxes.");
}
......@@ -462,17 +465,19 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
switch (template_selection) {
case SPECIFIC_VALUE:
return new TitanInteger(2);
case VALUE_LIST:
case VALUE_LIST: {
if (list_value.isEmpty()) {
throw new TtcnError("Internal error: Performing sizeof() operation on a template of type CHARACTER STRING.identification.syntaxes containing an empty list.");
}
final int item_size = list_value.get(0).size_of().get_int();
for (int l_idx = 1; l_idx < list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 1; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).size_of().get_int() != item_size) {
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING.identification.syntaxes containing a value list with different sizes.");
}
}
return new TitanInteger(item_size);
}
case OMIT_VALUE:
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING.identification.syntaxes containing omit value.");
case ANY_VALUE:
......@@ -512,9 +517,10 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < list_value.size(); list_count++) {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -522,6 +528,7 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -619,12 +626,14 @@ public class TitanCharacter_String_identification_syntaxes_template extends Base
transfer.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(list_value.size());
for (int i = 0; i < list_value.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
list_value.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized/unsupported template of type CHARACTER STRING.identification.syntaxes.");
}
......
......@@ -299,13 +299,15 @@ public class TitanCharacter_String_identification_template extends Base_Template
throw new TtcnError("Internal error: Invalid selector in a specific value when matching a template of union type CHARACTER STRING.identification.");
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for(int i = 0 ; i < value_list.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = value_list.size();
for(int i = 0 ; i < list_size; i++) {
if(value_list.get(i).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching with an uninitialized/unsupported integer template.");
}
......@@ -339,16 +341,18 @@ public class TitanCharacter_String_identification_template extends Base_Template
throw new TtcnError("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type CHARACTER STRING.identification.");
}
return single_value_union_selection == checked_selection;
case VALUE_LIST:
case VALUE_LIST: {
if (value_list.isEmpty()) {
throw new TtcnError("Internal error: Performing ischosen() operation on a template of union type CHARACTER STRING.identification containing an empty list.");
}
for (int i = 0; i < value_list.size(); i++) {
final int list_size = value_list.size();
for (int i = 0; i < list_size; i++) {
if(!value_list.get(i).ischosen(checked_selection)) {
return false;
}
}
return true;
}
default:
return false;
}
......@@ -446,7 +450,8 @@ public class TitanCharacter_String_identification_template extends Base_Template
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int i = 0 ; i < value_list.size(); i++) {
final int list_size = value_list.size();
for (int i = 0 ; i < list_size; i++) {
if (value_list.get(i).match_omit(legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
......@@ -701,9 +706,10 @@ public class TitanCharacter_String_identification_template extends Base_Template
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < value_list.size(); list_count++) {
final int list_size = value_list.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -711,6 +717,7 @@ public class TitanCharacter_String_identification_template extends Base_Template
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -837,12 +844,14 @@ public class TitanCharacter_String_identification_template extends Base_Template
single_value.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.size());
for (int i = 0; i < value_list.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = value_list.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
value_list.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized template of type CHARACTER STRING.identification.");
}
......
......@@ -301,7 +301,8 @@ public class TitanCharacter_String_template extends Base_Template {
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int l_idx=0; l_idx<list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 0; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).match_omit_(legacy)) {
return template_selection==template_sel.VALUE_LIST;
}
......@@ -459,13 +460,15 @@ public class TitanCharacter_String_template extends Base_Template {
}
return true;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (int list_count = 0; list_count < list_value.size(); list_count++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_value.get(list_count).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching an uninitialized/unsupported template of type CHARACTER STRING.");
}
......@@ -520,17 +523,19 @@ public class TitanCharacter_String_template extends Base_Template {
sizeof++;
}
return new TitanInteger(sizeof);
case VALUE_LIST:
case VALUE_LIST: {
if (list_value.isEmpty()) {
throw new TtcnError("Internal error: Performing sizeof() operation on a template of type CHARACTER STRING containing an empty list.");
}
final int item_size = list_value.get(0).size_of().get_int();
for (int l_idx = 1; l_idx < list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 1; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).size_of().get_int() != item_size) {
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING containing a value list with different sizes.");
}
}
return new TitanInteger(item_size);
}
case OMIT_VALUE:
throw new TtcnError("Performing sizeof() operation on a template of type CHARACTER STRING containing omit value.");
case ANY_VALUE:
......@@ -573,9 +578,10 @@ public class TitanCharacter_String_template extends Base_Template {
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < list_value.size(); list_count++) {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -583,6 +589,7 @@ public class TitanCharacter_String_template extends Base_Template {
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -698,12 +705,14 @@ public class TitanCharacter_String_template extends Base_Template {
string__value.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(list_value.size());
for (int i = 0; i < list_value.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
list_value.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized/unsupported template of type CHARACTER STRING.");
}
......
......@@ -285,7 +285,8 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int l_idx=0; l_idx<list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 0; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).match_omit_(legacy)) {
return template_selection==template_sel.VALUE_LIST;
}
......@@ -410,13 +411,15 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
}
return true;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (int list_count = 0; list_count < list_value.size(); list_count++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_value.get(list_count).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching an uninitialized/unsupported template of type EMBEDDED PDV.identification.context-negotiation.");
}
......@@ -462,17 +465,19 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
switch (template_selection) {
case SPECIFIC_VALUE:
return new TitanInteger(2);
case VALUE_LIST:
case VALUE_LIST: {
if (list_value.isEmpty()) {
throw new TtcnError("Internal error: Performing sizeof() operation on a template of type EMBEDDED PDV.identification.context-negotiation containing an empty list.");
}
final int item_size = list_value.get(0).size_of().get_int();
for (int l_idx = 1; l_idx < list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 1; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).size_of().get_int() != item_size) {
throw new TtcnError("Performing sizeof() operation on a template of type EMBEDDED PDV.identification.context-negotiation containing a value list with different sizes.");
}
}
return new TitanInteger(item_size);
}
case OMIT_VALUE:
throw new TtcnError("Performing sizeof() operation on a template of type EMBEDDED PDV.identification.context-negotiation containing omit value.");
case ANY_VALUE:
......@@ -512,9 +517,10 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < list_value.size(); list_count++) {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -522,6 +528,7 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -619,12 +626,14 @@ public class TitanEmbedded_PDV_identification_context__negotiation_template exte
transfer__syntax.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(list_value.size());
for (int i = 0; i < list_value.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
list_value.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized/unsupported template of type EMBEDDED PDV.identification.context-negotiation.");
}
......
......@@ -285,7 +285,8 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (int l_idx=0; l_idx<list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 0; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).match_omit_(legacy)) {
return template_selection==template_sel.VALUE_LIST;
}
......@@ -410,13 +411,15 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
}
return true;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (int list_count = 0; list_count < list_value.size(); list_count++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_value.get(list_count).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching an uninitialized/unsupported template of type EMBEDDED PDV.identification.syntaxes.");
}
......@@ -462,17 +465,19 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
switch (template_selection) {
case SPECIFIC_VALUE:
return new TitanInteger(2);
case VALUE_LIST:
case VALUE_LIST: {
if (list_value.isEmpty()) {
throw new TtcnError("Internal error: Performing sizeof() operation on a template of type EMBEDDED PDV.identification.syntaxes containing an empty list.");
}
final int item_size = list_value.get(0).size_of().get_int();
for (int l_idx = 1; l_idx < list_value.size(); l_idx++) {
final int list_size = list_value.size();
for (int l_idx = 1; l_idx < list_size; l_idx++) {
if (list_value.get(l_idx).size_of().get_int() != item_size) {
throw new TtcnError("Performing sizeof() operation on a template of type EMBEDDED PDV.identification.syntaxes containing a value list with different sizes.");
}
}
return new TitanInteger(item_size);
}
case OMIT_VALUE:
throw new TtcnError("Performing sizeof() operation on a template of type EMBEDDED PDV.identification.syntaxes containing omit value.");
case ANY_VALUE:
......@@ -512,9 +517,10 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
break;
case COMPLEMENTED_LIST:
TTCN_Logger.log_event_str("complement");
case VALUE_LIST:
case VALUE_LIST: {
TTCN_Logger.log_char('(');
for (int list_count = 0; list_count < list_value.size(); list_count++) {
final int list_size = list_value.size();
for (int list_count = 0; list_count < list_size; list_count++) {
if (list_count > 0) {
TTCN_Logger.log_event_str(", ");
}
......@@ -522,6 +528,7 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
}
TTCN_Logger.log_char(')');
break;
}
default:
log_generic();
break;
......@@ -619,12 +626,14 @@ public class TitanEmbedded_PDV_identification_syntaxes_template extends Base_Tem
transfer.encode_text(text_buf);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(list_value.size());
for (int i = 0; i < list_value.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = list_value.size();
text_buf.push_int(list_size);
for (int i = 0; i < list_size; i++) {
list_value.get(i).encode_text(text_buf);
}
break;
}
default:
throw new TtcnError("Text encoder: Encoding an uninitialized/unsupported template of type EMBEDDED PDV.identification.syntaxes.");
}
......
......@@ -299,13 +299,15 @@ public class TitanEmbedded_PDV_identification_template extends Base_Template {
throw new TtcnError("Internal error: Invalid selector in a specific value when matching a template of union type EMBEDDED PDV.identification.");
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for(int i = 0 ; i < value_list.size(); i++) {
case COMPLEMENTED_LIST: {
final int list_size = value_list.size();
for(int i = 0 ; i < list_size; i++) {
if(value_list.get(i).match(other_value, legacy)) {
return template_selection == template_sel.VALUE_LIST;
}
}
return template_selection == template_sel.COMPLEMENTED_LIST;
}
default:
throw new TtcnError("Matching with an uninitialized/unsupported integer template.");
}
......@@ -339,16 +341,18 @@ public class TitanEmbedded_PDV_identification_template extends Base_Template {
throw new TtcnError("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type EMBEDDED PDV.identification.");
}
return single_value_union_selection == checked_selection;
case VALUE_LIST: