Sync with 5.2.0
[deliverable/titan.core.git] / core / ASN_CharacterString.cc
index c9c01f027292a866da39aacddc4e28c6d785f77d..f4ae4a5d7b8c5919beb54b2f0a594be8e20e97a9 100644 (file)
@@ -646,7 +646,7 @@ boolean CHARACTER_STRING_identification::BER_decode_TLV(const TTCN_Typedescripto
 // FIXME maybe: XER_encode and decode is virtually identical to EMBEDDED_PDV
 
 int CHARACTER_STRING_identification::XER_encode(const XERdescriptor_t& p_td,
-               TTCN_Buffer& p_buf, unsigned int flavor, int indent) const
+               TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const
 {
   int encoded_length=(int)p_buf.get_len();
 
@@ -655,22 +655,22 @@ int CHARACTER_STRING_identification::XER_encode(const XERdescriptor_t& p_td,
   flavor &= XER_MASK;
   switch (union_selection) {
   case ALT_syntaxes:
-    field_syntaxes->XER_encode(EMBEDDED_PDV_identification_sxs_xer_, p_buf, flavor, indent);
+    field_syntaxes->XER_encode(EMBEDDED_PDV_identification_sxs_xer_, p_buf, flavor, indent, 0);
     break;
   case ALT_syntax:
-    field_syntax->XER_encode(EMBEDDED_PDV_identification_sx_xer_, p_buf, flavor, indent);
+    field_syntax->XER_encode(EMBEDDED_PDV_identification_sx_xer_, p_buf, flavor, indent, 0);
     break;
   case ALT_presentation__context__id:
-    field_presentation__context__id->XER_encode(EMBEDDED_PDV_identification_pci_xer_, p_buf, flavor, indent);
+    field_presentation__context__id->XER_encode(EMBEDDED_PDV_identification_pci_xer_, p_buf, flavor, indent, 0);
     break;
   case ALT_context__negotiation:
-    field_context__negotiation->XER_encode(EMBEDDED_PDV_identification_cn_xer_, p_buf, flavor, indent);
+    field_context__negotiation->XER_encode(EMBEDDED_PDV_identification_cn_xer_, p_buf, flavor, indent, 0);
     break;
   case ALT_transfer__syntax:
-    field_transfer__syntax->XER_encode(EMBEDDED_PDV_identification_ts_xer_, p_buf, flavor, indent);
+    field_transfer__syntax->XER_encode(EMBEDDED_PDV_identification_ts_xer_, p_buf, flavor, indent, 0);
     break;
   case ALT_fixed:
-    field_fixed->XER_encode(EMBEDDED_PDV_identification_fix_xer_, p_buf, flavor, indent);
+    field_fixed->XER_encode(EMBEDDED_PDV_identification_fix_xer_, p_buf, flavor, indent, 0);
     break;
   default:
     TTCN_EncDec_ErrorContext::error_internal("Unknown selection.");
@@ -683,7 +683,7 @@ int CHARACTER_STRING_identification::XER_encode(const XERdescriptor_t& p_td,
 }
 
 int CHARACTER_STRING_identification::XER_decode(const XERdescriptor_t& p_td,
-  XmlReaderWrap& reader, unsigned int flavor)
+  XmlReaderWrap& reader, unsigned int flavor, embed_values_dec_struct_t*)
 {
   int exer  = is_exer(flavor);
   // we are supposed to be parked on our element
@@ -704,27 +704,27 @@ int CHARACTER_STRING_identification::XER_decode(const XERdescriptor_t& p_td,
        size_t namelen = strlen(name);
        switch (namelen) {
        case 8: // syntaxes
-         syntaxes().XER_decode(EMBEDDED_PDV_identification_sxs_xer_, reader, flavor);
+         syntaxes().XER_decode(EMBEDDED_PDV_identification_sxs_xer_, reader, flavor, 0);
          break;
 
        case 6: // syntax
-         syntax().XER_decode(EMBEDDED_PDV_identification_sx_xer_, reader, flavor);
+         syntax().XER_decode(EMBEDDED_PDV_identification_sx_xer_, reader, flavor, 0);
          break;
 
        case 23: // presentation-context-id
-         presentation__context__id().XER_decode(EMBEDDED_PDV_identification_pci_xer_, reader, flavor);
+         presentation__context__id().XER_decode(EMBEDDED_PDV_identification_pci_xer_, reader, flavor, 0);
          break;
 
        case 19: // context-negotiation
-         context__negotiation().XER_decode(EMBEDDED_PDV_identification_cn_xer_, reader, flavor);
+         context__negotiation().XER_decode(EMBEDDED_PDV_identification_cn_xer_, reader, flavor, 0);
          break;
 
        case 15: // transfer-syntax
-         transfer__syntax().XER_decode(EMBEDDED_PDV_identification_ts_xer_, reader, flavor);
+         transfer__syntax().XER_decode(EMBEDDED_PDV_identification_ts_xer_, reader, flavor, 0);
          break;
 
        case 5: // fixed
-         fixed().XER_decode(EMBEDDED_PDV_identification_fix_xer_, reader, flavor);
+         fixed().XER_decode(EMBEDDED_PDV_identification_fix_xer_, reader, flavor, 0);
          break;
 
        default:
@@ -1673,14 +1673,14 @@ boolean CHARACTER_STRING_identification_syntaxes::BER_decode_TLV(const TTCN_Type
 }
 
 int CHARACTER_STRING_identification_syntaxes::XER_encode(const XERdescriptor_t& p_td,
-               TTCN_Buffer& p_buf, unsigned int flavor, int indent) const
+               TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const
 {
   int encoded_length=(int)p_buf.get_len();
 
   begin_xml(p_td, p_buf, flavor, indent++, false);
 
-  field_abstract.XER_encode(CHARACTER_STRING_identification_sxs_abs_xer_, p_buf, flavor, indent);
-  field_transfer.XER_encode(CHARACTER_STRING_identification_sxs_xfr_xer_, p_buf, flavor, indent);
+  field_abstract.XER_encode(CHARACTER_STRING_identification_sxs_abs_xer_, p_buf, flavor, indent, 0);
+  field_transfer.XER_encode(CHARACTER_STRING_identification_sxs_xfr_xer_, p_buf, flavor, indent, 0);
 
   end_xml(p_td, p_buf, flavor, --indent, false);
 
@@ -1688,7 +1688,7 @@ int CHARACTER_STRING_identification_syntaxes::XER_encode(const XERdescriptor_t&
 }
 
 int CHARACTER_STRING_identification_syntaxes::XER_decode(
-  const XERdescriptor_t& /*p_td*/, XmlReaderWrap& reader, unsigned int flavor)
+  const XERdescriptor_t& /*p_td*/, XmlReaderWrap& reader, unsigned int flavor, embed_values_dec_struct_t*)
 { // we stand on <syntaxes>, move ahead first
   for (int success = reader.Read(); success == 1; success = reader.Read())
   {
@@ -1698,8 +1698,8 @@ int CHARACTER_STRING_identification_syntaxes::XER_decode(
       break;
   }
   // FIXME this assumes the right element
-  field_abstract.XER_decode(EMBEDDED_PDV_identification_sxs_abs_xer_, reader, flavor);
-  field_transfer.XER_decode(EMBEDDED_PDV_identification_sxs_xfr_xer_, reader, flavor);
+  field_abstract.XER_decode(EMBEDDED_PDV_identification_sxs_abs_xer_, reader, flavor, 0);
+  field_transfer.XER_decode(EMBEDDED_PDV_identification_sxs_xfr_xer_, reader, flavor, 0);
   for (int success = 1; success == 1; success = reader.Read())
   {
     int type = reader.NodeType();
@@ -2319,14 +2319,14 @@ boolean CHARACTER_STRING_identification_context__negotiation::BER_decode_TLV(con
 }
 
 int CHARACTER_STRING_identification_context__negotiation::XER_encode(const XERdescriptor_t& p_td,
-               TTCN_Buffer& p_buf, unsigned int flavor, int indent) const
+               TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const
 {
   int encoded_length=(int)p_buf.get_len();
 
   begin_xml(p_td, p_buf, flavor, indent++, false);
 
-  field_presentation__context__id.XER_encode(CHARACTER_STRING_identification_pci_xer_, p_buf, flavor, indent);
-  field_transfer__syntax         .XER_encode(CHARACTER_STRING_identification_ts_xer_ , p_buf, flavor, indent);
+  field_presentation__context__id.XER_encode(CHARACTER_STRING_identification_pci_xer_, p_buf, flavor, indent, 0);
+  field_transfer__syntax         .XER_encode(CHARACTER_STRING_identification_ts_xer_ , p_buf, flavor, indent, 0);
 
   end_xml(p_td, p_buf, flavor, --indent, false);
 
@@ -2334,7 +2334,7 @@ int CHARACTER_STRING_identification_context__negotiation::XER_encode(const XERde
 }
 
 int CHARACTER_STRING_identification_context__negotiation::XER_decode(
-  const XERdescriptor_t& p_td, XmlReaderWrap& reader, unsigned int flavor)
+  const XERdescriptor_t& p_td, XmlReaderWrap& reader, unsigned int flavor, embed_values_dec_struct_t*)
 {
   int exer  = is_exer(flavor);
   int type = reader.NodeType(), depth = -1;
@@ -2345,8 +2345,8 @@ int CHARACTER_STRING_identification_context__negotiation::XER_decode(
     depth = reader.Depth();
     success = reader.Read();
   }
-  field_presentation__context__id.XER_decode(EMBEDDED_PDV_identification_cn_pci_xer_, reader, flavor);
-  field_transfer__syntax         .XER_decode(EMBEDDED_PDV_identification_cn_tsx_xer_, reader, flavor);
+  field_presentation__context__id.XER_decode(EMBEDDED_PDV_identification_cn_pci_xer_, reader, flavor, 0);
+  field_transfer__syntax         .XER_decode(EMBEDDED_PDV_identification_cn_tsx_xer_, reader, flavor, 0);
   for (; success == 1; success = reader.Read()) {
     type = reader.NodeType();
     if (XML_READER_TYPE_END_ELEMENT == type) {
@@ -2972,7 +2972,7 @@ void CHARACTER_STRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_
   case TTCN_EncDec::CT_XER: {
     TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
     unsigned XER_coding=va_arg(pvar, unsigned);
-    XER_encode(*p_td.xer,p_buf, XER_coding, 0);
+    XER_encode(*p_td.xer,p_buf, XER_coding, 0, 0);
     p_buf.put_c('\n');
     break;}
   case TTCN_EncDec::CT_JSON: {
@@ -3019,7 +3019,7 @@ void CHARACTER_STRING::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_
       if (type==XML_READER_TYPE_ELEMENT)
        break;
     }
-    XER_decode(*p_td.xer, reader, XER_coding);
+    XER_decode(*p_td.xer, reader, XER_coding, 0);
     size_t bytes = reader.ByteConsumed();
     p_buf.set_pos(bytes);
     break;}
@@ -3085,7 +3085,8 @@ boolean CHARACTER_STRING::BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, cons
   return TRUE;
 }
 
-int CHARACTER_STRING::XER_encode(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf, unsigned int flavor, int indent) const
+int CHARACTER_STRING::XER_encode(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf,
+  unsigned int flavor, int indent, embed_values_enc_struct_t*) const
 {
   if(!is_bound()) {
     TTCN_EncDec_ErrorContext::error
@@ -3096,10 +3097,10 @@ int CHARACTER_STRING::XER_encode(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf
   flavor &= ~XER_RECOF; // ASN.1 character string doesn't care
   begin_xml(p_td, p_buf, flavor, indent++, false);
 
-  field_identification.XER_encode(CHARACTER_STRING_identification_xer_, p_buf, flavor, indent);
+  field_identification.XER_encode(CHARACTER_STRING_identification_xer_, p_buf, flavor, indent, 0);
   // data-value-descriptor is OPTIONAL and can never be present.
   // Its encoding is empty.
-  field_string__value .XER_encode(CHARACTER_STRING_data_value_xer_    , p_buf, flavor, indent);
+  field_string__value .XER_encode(CHARACTER_STRING_data_value_xer_    , p_buf, flavor, indent, 0);
 
   end_xml(p_td, p_buf, flavor, --indent, false);
 
@@ -3107,7 +3108,7 @@ int CHARACTER_STRING::XER_encode(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf
 }
 
 int CHARACTER_STRING::XER_decode(const XERdescriptor_t& p_td,
-  XmlReaderWrap& reader, unsigned int flavor)
+  XmlReaderWrap& reader, unsigned int flavor, embed_values_dec_struct_t*)
 {
   int exer  = is_exer(flavor);
   int success = reader.Ok(), depth = -1, type;
@@ -3120,13 +3121,13 @@ int CHARACTER_STRING::XER_decode(const XERdescriptor_t& p_td,
       break;
     }
   }
-  field_identification         .XER_decode(CHARACTER_STRING_identification_xer_       , reader, flavor);
-  field_data__value__descriptor.XER_decode(CHARACTER_STRING_data_value_descriptor_xer_, reader, flavor);
+  field_identification         .XER_decode(CHARACTER_STRING_identification_xer_       , reader, flavor, 0);
+  field_data__value__descriptor.XER_decode(CHARACTER_STRING_data_value_descriptor_xer_, reader, flavor, 0);
   if (field_data__value__descriptor.is_value()) {
     TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INVAL_MSG,
       "data-value-descriptor not allowed for EMBEDDED PDV");
   }
-  field_string__value          .XER_decode(CHARACTER_STRING_data_value_xer_           , reader, flavor);
+  field_string__value          .XER_decode(CHARACTER_STRING_data_value_xer_           , reader, flavor, 0);
   for (success = reader.Read(); success == 1; success = reader.Read()) {
     type = reader.NodeType();
     if (XML_READER_TYPE_END_ELEMENT == type) {
This page took 0.080417 seconds and 5 git commands to generate.