// This C++ source file was generated by the TTCN-3 compiler
// of the TTCN-3 Test Executor version 11.1.0
// The generation of user and time information were disabled by the -D flag.

// Copyright (c) 2000-2025 Ericsson Telecom AB

// Do not edit this file unless you know what you are doing.

/* Including header files */

#include "TCCEncoding_Functions.hh"

namespace TCCEncoding__Functions {

/* Literal string constants */

const unsigned char bs_0_bits[] = { 0 },
bs_2_bits[] = { 0 },
bs_40_bits[] = { 0 },
bs_4_bits[] = { 32 },
bs_107_bits[] = { 96 },
bs_131_bits[] = { 16 },
bs_56_bits[] = { 80 },
bs_24_bits[] = { 48 },
bs_87_bits[] = { 112 },
bs_125_bits[] = { 8 },
bs_48_bits[] = { 72 },
bs_16_bits[] = { 40 },
bs_79_bits[] = { 104 },
bs_136_bits[] = { 24 },
bs_64_bits[] = { 88 },
bs_32_bits[] = { 56 },
bs_95_bits[] = { 120 },
bs_102_bits[] = { 4 },
bs_44_bits[] = { 68 },
bs_104_bits[] = { 36 },
bs_75_bits[] = { 100 },
bs_133_bits[] = { 20 },
bs_60_bits[] = { 84 },
bs_28_bits[] = { 52 },
bs_91_bits[] = { 116 },
bs_127_bits[] = { 12 },
bs_52_bits[] = { 76 },
bs_20_bits[] = { 44 },
bs_83_bits[] = { 108 },
bs_110_bits[] = { 28 },
bs_114_bits[] = { 92 },
bs_36_bits[] = { 60 },
bs_126_bits[] = { 124 },
bs_12_bits[] = { 2 },
bs_42_bits[] = { 66 },
bs_10_bits[] = { 34 },
bs_73_bits[] = { 98 },
bs_137_bits[] = { 18 },
bs_58_bits[] = { 82 },
bs_26_bits[] = { 50 },
bs_89_bits[] = { 114 },
bs_7_bits[] = { 10 },
bs_50_bits[] = { 74 },
bs_18_bits[] = { 42 },
bs_81_bits[] = { 106 },
bs_134_bits[] = { 26 },
bs_66_bits[] = { 90 },
bs_34_bits[] = { 58 },
bs_97_bits[] = { 122 },
bs_128_bits[] = { 6 },
bs_46_bits[] = { 70 },
bs_14_bits[] = { 38 },
bs_77_bits[] = { 102 },
bs_135_bits[] = { 22 },
bs_62_bits[] = { 86 },
bs_30_bits[] = { 54 },
bs_93_bits[] = { 118 },
bs_109_bits[] = { 14 },
bs_54_bits[] = { 78 },
bs_22_bits[] = { 46 },
bs_85_bits[] = { 110 },
bs_117_bits[] = { 30 },
bs_116_bits[] = { 94 },
bs_38_bits[] = { 62 },
bs_129_bits[] = { 126 },
bs_1_bits[] = { 1 },
bs_103_bits[] = { 1 },
bs_41_bits[] = { 65 },
bs_9_bits[] = { 33 },
bs_72_bits[] = { 97 },
bs_71_bits[] = { 17 },
bs_57_bits[] = { 81 },
bs_25_bits[] = { 49 },
bs_88_bits[] = { 113 },
bs_111_bits[] = { 9 },
bs_49_bits[] = { 73 },
bs_17_bits[] = { 41 },
bs_80_bits[] = { 105 },
bs_132_bits[] = { 25 },
bs_65_bits[] = { 89 },
bs_33_bits[] = { 57 },
bs_96_bits[] = { 121 },
bs_122_bits[] = { 5 },
bs_45_bits[] = { 69 },
bs_13_bits[] = { 37 },
bs_76_bits[] = { 101 },
bs_139_bits[] = { 21 },
bs_61_bits[] = { 85 },
bs_29_bits[] = { 53 },
bs_92_bits[] = { 117 },
bs_6_bits[] = { 13 },
bs_53_bits[] = { 77 },
bs_21_bits[] = { 45 },
bs_84_bits[] = { 109 },
bs_121_bits[] = { 29 },
bs_113_bits[] = { 93 },
bs_37_bits[] = { 61 },
bs_124_bits[] = { 125 },
bs_105_bits[] = { 3 },
bs_43_bits[] = { 67 },
bs_11_bits[] = { 35 },
bs_74_bits[] = { 99 },
bs_130_bits[] = { 19 },
bs_59_bits[] = { 83 },
bs_27_bits[] = { 51 },
bs_90_bits[] = { 115 },
bs_115_bits[] = { 11 },
bs_51_bits[] = { 75 },
bs_19_bits[] = { 43 },
bs_82_bits[] = { 107 },
bs_99_bits[] = { 27, 32 },
bs_98_bits[] = { 27, 20 },
bs_70_bits[] = { 27, 10 },
bs_67_bits[] = { 27, 30 },
bs_8_bits[] = { 27, 5 },
bs_69_bits[] = { 27, 31 },
bs_100_bits[] = { 155, 20 },
bs_5_bits[] = { 155, 50 },
bs_101_bits[] = { 155, 30 },
bs_68_bits[] = { 155, 23 },
bs_108_bits[] = { 91 },
bs_35_bits[] = { 59 },
bs_119_bits[] = { 123 },
bs_123_bits[] = { 7 },
bs_47_bits[] = { 71 },
bs_15_bits[] = { 39 },
bs_78_bits[] = { 103 },
bs_138_bits[] = { 23 },
bs_63_bits[] = { 87 },
bs_31_bits[] = { 55 },
bs_94_bits[] = { 119 },
bs_120_bits[] = { 15 },
bs_55_bits[] = { 79 },
bs_23_bits[] = { 47 },
bs_86_bits[] = { 111 },
bs_112_bits[] = { 31 },
bs_106_bits[] = { 95 },
bs_39_bits[] = { 63 },
bs_118_bits[] = { 127 };
extern const BITSTRING bs_3(0, NULL),
bs_0(1, bs_0_bits),
bs_2(4, bs_2_bits),
bs_40(7, bs_40_bits),
bs_4(7, bs_4_bits),
bs_107(7, bs_107_bits),
bs_131(7, bs_131_bits),
bs_56(7, bs_56_bits),
bs_24(7, bs_24_bits),
bs_87(7, bs_87_bits),
bs_125(7, bs_125_bits),
bs_48(7, bs_48_bits),
bs_16(7, bs_16_bits),
bs_79(7, bs_79_bits),
bs_136(7, bs_136_bits),
bs_64(7, bs_64_bits),
bs_32(7, bs_32_bits),
bs_95(7, bs_95_bits),
bs_102(7, bs_102_bits),
bs_44(7, bs_44_bits),
bs_104(7, bs_104_bits),
bs_75(7, bs_75_bits),
bs_133(7, bs_133_bits),
bs_60(7, bs_60_bits),
bs_28(7, bs_28_bits),
bs_91(7, bs_91_bits),
bs_127(7, bs_127_bits),
bs_52(7, bs_52_bits),
bs_20(7, bs_20_bits),
bs_83(7, bs_83_bits),
bs_110(7, bs_110_bits),
bs_114(7, bs_114_bits),
bs_36(7, bs_36_bits),
bs_126(7, bs_126_bits),
bs_12(7, bs_12_bits),
bs_42(7, bs_42_bits),
bs_10(7, bs_10_bits),
bs_73(7, bs_73_bits),
bs_137(7, bs_137_bits),
bs_58(7, bs_58_bits),
bs_26(7, bs_26_bits),
bs_89(7, bs_89_bits),
bs_7(7, bs_7_bits),
bs_50(7, bs_50_bits),
bs_18(7, bs_18_bits),
bs_81(7, bs_81_bits),
bs_134(7, bs_134_bits),
bs_66(7, bs_66_bits),
bs_34(7, bs_34_bits),
bs_97(7, bs_97_bits),
bs_128(7, bs_128_bits),
bs_46(7, bs_46_bits),
bs_14(7, bs_14_bits),
bs_77(7, bs_77_bits),
bs_135(7, bs_135_bits),
bs_62(7, bs_62_bits),
bs_30(7, bs_30_bits),
bs_93(7, bs_93_bits),
bs_109(7, bs_109_bits),
bs_54(7, bs_54_bits),
bs_22(7, bs_22_bits),
bs_85(7, bs_85_bits),
bs_117(7, bs_117_bits),
bs_116(7, bs_116_bits),
bs_38(7, bs_38_bits),
bs_129(7, bs_129_bits),
bs_1(1, bs_1_bits),
bs_103(7, bs_103_bits),
bs_41(7, bs_41_bits),
bs_9(7, bs_9_bits),
bs_72(7, bs_72_bits),
bs_71(7, bs_71_bits),
bs_57(7, bs_57_bits),
bs_25(7, bs_25_bits),
bs_88(7, bs_88_bits),
bs_111(7, bs_111_bits),
bs_49(7, bs_49_bits),
bs_17(7, bs_17_bits),
bs_80(7, bs_80_bits),
bs_132(7, bs_132_bits),
bs_65(7, bs_65_bits),
bs_33(7, bs_33_bits),
bs_96(7, bs_96_bits),
bs_122(7, bs_122_bits),
bs_45(7, bs_45_bits),
bs_13(7, bs_13_bits),
bs_76(7, bs_76_bits),
bs_139(7, bs_139_bits),
bs_61(7, bs_61_bits),
bs_29(7, bs_29_bits),
bs_92(7, bs_92_bits),
bs_6(7, bs_6_bits),
bs_53(7, bs_53_bits),
bs_21(7, bs_21_bits),
bs_84(7, bs_84_bits),
bs_121(7, bs_121_bits),
bs_113(7, bs_113_bits),
bs_37(7, bs_37_bits),
bs_124(7, bs_124_bits),
bs_105(7, bs_105_bits),
bs_43(7, bs_43_bits),
bs_11(7, bs_11_bits),
bs_74(7, bs_74_bits),
bs_130(7, bs_130_bits),
bs_59(7, bs_59_bits),
bs_27(7, bs_27_bits),
bs_90(7, bs_90_bits),
bs_115(7, bs_115_bits),
bs_51(7, bs_51_bits),
bs_19(7, bs_19_bits),
bs_82(7, bs_82_bits),
bs_99(14, bs_99_bits),
bs_98(14, bs_98_bits),
bs_70(14, bs_70_bits),
bs_67(14, bs_67_bits),
bs_8(14, bs_8_bits),
bs_69(14, bs_69_bits),
bs_100(14, bs_100_bits),
bs_5(14, bs_5_bits),
bs_101(14, bs_101_bits),
bs_68(14, bs_68_bits),
bs_108(7, bs_108_bits),
bs_35(7, bs_35_bits),
bs_119(7, bs_119_bits),
bs_123(7, bs_123_bits),
bs_47(7, bs_47_bits),
bs_15(7, bs_15_bits),
bs_78(7, bs_78_bits),
bs_138(7, bs_138_bits),
bs_63(7, bs_63_bits),
bs_31(7, bs_31_bits),
bs_94(7, bs_94_bits),
bs_120(7, bs_120_bits),
bs_55(7, bs_55_bits),
bs_23(7, bs_23_bits),
bs_86(7, bs_86_bits),
bs_112(7, bs_112_bits),
bs_106(7, bs_106_bits),
bs_39(7, bs_39_bits),
bs_118(7, bs_118_bits);
const unsigned char hs_0_nibbles[] = { 0 },
hs_1_nibbles[] = { 15 };
extern const HEXSTRING hs_0(1, hs_0_nibbles),
hs_1(1, hs_1_nibbles);
extern const OCTETSTRING os_0(0, NULL);
extern const CHARSTRING cs_0(0, NULL),
cs_13('\n'),
cs_2('\f'),
cs_14('\r'),
cs_1(' '),
cs_17('!'),
cs_18('"'),
cs_19('#'),
cs_12('$'),
cs_20('%'),
cs_21('&'),
cs_22(2, "''"),
cs_23('('),
cs_24(')'),
cs_25('*'),
cs_26('+'),
cs_27(','),
cs_28('-'),
cs_29('.'),
cs_30('/'),
cs_31('0'),
cs_32('1'),
cs_33('2'),
cs_16(12, "27 extension"),
cs_34('3'),
cs_35('4'),
cs_36('5'),
cs_37('6'),
cs_38('7'),
cs_39('8'),
cs_40('9'),
cs_41(':'),
cs_42(';'),
cs_43('<'),
cs_44('='),
cs_45('>'),
cs_46('?'),
cs_11('@'),
cs_47('A'),
cs_48('B'),
cs_49('C'),
cs_50('D'),
cs_51('E'),
cs_52('F'),
cs_53('G'),
cs_54('H'),
cs_55('I'),
cs_56('J'),
cs_57('K'),
cs_58('L'),
cs_59('M'),
cs_60('N'),
cs_61('O'),
cs_62('P'),
cs_63('Q'),
cs_64('R'),
cs_65('S'),
cs_66('T'),
cs_67('U'),
cs_68('V'),
cs_69('W'),
cs_70('X'),
cs_71('Y'),
cs_72('Z'),
cs_7('['),
cs_6('\\'),
cs_9(']'),
cs_3('^'),
cs_15('_'),
cs_73('a'),
cs_74('b'),
cs_75('c'),
cs_76('d'),
cs_77('e'),
cs_78('f'),
cs_79('g'),
cs_80('h'),
cs_81('i'),
cs_82('j'),
cs_83('k'),
cs_84('l'),
cs_85('m'),
cs_86('n'),
cs_87('o'),
cs_88('p'),
cs_89('q'),
cs_90('r'),
cs_91('s'),
cs_92('t'),
cs_93('u'),
cs_94('v'),
cs_95('w'),
cs_96('x'),
cs_97('y'),
cs_98('z'),
cs_4('{'),
cs_10('|'),
cs_5('}'),
cs_8('~');
extern const UNIVERSAL_CHARSTRING us_28(0, 0, 0, 161),
us_1(0, 0, 0, 163),
us_27(0, 0, 0, 164),
us_2(0, 0, 0, 165),
us_33(0, 0, 0, 167),
us_34(0, 0, 0, 191),
us_29(0, 0, 0, 196),
us_11(0, 0, 0, 197),
us_23(0, 0, 0, 198),
us_8(0, 0, 0, 199),
us_26(0, 0, 0, 201),
us_31(0, 0, 0, 209),
us_30(0, 0, 0, 214),
us_9(0, 0, 0, 216),
us_32(0, 0, 0, 220),
us_25(0, 0, 0, 223),
us_39(0, 0, 0, 224),
us_35(0, 0, 0, 228),
us_12(0, 0, 0, 229),
us_24(0, 0, 0, 230),
us_3(0, 0, 0, 232),
us_4(0, 0, 0, 233),
us_6(0, 0, 0, 236),
us_37(0, 0, 0, 241),
us_7(0, 0, 0, 242),
us_36(0, 0, 0, 246),
us_10(0, 0, 0, 248),
us_5(0, 0, 0, 249),
us_38(0, 0, 0, 252),
us_15(0, 0, 3, 147),
us_13(0, 0, 3, 148),
us_21(0, 0, 3, 152),
us_16(0, 0, 3, 155),
us_22(0, 0, 3, 158),
us_18(0, 0, 3, 160),
us_20(0, 0, 3, 163),
us_14(0, 0, 3, 166),
us_19(0, 0, 3, 168),
us_17(0, 0, 3, 169),
us_0(0, 0, 32, 172);
const unsigned char module_checksum[] = { 0x8d, 0xd6, 0x7a, 0x75, 0x70, 0x0d, 0x68, 0xf8, 0xf8, 0x80, 0x91, 0xe0, 0x99, 0x22, 0x24, 0xa6 };

/* Global variable definitions */

// No XER for NumberPlan
const TTCN_Typedescriptor_t NumberPlan_descr_ = { "@TCCEncoding_Functions.NumberPlan", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__NatureOfAddress
const TTCN_Typedescriptor_t ISUP__NatureOfAddress_descr_ = { "@TCCEncoding_Functions.ISUP_NatureOfAddress", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__NumberingIncompleteIndicator
const TTCN_Typedescriptor_t ISUP__NumberingIncompleteIndicator_descr_ = { "@TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ISUP__Called__Party__Number_addressSignalDigits_xer_ = { {"addressSignalDigits>\n", "addressSignalDigits>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t ISUP__Called__Party__Number_addressSignalDigits_descr_ = { "@TCCEncoding_Functions.ISUP_Called_Party_Number.addressSignalDigits", NULL, &HEXSTRING_raw_, NULL, &ISUP__Called__Party__Number_addressSignalDigits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__Called__Party__Number
const TTCN_Typedescriptor_t ISUP__Called__Party__Number_descr_ = { "@TCCEncoding_Functions.ISUP_Called_Party_Number", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__ScreeningIndicator
const TTCN_Typedescriptor_t ISUP__ScreeningIndicator_descr_ = { "@TCCEncoding_Functions.ISUP_ScreeningIndicator", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__AddressPresentationRestrictedIndicator
const TTCN_Typedescriptor_t ISUP__AddressPresentationRestrictedIndicator_descr_ = { "@TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ISUP__Calling__Party__Number_addressSignalDigits_xer_ = { {"addressSignalDigits>\n", "addressSignalDigits>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t ISUP__Calling__Party__Number_addressSignalDigits_descr_ = { "@TCCEncoding_Functions.ISUP_Calling_Party_Number.addressSignalDigits", NULL, &HEXSTRING_raw_, NULL, &ISUP__Calling__Party__Number_addressSignalDigits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ISUP__Calling__Party__Number
const TTCN_Typedescriptor_t ISUP__Calling__Party__Number_descr_ = { "@TCCEncoding_Functions.ISUP_Calling_Party_Number", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for MobileL3__TypeOfNumber
const TTCN_Typedescriptor_t MobileL3__TypeOfNumber_descr_ = { "@TCCEncoding_Functions.MobileL3_TypeOfNumber", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       MobileL3__CalledPartyBCDNumber_numberDigits_xer_ = { {"numberDigits>\n", "numberDigits>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t MobileL3__CalledPartyBCDNumber_numberDigits_descr_ = { "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.numberDigits", NULL, &HEXSTRING_raw_, NULL, &MobileL3__CalledPartyBCDNumber_numberDigits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for MobileL3__CalledPartyBCDNumber
const TTCN_Typedescriptor_t MobileL3__CalledPartyBCDNumber_descr_ = { "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for BitstringList
const TTCN_Typedescriptor_t BitstringList_descr_ = { "@TCCEncoding_Functions.BitstringList", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &BITSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BitstringList_0_xer_ = { {"BITSTRING>\n", "BITSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t BitstringList_0_descr_ = { "@TCCEncoding_Functions.BitstringList.<oftype>", &BITSTRING_ber_, &BITSTRING_raw_, NULL, &BitstringList_0_xer_, &BITSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
BitstringList const_c__GSM__7__bit__Default__Alphabet__Encoder;
const BitstringList& c__GSM__7__bit__Default__Alphabet__Encoder = const_c__GSM__7__bit__Default__Alphabet__Encoder;
BitstringList const_c__GSM__7__bit__Greek__Encoder;
const BitstringList& c__GSM__7__bit__Greek__Encoder = const_c__GSM__7__bit__Greek__Encoder;
// No XER for Extension__List
const TTCN_Typedescriptor_t Extension__List_descr_ = { "@TCCEncoding_Functions.Extension_List", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &UNIVERSAL_CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       Extension__List_0_xer_ = { {"UNIVERSAL_CHARSTRING>\n", "UNIVERSAL_CHARSTRING>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t Extension__List_0_descr_ = { "@TCCEncoding_Functions.Extension_List.<oftype>", NULL, &UNIVERSAL_CHARSTRING_raw_, &UNIVERSAL_CHARSTRING_text_, &Extension__List_0_xer_, &UNIVERSAL_CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
Extension__List const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder;
const Extension__List& c__GSM__7__bit__Default__Alphabet__Extensions__Decoder = const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder;
// No XER for UnicharList
const TTCN_Typedescriptor_t UnicharList_descr_ = { "@TCCEncoding_Functions.UnicharList", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &UNIVERSAL_CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       UnicharList_0_xer_ = { {"UNIVERSAL_CHARSTRING>\n", "UNIVERSAL_CHARSTRING>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t UnicharList_0_descr_ = { "@TCCEncoding_Functions.UnicharList.<oftype>", NULL, &UNIVERSAL_CHARSTRING_raw_, &UNIVERSAL_CHARSTRING_text_, &UnicharList_0_xer_, &UNIVERSAL_CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UnicharList const_c__GSM__7__bit__Default__Alphabet__Decoder;
const UnicharList& c__GSM__7__bit__Default__Alphabet__Decoder = const_c__GSM__7__bit__Default__Alphabet__Decoder;
TTCN_Module module_object("TCCEncoding_Functions", __DATE__, __TIME__, module_checksum, pre_init_module, "", 0U, 36U, 1U, 99U, "", 0LU, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

const RuntimeVersionChecker ver_checker(  current_runtime_version.requires_major_version_11,
  current_runtime_version.requires_minor_version_1,
  current_runtime_version.requires_patch_level_0,  current_runtime_version.requires_runtime_1);

/* Member functions of C++ classes */

NumberPlan::NumberPlan()
{
enum_value = UNBOUND_VALUE;
}

NumberPlan::NumberPlan(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.NumberPlan with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

NumberPlan::NumberPlan(enum_type other_value)
{
enum_value = other_value;
}

NumberPlan::NumberPlan(const NumberPlan& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
enum_value = other_value.enum_value;
}

NumberPlan& NumberPlan::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.NumberPlan.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

NumberPlan& NumberPlan::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

NumberPlan& NumberPlan::operator=(const NumberPlan& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
enum_value = other_value.enum_value;
return *this;
}

boolean NumberPlan::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.NumberPlan comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean NumberPlan::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value == other_value;
}

boolean NumberPlan::operator==(const NumberPlan& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value == other_value.enum_value;
}

boolean NumberPlan::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.NumberPlan comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean NumberPlan::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value < other_value;
}

boolean NumberPlan::operator<(const NumberPlan& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value < other_value.enum_value;
}

boolean NumberPlan::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.NumberPlan comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean NumberPlan::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value > other_value;
}

boolean NumberPlan::operator>(const NumberPlan& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value > other_value.enum_value;
}

const char *NumberPlan::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case unknownSpare: return "unknownSpare";
case ISDN__E__164: return "ISDN_E_164";
case spare1: return "spare1";
case data: return "data";
case telex: return "telex";
case reserved1: return "reserved1";
case reserved2: return "reserved2";
case spare2: return "spare2";
case national: return "national";
case private__: return "private_";
case reservedCTS: return "reservedCTS";
case reservedExtension: return "reservedExtension";
default:
return "<unknown>";
}
}

NumberPlan::enum_type NumberPlan::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "unknownSpare")) return unknownSpare;
if (!strcmp(str_par, "ISDN_E_164")) return ISDN__E__164;
if (!strcmp(str_par, "spare1")) return spare1;
if (!strcmp(str_par, "data")) return data;
if (!strcmp(str_par, "telex")) return telex;
if (!strcmp(str_par, "reserved1")) return reserved1;
if (!strcmp(str_par, "reserved2")) return reserved2;
if (!strcmp(str_par, "spare2")) return spare2;
if (!strcmp(str_par, "national")) return national;
if (!strcmp(str_par, "private_")) return private__;
if (!strcmp(str_par, "reservedCTS")) return reservedCTS;
if (!strcmp(str_par, "reservedExtension")) return reservedExtension;
}
return UNKNOWN_VALUE;
}

boolean NumberPlan::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 11:
case 15:
return TRUE;
default:
return FALSE;
}
}

int NumberPlan::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.NumberPlan.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int NumberPlan::enum2int(const NumberPlan& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.NumberPlan.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void NumberPlan::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.NumberPlan.", int_val);
enum_value = (enum_type)int_val;
}

NumberPlan::operator NumberPlan::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.NumberPlan.");
return enum_value;
}

void NumberPlan::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void NumberPlan::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.NumberPlan");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.NumberPlan.");
  }
}

void NumberPlan::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
text_buf.push_int(enum_value);
}

void NumberPlan::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.NumberPlan.", enum_value);
}

void NumberPlan_template::copy_template(const NumberPlan_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new NumberPlan_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new NumberPlan_template(*other_value.implication_.precondition);
implication_.implied_template = new NumberPlan_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
}

NumberPlan_template::NumberPlan_template()
{
}

NumberPlan_template::NumberPlan_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

NumberPlan_template::NumberPlan_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!NumberPlan::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.NumberPlan with unknown numeric value %d.", other_value);
single_value = (NumberPlan::enum_type)other_value;
}

NumberPlan_template::NumberPlan_template(NumberPlan::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

NumberPlan_template::NumberPlan_template(const NumberPlan& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == NumberPlan::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan.");
single_value = other_value.enum_value;
}

NumberPlan_template::NumberPlan_template(const OPTIONAL<NumberPlan>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (NumberPlan::enum_type)(const NumberPlan&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.NumberPlan from an unbound optional field.");
}
}

NumberPlan_template::NumberPlan_template(NumberPlan_template* p_precondition, NumberPlan_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

NumberPlan_template::NumberPlan_template(Dynamic_Match_Interface<NumberPlan>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<NumberPlan>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

NumberPlan_template::NumberPlan_template(const NumberPlan_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

NumberPlan_template::~NumberPlan_template()
{
clean_up();
}

boolean NumberPlan_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean NumberPlan_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != NumberPlan::UNBOUND_VALUE;
}

void NumberPlan_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

NumberPlan_template& NumberPlan_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

NumberPlan_template& NumberPlan_template::operator=(int other_value)
{
if (!NumberPlan::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.NumberPlan.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (NumberPlan::enum_type)other_value;
return *this;
}

NumberPlan_template& NumberPlan_template::operator=(NumberPlan::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

NumberPlan_template& NumberPlan_template::operator=(const NumberPlan& other_value)
{
if (other_value.enum_value == NumberPlan::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.NumberPlan to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

NumberPlan_template& NumberPlan_template::operator=(const OPTIONAL<NumberPlan>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (NumberPlan::enum_type)(const NumberPlan&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
return *this;
}

NumberPlan_template& NumberPlan_template::operator=(const NumberPlan_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean NumberPlan_template::match(NumberPlan::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
return FALSE;
}

boolean NumberPlan_template::match(const NumberPlan& other_value, boolean) const
{
if (other_value.enum_value == NumberPlan::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.NumberPlan with an unbound value.");
return match(other_value.enum_value);
}

NumberPlan::enum_type NumberPlan_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.NumberPlan.");
return single_value;
}

void NumberPlan_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new NumberPlan_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
}

NumberPlan_template& NumberPlan_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.NumberPlan.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.NumberPlan.");
return value_list.list_value[list_index];
}

void NumberPlan_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(NumberPlan::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void NumberPlan_template::log_match(const NumberPlan& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void NumberPlan_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
}

void NumberPlan_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (NumberPlan::enum_type)text_buf.pull_int().get_val();
if (!NumberPlan::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.NumberPlan.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new NumberPlan_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.NumberPlan.");
}
}

boolean NumberPlan_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean NumberPlan_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void NumberPlan_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    NumberPlan_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    NumberPlan::enum_type enum_val = NumberPlan::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!NumberPlan::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.NumberPlan.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    NumberPlan_template* precondition = new NumberPlan_template;
    precondition->set_param(*m_p->get_elem(0));
    NumberPlan_template* implied_template = new NumberPlan_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = NumberPlan_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.NumberPlan");
  }
  is_ifpresent = param.get_ifpresent();
}

void NumberPlan_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.NumberPlan");
}

ISUP__NatureOfAddress::ISUP__NatureOfAddress()
{
enum_value = UNBOUND_VALUE;
}

ISUP__NatureOfAddress::ISUP__NatureOfAddress(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

ISUP__NatureOfAddress::ISUP__NatureOfAddress(enum_type other_value)
{
enum_value = other_value;
}

ISUP__NatureOfAddress::ISUP__NatureOfAddress(const ISUP__NatureOfAddress& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
enum_value = other_value.enum_value;
}

ISUP__NatureOfAddress& ISUP__NatureOfAddress::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

ISUP__NatureOfAddress& ISUP__NatureOfAddress::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

ISUP__NatureOfAddress& ISUP__NatureOfAddress::operator=(const ISUP__NatureOfAddress& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
enum_value = other_value.enum_value;
return *this;
}

boolean ISUP__NatureOfAddress::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean ISUP__NatureOfAddress::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value == other_value;
}

boolean ISUP__NatureOfAddress::operator==(const ISUP__NatureOfAddress& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value == other_value.enum_value;
}

boolean ISUP__NatureOfAddress::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean ISUP__NatureOfAddress::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value < other_value;
}

boolean ISUP__NatureOfAddress::operator<(const ISUP__NatureOfAddress& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value < other_value.enum_value;
}

boolean ISUP__NatureOfAddress::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean ISUP__NatureOfAddress::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value > other_value;
}

boolean ISUP__NatureOfAddress::operator>(const ISUP__NatureOfAddress& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value > other_value.enum_value;
}

const char *ISUP__NatureOfAddress::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case spare: return "spare";
case subscriberNumber: return "subscriberNumber";
case unknown: return "unknown";
case nationalNumber: return "nationalNumber";
case internationalNumber: return "internationalNumber";
case networkRoutingNumber: return "networkRoutingNumber";
case networkRoutingNumberNationalNrFormat: return "networkRoutingNumberNationalNrFormat";
case networkRoutingNumberNetworkSpecificNrFormat: return "networkRoutingNumberNetworkSpecificNrFormat";
case networkRoutingNumberConcatenatedWith__CDN: return "networkRoutingNumberConcatenatedWith_CDN";
default:
return "<unknown>";
}
}

ISUP__NatureOfAddress::enum_type ISUP__NatureOfAddress::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "spare")) return spare;
if (!strcmp(str_par, "subscriberNumber")) return subscriberNumber;
if (!strcmp(str_par, "unknown")) return unknown;
if (!strcmp(str_par, "nationalNumber")) return nationalNumber;
if (!strcmp(str_par, "internationalNumber")) return internationalNumber;
if (!strcmp(str_par, "networkRoutingNumber")) return networkRoutingNumber;
if (!strcmp(str_par, "networkRoutingNumberNationalNrFormat")) return networkRoutingNumberNationalNrFormat;
if (!strcmp(str_par, "networkRoutingNumberNetworkSpecificNrFormat")) return networkRoutingNumberNetworkSpecificNrFormat;
if (!strcmp(str_par, "networkRoutingNumberConcatenatedWith_CDN")) return networkRoutingNumberConcatenatedWith__CDN;
}
return UNKNOWN_VALUE;
}

boolean ISUP__NatureOfAddress::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
return TRUE;
default:
return FALSE;
}
}

int ISUP__NatureOfAddress::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int ISUP__NatureOfAddress::enum2int(const ISUP__NatureOfAddress& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void ISUP__NatureOfAddress::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", int_val);
enum_value = (enum_type)int_val;
}

ISUP__NatureOfAddress::operator ISUP__NatureOfAddress::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return enum_value;
}

void ISUP__NatureOfAddress::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void ISUP__NatureOfAddress::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.ISUP_NatureOfAddress");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
  }
}

void ISUP__NatureOfAddress::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
text_buf.push_int(enum_value);
}

void ISUP__NatureOfAddress::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", enum_value);
}

void ISUP__NatureOfAddress_template::copy_template(const ISUP__NatureOfAddress_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__NatureOfAddress_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__NatureOfAddress_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__NatureOfAddress_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template()
{
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!ISUP__NatureOfAddress::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress with unknown numeric value %d.", other_value);
single_value = (ISUP__NatureOfAddress::enum_type)other_value;
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(ISUP__NatureOfAddress::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(const ISUP__NatureOfAddress& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == ISUP__NatureOfAddress::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
single_value = other_value.enum_value;
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(const OPTIONAL<ISUP__NatureOfAddress>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NatureOfAddress::enum_type)(const ISUP__NatureOfAddress&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress from an unbound optional field.");
}
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(ISUP__NatureOfAddress_template* p_precondition, ISUP__NatureOfAddress_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(Dynamic_Match_Interface<ISUP__NatureOfAddress>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__NatureOfAddress>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__NatureOfAddress_template::ISUP__NatureOfAddress_template(const ISUP__NatureOfAddress_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

ISUP__NatureOfAddress_template::~ISUP__NatureOfAddress_template()
{
clean_up();
}

boolean ISUP__NatureOfAddress_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean ISUP__NatureOfAddress_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != ISUP__NatureOfAddress::UNBOUND_VALUE;
}

void ISUP__NatureOfAddress_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(int other_value)
{
if (!ISUP__NatureOfAddress::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NatureOfAddress::enum_type)other_value;
return *this;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(ISUP__NatureOfAddress::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(const ISUP__NatureOfAddress& other_value)
{
if (other_value.enum_value == ISUP__NatureOfAddress::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(const OPTIONAL<ISUP__NatureOfAddress>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NatureOfAddress::enum_type)(const ISUP__NatureOfAddress&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
return *this;
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::operator=(const ISUP__NatureOfAddress_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__NatureOfAddress_template::match(ISUP__NatureOfAddress::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
return FALSE;
}

boolean ISUP__NatureOfAddress_template::match(const ISUP__NatureOfAddress& other_value, boolean) const
{
if (other_value.enum_value == ISUP__NatureOfAddress::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress with an unbound value.");
return match(other_value.enum_value);
}

ISUP__NatureOfAddress::enum_type ISUP__NatureOfAddress_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return single_value;
}

void ISUP__NatureOfAddress_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__NatureOfAddress_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
}

ISUP__NatureOfAddress_template& ISUP__NatureOfAddress_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
return value_list.list_value[list_index];
}

void ISUP__NatureOfAddress_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(ISUP__NatureOfAddress::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__NatureOfAddress_template::log_match(const ISUP__NatureOfAddress& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void ISUP__NatureOfAddress_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
}

void ISUP__NatureOfAddress_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (ISUP__NatureOfAddress::enum_type)text_buf.pull_int().get_val();
if (!ISUP__NatureOfAddress::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__NatureOfAddress_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
}
}

boolean ISUP__NatureOfAddress_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__NatureOfAddress_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void ISUP__NatureOfAddress_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__NatureOfAddress_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    ISUP__NatureOfAddress::enum_type enum_val = ISUP__NatureOfAddress::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!ISUP__NatureOfAddress::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_NatureOfAddress.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__NatureOfAddress_template* precondition = new ISUP__NatureOfAddress_template;
    precondition->set_param(*m_p->get_elem(0));
    ISUP__NatureOfAddress_template* implied_template = new ISUP__NatureOfAddress_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = ISUP__NatureOfAddress_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.ISUP_NatureOfAddress");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__NatureOfAddress_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_NatureOfAddress");
}

ISUP__NumberingIncompleteIndicator::ISUP__NumberingIncompleteIndicator()
{
enum_value = UNBOUND_VALUE;
}

ISUP__NumberingIncompleteIndicator::ISUP__NumberingIncompleteIndicator(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

ISUP__NumberingIncompleteIndicator::ISUP__NumberingIncompleteIndicator(enum_type other_value)
{
enum_value = other_value;
}

ISUP__NumberingIncompleteIndicator::ISUP__NumberingIncompleteIndicator(const ISUP__NumberingIncompleteIndicator& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
enum_value = other_value.enum_value;
}

ISUP__NumberingIncompleteIndicator& ISUP__NumberingIncompleteIndicator::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

ISUP__NumberingIncompleteIndicator& ISUP__NumberingIncompleteIndicator::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

ISUP__NumberingIncompleteIndicator& ISUP__NumberingIncompleteIndicator::operator=(const ISUP__NumberingIncompleteIndicator& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
enum_value = other_value.enum_value;
return *this;
}

boolean ISUP__NumberingIncompleteIndicator::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value == other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator==(const ISUP__NumberingIncompleteIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value == other_value.enum_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value < other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator<(const ISUP__NumberingIncompleteIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value < other_value.enum_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value > other_value;
}

boolean ISUP__NumberingIncompleteIndicator::operator>(const ISUP__NumberingIncompleteIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value > other_value.enum_value;
}

const char *ISUP__NumberingIncompleteIndicator::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case numberComplete: return "numberComplete";
case numberIncomplete: return "numberIncomplete";
default:
return "<unknown>";
}
}

ISUP__NumberingIncompleteIndicator::enum_type ISUP__NumberingIncompleteIndicator::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "numberComplete")) return numberComplete;
if (!strcmp(str_par, "numberIncomplete")) return numberIncomplete;
}
return UNKNOWN_VALUE;
}

boolean ISUP__NumberingIncompleteIndicator::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
return TRUE;
default:
return FALSE;
}
}

int ISUP__NumberingIncompleteIndicator::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int ISUP__NumberingIncompleteIndicator::enum2int(const ISUP__NumberingIncompleteIndicator& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void ISUP__NumberingIncompleteIndicator::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", int_val);
enum_value = (enum_type)int_val;
}

ISUP__NumberingIncompleteIndicator::operator ISUP__NumberingIncompleteIndicator::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return enum_value;
}

void ISUP__NumberingIncompleteIndicator::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void ISUP__NumberingIncompleteIndicator::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
  }
}

void ISUP__NumberingIncompleteIndicator::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
text_buf.push_int(enum_value);
}

void ISUP__NumberingIncompleteIndicator::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", enum_value);
}

void ISUP__NumberingIncompleteIndicator_template::copy_template(const ISUP__NumberingIncompleteIndicator_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__NumberingIncompleteIndicator_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__NumberingIncompleteIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__NumberingIncompleteIndicator_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template()
{
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!ISUP__NumberingIncompleteIndicator::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator with unknown numeric value %d.", other_value);
single_value = (ISUP__NumberingIncompleteIndicator::enum_type)other_value;
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(ISUP__NumberingIncompleteIndicator::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(const ISUP__NumberingIncompleteIndicator& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == ISUP__NumberingIncompleteIndicator::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
single_value = other_value.enum_value;
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(const OPTIONAL<ISUP__NumberingIncompleteIndicator>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NumberingIncompleteIndicator::enum_type)(const ISUP__NumberingIncompleteIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator from an unbound optional field.");
}
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(ISUP__NumberingIncompleteIndicator_template* p_precondition, ISUP__NumberingIncompleteIndicator_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(Dynamic_Match_Interface<ISUP__NumberingIncompleteIndicator>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__NumberingIncompleteIndicator>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__NumberingIncompleteIndicator_template::ISUP__NumberingIncompleteIndicator_template(const ISUP__NumberingIncompleteIndicator_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

ISUP__NumberingIncompleteIndicator_template::~ISUP__NumberingIncompleteIndicator_template()
{
clean_up();
}

boolean ISUP__NumberingIncompleteIndicator_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean ISUP__NumberingIncompleteIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != ISUP__NumberingIncompleteIndicator::UNBOUND_VALUE;
}

void ISUP__NumberingIncompleteIndicator_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(int other_value)
{
if (!ISUP__NumberingIncompleteIndicator::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NumberingIncompleteIndicator::enum_type)other_value;
return *this;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(ISUP__NumberingIncompleteIndicator::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(const ISUP__NumberingIncompleteIndicator& other_value)
{
if (other_value.enum_value == ISUP__NumberingIncompleteIndicator::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(const OPTIONAL<ISUP__NumberingIncompleteIndicator>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__NumberingIncompleteIndicator::enum_type)(const ISUP__NumberingIncompleteIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
return *this;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::operator=(const ISUP__NumberingIncompleteIndicator_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__NumberingIncompleteIndicator_template::match(ISUP__NumberingIncompleteIndicator::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
return FALSE;
}

boolean ISUP__NumberingIncompleteIndicator_template::match(const ISUP__NumberingIncompleteIndicator& other_value, boolean) const
{
if (other_value.enum_value == ISUP__NumberingIncompleteIndicator::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator with an unbound value.");
return match(other_value.enum_value);
}

ISUP__NumberingIncompleteIndicator::enum_type ISUP__NumberingIncompleteIndicator_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return single_value;
}

void ISUP__NumberingIncompleteIndicator_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__NumberingIncompleteIndicator_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
}

ISUP__NumberingIncompleteIndicator_template& ISUP__NumberingIncompleteIndicator_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
return value_list.list_value[list_index];
}

void ISUP__NumberingIncompleteIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(ISUP__NumberingIncompleteIndicator::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__NumberingIncompleteIndicator_template::log_match(const ISUP__NumberingIncompleteIndicator& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void ISUP__NumberingIncompleteIndicator_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
}

void ISUP__NumberingIncompleteIndicator_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (ISUP__NumberingIncompleteIndicator::enum_type)text_buf.pull_int().get_val();
if (!ISUP__NumberingIncompleteIndicator::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__NumberingIncompleteIndicator_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
}
}

boolean ISUP__NumberingIncompleteIndicator_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__NumberingIncompleteIndicator_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void ISUP__NumberingIncompleteIndicator_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__NumberingIncompleteIndicator_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    ISUP__NumberingIncompleteIndicator::enum_type enum_val = ISUP__NumberingIncompleteIndicator::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!ISUP__NumberingIncompleteIndicator::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__NumberingIncompleteIndicator_template* precondition = new ISUP__NumberingIncompleteIndicator_template;
    precondition->set_param(*m_p->get_elem(0));
    ISUP__NumberingIncompleteIndicator_template* implied_template = new ISUP__NumberingIncompleteIndicator_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = ISUP__NumberingIncompleteIndicator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__NumberingIncompleteIndicator_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_NumberingIncompleteIndicator");
}

ISUP__Called__Party__Number::ISUP__Called__Party__Number()
{
}

ISUP__Called__Party__Number::ISUP__Called__Party__Number(const ISUP__NatureOfAddress& par_natureOfAddressIndicator,
    const NumberPlan& par_numberingPlanIndicator,
    const ISUP__NumberingIncompleteIndicator& par_iNN,
    const HEXSTRING& par_addressSignalDigits)
  :   field_natureOfAddressIndicator(par_natureOfAddressIndicator),
  field_numberingPlanIndicator(par_numberingPlanIndicator),
  field_iNN(par_iNN),
  field_addressSignalDigits(par_addressSignalDigits)
{
}

ISUP__Called__Party__Number::ISUP__Called__Party__Number(const ISUP__Called__Party__Number& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
if (other_value.natureOfAddressIndicator().is_bound()) field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
else field_natureOfAddressIndicator.clean_up();
if (other_value.numberingPlanIndicator().is_bound()) field_numberingPlanIndicator = other_value.numberingPlanIndicator();
else field_numberingPlanIndicator.clean_up();
if (other_value.iNN().is_bound()) field_iNN = other_value.iNN();
else field_iNN.clean_up();
if (other_value.addressSignalDigits().is_bound()) field_addressSignalDigits = other_value.addressSignalDigits();
else field_addressSignalDigits.clean_up();
}

void ISUP__Called__Party__Number::clean_up()
{
field_natureOfAddressIndicator.clean_up();
field_numberingPlanIndicator.clean_up();
field_iNN.clean_up();
field_addressSignalDigits.clean_up();
}

const TTCN_Typedescriptor_t* ISUP__Called__Party__Number::get_descriptor() const { return &ISUP__Called__Party__Number_descr_; }
ISUP__Called__Party__Number& ISUP__Called__Party__Number::operator=(const ISUP__Called__Party__Number& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
  if (other_value.natureOfAddressIndicator().is_bound()) field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
  else field_natureOfAddressIndicator.clean_up();
  if (other_value.numberingPlanIndicator().is_bound()) field_numberingPlanIndicator = other_value.numberingPlanIndicator();
  else field_numberingPlanIndicator.clean_up();
  if (other_value.iNN().is_bound()) field_iNN = other_value.iNN();
  else field_iNN.clean_up();
  if (other_value.addressSignalDigits().is_bound()) field_addressSignalDigits = other_value.addressSignalDigits();
  else field_addressSignalDigits.clean_up();
}
return *this;
}

boolean ISUP__Called__Party__Number::operator==(const ISUP__Called__Party__Number& other_value) const
{
return field_natureOfAddressIndicator==other_value.field_natureOfAddressIndicator
  && field_numberingPlanIndicator==other_value.field_numberingPlanIndicator
  && field_iNN==other_value.field_iNN
  && field_addressSignalDigits==other_value.field_addressSignalDigits;
}

boolean ISUP__Called__Party__Number::is_bound() const
{
return (field_natureOfAddressIndicator.is_bound())
  || (field_numberingPlanIndicator.is_bound())
  || (field_iNN.is_bound())
  || (field_addressSignalDigits.is_bound());
}
boolean ISUP__Called__Party__Number::is_value() const
{
return field_natureOfAddressIndicator.is_value()
  && field_numberingPlanIndicator.is_value()
  && field_iNN.is_value()
  && field_addressSignalDigits.is_value();
}
void ISUP__Called__Party__Number::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
field_natureOfAddressIndicator.log();
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
field_numberingPlanIndicator.log();
TTCN_Logger::log_event_str(", iNN := ");
field_iNN.log();
TTCN_Logger::log_event_str(", addressSignalDigits := ");
field_addressSignalDigits.log();
TTCN_Logger::log_event_str(" }");
}

void ISUP__Called__Party__Number::set_implicit_omit()
{
if (natureOfAddressIndicator().is_bound()) natureOfAddressIndicator().set_implicit_omit();
if (numberingPlanIndicator().is_bound()) numberingPlanIndicator().set_implicit_omit();
if (iNN().is_bound()) iNN().set_implicit_omit();
if (addressSignalDigits().is_bound()) addressSignalDigits().set_implicit_omit();
}

void ISUP__Called__Party__Number::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @TCCEncoding_Functions.ISUP_Called_Party_Number has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) natureOfAddressIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) iNN().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) addressSignalDigits().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "natureOfAddressIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          natureOfAddressIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "iNN")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iNN().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "addressSignalDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          addressSignalDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.ISUP_Called_Party_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@TCCEncoding_Functions.ISUP_Called_Party_Number");
  }
}

void ISUP__Called__Party__Number::encode_text(Text_Buf& text_buf) const
{
field_natureOfAddressIndicator.encode_text(text_buf);
field_numberingPlanIndicator.encode_text(text_buf);
field_iNN.encode_text(text_buf);
field_addressSignalDigits.encode_text(text_buf);
}

void ISUP__Called__Party__Number::decode_text(Text_Buf& text_buf)
{
field_natureOfAddressIndicator.decode_text(text_buf);
field_numberingPlanIndicator.decode_text(text_buf);
field_iNN.decode_text(text_buf);
field_addressSignalDigits.decode_text(text_buf);
}

struct ISUP__Called__Party__Number_template::single_value_struct {
ISUP__NatureOfAddress_template field_natureOfAddressIndicator;
NumberPlan_template field_numberingPlanIndicator;
ISUP__NumberingIncompleteIndicator_template field_iNN;
HEXSTRING_template field_addressSignalDigits;
};

void ISUP__Called__Party__Number_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_natureOfAddressIndicator = ANY_VALUE;
single_value->field_numberingPlanIndicator = ANY_VALUE;
single_value->field_iNN = ANY_VALUE;
single_value->field_addressSignalDigits = ANY_VALUE;
}
}
}

void ISUP__Called__Party__Number_template::copy_value(const ISUP__Called__Party__Number& other_value)
{
single_value = new single_value_struct;
if (other_value.natureOfAddressIndicator().is_bound()) {
  single_value->field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
} else {
  single_value->field_natureOfAddressIndicator.clean_up();
}
if (other_value.numberingPlanIndicator().is_bound()) {
  single_value->field_numberingPlanIndicator = other_value.numberingPlanIndicator();
} else {
  single_value->field_numberingPlanIndicator.clean_up();
}
if (other_value.iNN().is_bound()) {
  single_value->field_iNN = other_value.iNN();
} else {
  single_value->field_iNN.clean_up();
}
if (other_value.addressSignalDigits().is_bound()) {
  single_value->field_addressSignalDigits = other_value.addressSignalDigits();
} else {
  single_value->field_addressSignalDigits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ISUP__Called__Party__Number_template::copy_template(const ISUP__Called__Party__Number_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.natureOfAddressIndicator().get_selection()) {
single_value->field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
} else {
single_value->field_natureOfAddressIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlanIndicator().get_selection()) {
single_value->field_numberingPlanIndicator = other_value.numberingPlanIndicator();
} else {
single_value->field_numberingPlanIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.iNN().get_selection()) {
single_value->field_iNN = other_value.iNN();
} else {
single_value->field_iNN.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.addressSignalDigits().get_selection()) {
single_value->field_addressSignalDigits = other_value.addressSignalDigits();
} else {
single_value->field_addressSignalDigits.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__Called__Party__Number_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__Called__Party__Number_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__Called__Party__Number_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
break;
}
set_selection(other_value);
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template()
{
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(const ISUP__Called__Party__Number& other_value)
{
copy_value(other_value);
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(const OPTIONAL<ISUP__Called__Party__Number>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ISUP__Called__Party__Number&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number from an unbound optional field.");
}
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(ISUP__Called__Party__Number_template* p_precondition, ISUP__Called__Party__Number_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(Dynamic_Match_Interface<ISUP__Called__Party__Number>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__Called__Party__Number>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__Called__Party__Number_template::ISUP__Called__Party__Number_template(const ISUP__Called__Party__Number_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

ISUP__Called__Party__Number_template::~ISUP__Called__Party__Number_template()
{
clean_up();
}

ISUP__Called__Party__Number_template& ISUP__Called__Party__Number_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__Called__Party__Number_template& ISUP__Called__Party__Number_template::operator=(const ISUP__Called__Party__Number& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

ISUP__Called__Party__Number_template& ISUP__Called__Party__Number_template::operator=(const OPTIONAL<ISUP__Called__Party__Number>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ISUP__Called__Party__Number&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
}
return *this;
}

ISUP__Called__Party__Number_template& ISUP__Called__Party__Number_template::operator=(const ISUP__Called__Party__Number_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__Called__Party__Number_template::match(const ISUP__Called__Party__Number& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.natureOfAddressIndicator().is_bound()) return FALSE;
if(!single_value->field_natureOfAddressIndicator.match(other_value.natureOfAddressIndicator(), legacy))return FALSE;
if(!other_value.numberingPlanIndicator().is_bound()) return FALSE;
if(!single_value->field_numberingPlanIndicator.match(other_value.numberingPlanIndicator(), legacy))return FALSE;
if(!other_value.iNN().is_bound()) return FALSE;
if(!single_value->field_iNN.match(other_value.iNN(), legacy))return FALSE;
if(!other_value.addressSignalDigits().is_bound()) return FALSE;
if(!single_value->field_addressSignalDigits.match(other_value.addressSignalDigits(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
}
return FALSE;
}

boolean ISUP__Called__Party__Number_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_natureOfAddressIndicator.is_bound()
 || single_value->field_numberingPlanIndicator.is_bound()
 || single_value->field_iNN.is_bound()
 || single_value->field_addressSignalDigits.is_bound();
}

boolean ISUP__Called__Party__Number_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_natureOfAddressIndicator.is_value()
 && single_value->field_numberingPlanIndicator.is_value()
 && single_value->field_iNN.is_value()
 && single_value->field_addressSignalDigits.is_value();
}

void ISUP__Called__Party__Number_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__Called__Party__Number ISUP__Called__Party__Number_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
ISUP__Called__Party__Number ret_val;
if (single_value->field_natureOfAddressIndicator.is_bound()) {
ret_val.natureOfAddressIndicator() = single_value->field_natureOfAddressIndicator.valueof();
}
if (single_value->field_numberingPlanIndicator.is_bound()) {
ret_val.numberingPlanIndicator() = single_value->field_numberingPlanIndicator.valueof();
}
if (single_value->field_iNN.is_bound()) {
ret_val.iNN() = single_value->field_iNN.valueof();
}
if (single_value->field_addressSignalDigits.is_bound()) {
ret_val.addressSignalDigits() = single_value->field_addressSignalDigits.valueof();
}
return ret_val;
}

void ISUP__Called__Party__Number_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__Called__Party__Number_template[list_length];
}

ISUP__Called__Party__Number_template& ISUP__Called__Party__Number_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
return value_list.list_value[list_index];
}

ISUP__NatureOfAddress_template& ISUP__Called__Party__Number_template::natureOfAddressIndicator()
{
set_specific();
return single_value->field_natureOfAddressIndicator;
}

const ISUP__NatureOfAddress_template& ISUP__Called__Party__Number_template::natureOfAddressIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field natureOfAddressIndicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
return single_value->field_natureOfAddressIndicator;
}

NumberPlan_template& ISUP__Called__Party__Number_template::numberingPlanIndicator()
{
set_specific();
return single_value->field_numberingPlanIndicator;
}

const NumberPlan_template& ISUP__Called__Party__Number_template::numberingPlanIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlanIndicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
return single_value->field_numberingPlanIndicator;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__Called__Party__Number_template::iNN()
{
set_specific();
return single_value->field_iNN;
}

const ISUP__NumberingIncompleteIndicator_template& ISUP__Called__Party__Number_template::iNN() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field iNN of a non-specific template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
return single_value->field_iNN;
}

HEXSTRING_template& ISUP__Called__Party__Number_template::addressSignalDigits()
{
set_specific();
return single_value->field_addressSignalDigits;
}

const HEXSTRING_template& ISUP__Called__Party__Number_template::addressSignalDigits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field addressSignalDigits of a non-specific template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
return single_value->field_addressSignalDigits;
}

int ISUP__Called__Party__Number_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
    return 4;
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
  }
  return 0;
}

void ISUP__Called__Party__Number_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
single_value->field_natureOfAddressIndicator.log();
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
single_value->field_numberingPlanIndicator.log();
TTCN_Logger::log_event_str(", iNN := ");
single_value->field_iNN.log();
TTCN_Logger::log_event_str(", addressSignalDigits := ");
single_value->field_addressSignalDigits.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__Called__Party__Number_template::log_match(const ISUP__Called__Party__Number& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_natureOfAddressIndicator.match(match_value.natureOfAddressIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".natureOfAddressIndicator");
single_value->field_natureOfAddressIndicator.log_match(match_value.natureOfAddressIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberingPlanIndicator.match(match_value.numberingPlanIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlanIndicator");
single_value->field_numberingPlanIndicator.log_match(match_value.numberingPlanIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_iNN.match(match_value.iNN(), legacy)){
TTCN_Logger::log_logmatch_info(".iNN");
single_value->field_iNN.log_match(match_value.iNN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_addressSignalDigits.match(match_value.addressSignalDigits(), legacy)){
TTCN_Logger::log_logmatch_info(".addressSignalDigits");
single_value->field_addressSignalDigits.log_match(match_value.addressSignalDigits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
single_value->field_natureOfAddressIndicator.log_match(match_value.natureOfAddressIndicator(), legacy);
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
single_value->field_numberingPlanIndicator.log_match(match_value.numberingPlanIndicator(), legacy);
TTCN_Logger::log_event_str(", iNN := ");
single_value->field_iNN.log_match(match_value.iNN(), legacy);
TTCN_Logger::log_event_str(", addressSignalDigits := ");
single_value->field_addressSignalDigits.log_match(match_value.addressSignalDigits(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ISUP__Called__Party__Number_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (natureOfAddressIndicator().is_bound()) natureOfAddressIndicator().set_implicit_omit();
if (numberingPlanIndicator().is_bound()) numberingPlanIndicator().set_implicit_omit();
if (iNN().is_bound()) iNN().set_implicit_omit();
if (addressSignalDigits().is_bound()) addressSignalDigits().set_implicit_omit();
}

void ISUP__Called__Party__Number_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_natureOfAddressIndicator.encode_text(text_buf);
single_value->field_numberingPlanIndicator.encode_text(text_buf);
single_value->field_iNN.encode_text(text_buf);
single_value->field_addressSignalDigits.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
}
}

void ISUP__Called__Party__Number_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_natureOfAddressIndicator.decode_text(text_buf);
single_value->field_numberingPlanIndicator.decode_text(text_buf);
single_value->field_iNN.decode_text(text_buf);
single_value->field_addressSignalDigits.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__Called__Party__Number_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @TCCEncoding_Functions.ISUP_Called_Party_Number.");
}
}

void ISUP__Called__Party__Number_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__Called__Party__Number_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record template of type @TCCEncoding_Functions.ISUP_Called_Party_Number has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) natureOfAddressIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) iNN().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) addressSignalDigits().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "natureOfAddressIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          natureOfAddressIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "iNN")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iNN().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "addressSignalDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          addressSignalDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.ISUP_Called_Party_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__Called__Party__Number_template* precondition = new ISUP__Called__Party__Number_template;
    precondition->set_param(*param.get_elem(0));
    ISUP__Called__Party__Number_template* implied_template = new ISUP__Called__Party__Number_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ISUP__Called__Party__Number_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@TCCEncoding_Functions.ISUP_Called_Party_Number");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__Called__Party__Number_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_natureOfAddressIndicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Called_Party_Number");
single_value->field_numberingPlanIndicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Called_Party_Number");
single_value->field_iNN.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Called_Party_Number");
single_value->field_addressSignalDigits.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Called_Party_Number");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_Called_Party_Number");
}

boolean ISUP__Called__Party__Number_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__Called__Party__Number_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

ISUP__ScreeningIndicator::ISUP__ScreeningIndicator()
{
enum_value = UNBOUND_VALUE;
}

ISUP__ScreeningIndicator::ISUP__ScreeningIndicator(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

ISUP__ScreeningIndicator::ISUP__ScreeningIndicator(enum_type other_value)
{
enum_value = other_value;
}

ISUP__ScreeningIndicator::ISUP__ScreeningIndicator(const ISUP__ScreeningIndicator& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
enum_value = other_value.enum_value;
}

ISUP__ScreeningIndicator& ISUP__ScreeningIndicator::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

ISUP__ScreeningIndicator& ISUP__ScreeningIndicator::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

ISUP__ScreeningIndicator& ISUP__ScreeningIndicator::operator=(const ISUP__ScreeningIndicator& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
enum_value = other_value.enum_value;
return *this;
}

boolean ISUP__ScreeningIndicator::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean ISUP__ScreeningIndicator::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value == other_value;
}

boolean ISUP__ScreeningIndicator::operator==(const ISUP__ScreeningIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value == other_value.enum_value;
}

boolean ISUP__ScreeningIndicator::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean ISUP__ScreeningIndicator::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value < other_value;
}

boolean ISUP__ScreeningIndicator::operator<(const ISUP__ScreeningIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value < other_value.enum_value;
}

boolean ISUP__ScreeningIndicator::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean ISUP__ScreeningIndicator::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value > other_value;
}

boolean ISUP__ScreeningIndicator::operator>(const ISUP__ScreeningIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value > other_value.enum_value;
}

const char *ISUP__ScreeningIndicator::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case user__provided__not__verified: return "user_provided_not_verified";
case user__provided__verified__passed: return "user_provided_verified_passed";
case user__provided__verified__failed: return "user_provided_verified_failed";
case network__provided: return "network_provided";
default:
return "<unknown>";
}
}

ISUP__ScreeningIndicator::enum_type ISUP__ScreeningIndicator::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "user_provided_not_verified")) return user__provided__not__verified;
if (!strcmp(str_par, "user_provided_verified_passed")) return user__provided__verified__passed;
if (!strcmp(str_par, "user_provided_verified_failed")) return user__provided__verified__failed;
if (!strcmp(str_par, "network_provided")) return network__provided;
}
return UNKNOWN_VALUE;
}

boolean ISUP__ScreeningIndicator::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
return TRUE;
default:
return FALSE;
}
}

int ISUP__ScreeningIndicator::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int ISUP__ScreeningIndicator::enum2int(const ISUP__ScreeningIndicator& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void ISUP__ScreeningIndicator::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", int_val);
enum_value = (enum_type)int_val;
}

ISUP__ScreeningIndicator::operator ISUP__ScreeningIndicator::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return enum_value;
}

void ISUP__ScreeningIndicator::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void ISUP__ScreeningIndicator::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.ISUP_ScreeningIndicator");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
  }
}

void ISUP__ScreeningIndicator::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
text_buf.push_int(enum_value);
}

void ISUP__ScreeningIndicator::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", enum_value);
}

void ISUP__ScreeningIndicator_template::copy_template(const ISUP__ScreeningIndicator_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__ScreeningIndicator_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__ScreeningIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__ScreeningIndicator_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template()
{
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!ISUP__ScreeningIndicator::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator with unknown numeric value %d.", other_value);
single_value = (ISUP__ScreeningIndicator::enum_type)other_value;
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(ISUP__ScreeningIndicator::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(const ISUP__ScreeningIndicator& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == ISUP__ScreeningIndicator::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
single_value = other_value.enum_value;
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(const OPTIONAL<ISUP__ScreeningIndicator>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__ScreeningIndicator::enum_type)(const ISUP__ScreeningIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator from an unbound optional field.");
}
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(ISUP__ScreeningIndicator_template* p_precondition, ISUP__ScreeningIndicator_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(Dynamic_Match_Interface<ISUP__ScreeningIndicator>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__ScreeningIndicator>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__ScreeningIndicator_template::ISUP__ScreeningIndicator_template(const ISUP__ScreeningIndicator_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

ISUP__ScreeningIndicator_template::~ISUP__ScreeningIndicator_template()
{
clean_up();
}

boolean ISUP__ScreeningIndicator_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean ISUP__ScreeningIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != ISUP__ScreeningIndicator::UNBOUND_VALUE;
}

void ISUP__ScreeningIndicator_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(int other_value)
{
if (!ISUP__ScreeningIndicator::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__ScreeningIndicator::enum_type)other_value;
return *this;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(ISUP__ScreeningIndicator::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(const ISUP__ScreeningIndicator& other_value)
{
if (other_value.enum_value == ISUP__ScreeningIndicator::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(const OPTIONAL<ISUP__ScreeningIndicator>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__ScreeningIndicator::enum_type)(const ISUP__ScreeningIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
return *this;
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::operator=(const ISUP__ScreeningIndicator_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__ScreeningIndicator_template::match(ISUP__ScreeningIndicator::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
return FALSE;
}

boolean ISUP__ScreeningIndicator_template::match(const ISUP__ScreeningIndicator& other_value, boolean) const
{
if (other_value.enum_value == ISUP__ScreeningIndicator::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator with an unbound value.");
return match(other_value.enum_value);
}

ISUP__ScreeningIndicator::enum_type ISUP__ScreeningIndicator_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return single_value;
}

void ISUP__ScreeningIndicator_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__ScreeningIndicator_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
}

ISUP__ScreeningIndicator_template& ISUP__ScreeningIndicator_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
return value_list.list_value[list_index];
}

void ISUP__ScreeningIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(ISUP__ScreeningIndicator::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__ScreeningIndicator_template::log_match(const ISUP__ScreeningIndicator& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void ISUP__ScreeningIndicator_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
}

void ISUP__ScreeningIndicator_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (ISUP__ScreeningIndicator::enum_type)text_buf.pull_int().get_val();
if (!ISUP__ScreeningIndicator::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__ScreeningIndicator_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
}
}

boolean ISUP__ScreeningIndicator_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__ScreeningIndicator_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void ISUP__ScreeningIndicator_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__ScreeningIndicator_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    ISUP__ScreeningIndicator::enum_type enum_val = ISUP__ScreeningIndicator::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!ISUP__ScreeningIndicator::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_ScreeningIndicator.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__ScreeningIndicator_template* precondition = new ISUP__ScreeningIndicator_template;
    precondition->set_param(*m_p->get_elem(0));
    ISUP__ScreeningIndicator_template* implied_template = new ISUP__ScreeningIndicator_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = ISUP__ScreeningIndicator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.ISUP_ScreeningIndicator");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__ScreeningIndicator_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_ScreeningIndicator");
}

ISUP__AddressPresentationRestrictedIndicator::ISUP__AddressPresentationRestrictedIndicator()
{
enum_value = UNBOUND_VALUE;
}

ISUP__AddressPresentationRestrictedIndicator::ISUP__AddressPresentationRestrictedIndicator(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

ISUP__AddressPresentationRestrictedIndicator::ISUP__AddressPresentationRestrictedIndicator(enum_type other_value)
{
enum_value = other_value;
}

ISUP__AddressPresentationRestrictedIndicator::ISUP__AddressPresentationRestrictedIndicator(const ISUP__AddressPresentationRestrictedIndicator& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
enum_value = other_value.enum_value;
}

ISUP__AddressPresentationRestrictedIndicator& ISUP__AddressPresentationRestrictedIndicator::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

ISUP__AddressPresentationRestrictedIndicator& ISUP__AddressPresentationRestrictedIndicator::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

ISUP__AddressPresentationRestrictedIndicator& ISUP__AddressPresentationRestrictedIndicator::operator=(const ISUP__AddressPresentationRestrictedIndicator& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
enum_value = other_value.enum_value;
return *this;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value == other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator==(const ISUP__AddressPresentationRestrictedIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value == other_value.enum_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value < other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator<(const ISUP__AddressPresentationRestrictedIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value < other_value.enum_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value > other_value;
}

boolean ISUP__AddressPresentationRestrictedIndicator::operator>(const ISUP__AddressPresentationRestrictedIndicator& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value > other_value.enum_value;
}

const char *ISUP__AddressPresentationRestrictedIndicator::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case presentation__allowed: return "presentation_allowed";
case presentation__restricted: return "presentation_restricted";
case address__not__available: return "address_not_available";
case reserved: return "reserved";
default:
return "<unknown>";
}
}

ISUP__AddressPresentationRestrictedIndicator::enum_type ISUP__AddressPresentationRestrictedIndicator::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "presentation_allowed")) return presentation__allowed;
if (!strcmp(str_par, "presentation_restricted")) return presentation__restricted;
if (!strcmp(str_par, "address_not_available")) return address__not__available;
if (!strcmp(str_par, "reserved")) return reserved;
}
return UNKNOWN_VALUE;
}

boolean ISUP__AddressPresentationRestrictedIndicator::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
return TRUE;
default:
return FALSE;
}
}

int ISUP__AddressPresentationRestrictedIndicator::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int ISUP__AddressPresentationRestrictedIndicator::enum2int(const ISUP__AddressPresentationRestrictedIndicator& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void ISUP__AddressPresentationRestrictedIndicator::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", int_val);
enum_value = (enum_type)int_val;
}

ISUP__AddressPresentationRestrictedIndicator::operator ISUP__AddressPresentationRestrictedIndicator::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return enum_value;
}

void ISUP__AddressPresentationRestrictedIndicator::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void ISUP__AddressPresentationRestrictedIndicator::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
  }
}

void ISUP__AddressPresentationRestrictedIndicator::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
text_buf.push_int(enum_value);
}

void ISUP__AddressPresentationRestrictedIndicator::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", enum_value);
}

void ISUP__AddressPresentationRestrictedIndicator_template::copy_template(const ISUP__AddressPresentationRestrictedIndicator_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__AddressPresentationRestrictedIndicator_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__AddressPresentationRestrictedIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__AddressPresentationRestrictedIndicator_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template()
{
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!ISUP__AddressPresentationRestrictedIndicator::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator with unknown numeric value %d.", other_value);
single_value = (ISUP__AddressPresentationRestrictedIndicator::enum_type)other_value;
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(ISUP__AddressPresentationRestrictedIndicator::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(const ISUP__AddressPresentationRestrictedIndicator& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == ISUP__AddressPresentationRestrictedIndicator::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
single_value = other_value.enum_value;
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(const OPTIONAL<ISUP__AddressPresentationRestrictedIndicator>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__AddressPresentationRestrictedIndicator::enum_type)(const ISUP__AddressPresentationRestrictedIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator from an unbound optional field.");
}
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(ISUP__AddressPresentationRestrictedIndicator_template* p_precondition, ISUP__AddressPresentationRestrictedIndicator_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(Dynamic_Match_Interface<ISUP__AddressPresentationRestrictedIndicator>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__AddressPresentationRestrictedIndicator>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__AddressPresentationRestrictedIndicator_template::ISUP__AddressPresentationRestrictedIndicator_template(const ISUP__AddressPresentationRestrictedIndicator_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

ISUP__AddressPresentationRestrictedIndicator_template::~ISUP__AddressPresentationRestrictedIndicator_template()
{
clean_up();
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != ISUP__AddressPresentationRestrictedIndicator::UNBOUND_VALUE;
}

void ISUP__AddressPresentationRestrictedIndicator_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(int other_value)
{
if (!ISUP__AddressPresentationRestrictedIndicator::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__AddressPresentationRestrictedIndicator::enum_type)other_value;
return *this;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(ISUP__AddressPresentationRestrictedIndicator::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(const ISUP__AddressPresentationRestrictedIndicator& other_value)
{
if (other_value.enum_value == ISUP__AddressPresentationRestrictedIndicator::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(const OPTIONAL<ISUP__AddressPresentationRestrictedIndicator>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (ISUP__AddressPresentationRestrictedIndicator::enum_type)(const ISUP__AddressPresentationRestrictedIndicator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
return *this;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::operator=(const ISUP__AddressPresentationRestrictedIndicator_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::match(ISUP__AddressPresentationRestrictedIndicator::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
return FALSE;
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::match(const ISUP__AddressPresentationRestrictedIndicator& other_value, boolean) const
{
if (other_value.enum_value == ISUP__AddressPresentationRestrictedIndicator::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator with an unbound value.");
return match(other_value.enum_value);
}

ISUP__AddressPresentationRestrictedIndicator::enum_type ISUP__AddressPresentationRestrictedIndicator_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return single_value;
}

void ISUP__AddressPresentationRestrictedIndicator_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__AddressPresentationRestrictedIndicator_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__AddressPresentationRestrictedIndicator_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
return value_list.list_value[list_index];
}

void ISUP__AddressPresentationRestrictedIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(ISUP__AddressPresentationRestrictedIndicator::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__AddressPresentationRestrictedIndicator_template::log_match(const ISUP__AddressPresentationRestrictedIndicator& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void ISUP__AddressPresentationRestrictedIndicator_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
}

void ISUP__AddressPresentationRestrictedIndicator_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (ISUP__AddressPresentationRestrictedIndicator::enum_type)text_buf.pull_int().get_val();
if (!ISUP__AddressPresentationRestrictedIndicator::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__AddressPresentationRestrictedIndicator_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
}
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__AddressPresentationRestrictedIndicator_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void ISUP__AddressPresentationRestrictedIndicator_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__AddressPresentationRestrictedIndicator_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    ISUP__AddressPresentationRestrictedIndicator::enum_type enum_val = ISUP__AddressPresentationRestrictedIndicator::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!ISUP__AddressPresentationRestrictedIndicator::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__AddressPresentationRestrictedIndicator_template* precondition = new ISUP__AddressPresentationRestrictedIndicator_template;
    precondition->set_param(*m_p->get_elem(0));
    ISUP__AddressPresentationRestrictedIndicator_template* implied_template = new ISUP__AddressPresentationRestrictedIndicator_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = ISUP__AddressPresentationRestrictedIndicator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__AddressPresentationRestrictedIndicator_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_AddressPresentationRestrictedIndicator");
}

ISUP__Calling__Party__Number::ISUP__Calling__Party__Number()
{
}

ISUP__Calling__Party__Number::ISUP__Calling__Party__Number(const ISUP__NatureOfAddress& par_natureOfAddressIndicator,
    const ISUP__ScreeningIndicator& par_screening__indicator,
    const ISUP__AddressPresentationRestrictedIndicator& par_address__presentation__restricted__indicator,
    const NumberPlan& par_numberingPlanIndicator,
    const ISUP__NumberingIncompleteIndicator& par_iNN,
    const HEXSTRING& par_addressSignalDigits)
  :   field_natureOfAddressIndicator(par_natureOfAddressIndicator),
  field_screening__indicator(par_screening__indicator),
  field_address__presentation__restricted__indicator(par_address__presentation__restricted__indicator),
  field_numberingPlanIndicator(par_numberingPlanIndicator),
  field_iNN(par_iNN),
  field_addressSignalDigits(par_addressSignalDigits)
{
}

ISUP__Calling__Party__Number::ISUP__Calling__Party__Number(const ISUP__Calling__Party__Number& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
if (other_value.natureOfAddressIndicator().is_bound()) field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
else field_natureOfAddressIndicator.clean_up();
if (other_value.screening__indicator().is_bound()) field_screening__indicator = other_value.screening__indicator();
else field_screening__indicator.clean_up();
if (other_value.address__presentation__restricted__indicator().is_bound()) field_address__presentation__restricted__indicator = other_value.address__presentation__restricted__indicator();
else field_address__presentation__restricted__indicator.clean_up();
if (other_value.numberingPlanIndicator().is_bound()) field_numberingPlanIndicator = other_value.numberingPlanIndicator();
else field_numberingPlanIndicator.clean_up();
if (other_value.iNN().is_bound()) field_iNN = other_value.iNN();
else field_iNN.clean_up();
if (other_value.addressSignalDigits().is_bound()) field_addressSignalDigits = other_value.addressSignalDigits();
else field_addressSignalDigits.clean_up();
}

void ISUP__Calling__Party__Number::clean_up()
{
field_natureOfAddressIndicator.clean_up();
field_screening__indicator.clean_up();
field_address__presentation__restricted__indicator.clean_up();
field_numberingPlanIndicator.clean_up();
field_iNN.clean_up();
field_addressSignalDigits.clean_up();
}

const TTCN_Typedescriptor_t* ISUP__Calling__Party__Number::get_descriptor() const { return &ISUP__Calling__Party__Number_descr_; }
ISUP__Calling__Party__Number& ISUP__Calling__Party__Number::operator=(const ISUP__Calling__Party__Number& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
  if (other_value.natureOfAddressIndicator().is_bound()) field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
  else field_natureOfAddressIndicator.clean_up();
  if (other_value.screening__indicator().is_bound()) field_screening__indicator = other_value.screening__indicator();
  else field_screening__indicator.clean_up();
  if (other_value.address__presentation__restricted__indicator().is_bound()) field_address__presentation__restricted__indicator = other_value.address__presentation__restricted__indicator();
  else field_address__presentation__restricted__indicator.clean_up();
  if (other_value.numberingPlanIndicator().is_bound()) field_numberingPlanIndicator = other_value.numberingPlanIndicator();
  else field_numberingPlanIndicator.clean_up();
  if (other_value.iNN().is_bound()) field_iNN = other_value.iNN();
  else field_iNN.clean_up();
  if (other_value.addressSignalDigits().is_bound()) field_addressSignalDigits = other_value.addressSignalDigits();
  else field_addressSignalDigits.clean_up();
}
return *this;
}

boolean ISUP__Calling__Party__Number::operator==(const ISUP__Calling__Party__Number& other_value) const
{
return field_natureOfAddressIndicator==other_value.field_natureOfAddressIndicator
  && field_screening__indicator==other_value.field_screening__indicator
  && field_address__presentation__restricted__indicator==other_value.field_address__presentation__restricted__indicator
  && field_numberingPlanIndicator==other_value.field_numberingPlanIndicator
  && field_iNN==other_value.field_iNN
  && field_addressSignalDigits==other_value.field_addressSignalDigits;
}

boolean ISUP__Calling__Party__Number::is_bound() const
{
return (field_natureOfAddressIndicator.is_bound())
  || (field_screening__indicator.is_bound())
  || (field_address__presentation__restricted__indicator.is_bound())
  || (field_numberingPlanIndicator.is_bound())
  || (field_iNN.is_bound())
  || (field_addressSignalDigits.is_bound());
}
boolean ISUP__Calling__Party__Number::is_value() const
{
return field_natureOfAddressIndicator.is_value()
  && field_screening__indicator.is_value()
  && field_address__presentation__restricted__indicator.is_value()
  && field_numberingPlanIndicator.is_value()
  && field_iNN.is_value()
  && field_addressSignalDigits.is_value();
}
void ISUP__Calling__Party__Number::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
field_natureOfAddressIndicator.log();
TTCN_Logger::log_event_str(", screening_indicator := ");
field_screening__indicator.log();
TTCN_Logger::log_event_str(", address_presentation_restricted_indicator := ");
field_address__presentation__restricted__indicator.log();
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
field_numberingPlanIndicator.log();
TTCN_Logger::log_event_str(", iNN := ");
field_iNN.log();
TTCN_Logger::log_event_str(", addressSignalDigits := ");
field_addressSignalDigits.log();
TTCN_Logger::log_event_str(" }");
}

void ISUP__Calling__Party__Number::set_implicit_omit()
{
if (natureOfAddressIndicator().is_bound()) natureOfAddressIndicator().set_implicit_omit();
if (screening__indicator().is_bound()) screening__indicator().set_implicit_omit();
if (address__presentation__restricted__indicator().is_bound()) address__presentation__restricted__indicator().set_implicit_omit();
if (numberingPlanIndicator().is_bound()) numberingPlanIndicator().set_implicit_omit();
if (iNN().is_bound()) iNN().set_implicit_omit();
if (addressSignalDigits().is_bound()) addressSignalDigits().set_implicit_omit();
}

void ISUP__Calling__Party__Number::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (6<param.get_size()) {
      param.error("record value of type @TCCEncoding_Functions.ISUP_Calling_Party_Number has 6 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) natureOfAddressIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) screening__indicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) address__presentation__restricted__indicator().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) iNN().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) addressSignalDigits().set_param(*param.get_elem(5));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "natureOfAddressIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          natureOfAddressIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "screening_indicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          screening__indicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "address_presentation_restricted_indicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          address__presentation__restricted__indicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "iNN")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iNN().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "addressSignalDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          addressSignalDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.ISUP_Calling_Party_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
  }
}

void ISUP__Calling__Party__Number::encode_text(Text_Buf& text_buf) const
{
field_natureOfAddressIndicator.encode_text(text_buf);
field_screening__indicator.encode_text(text_buf);
field_address__presentation__restricted__indicator.encode_text(text_buf);
field_numberingPlanIndicator.encode_text(text_buf);
field_iNN.encode_text(text_buf);
field_addressSignalDigits.encode_text(text_buf);
}

void ISUP__Calling__Party__Number::decode_text(Text_Buf& text_buf)
{
field_natureOfAddressIndicator.decode_text(text_buf);
field_screening__indicator.decode_text(text_buf);
field_address__presentation__restricted__indicator.decode_text(text_buf);
field_numberingPlanIndicator.decode_text(text_buf);
field_iNN.decode_text(text_buf);
field_addressSignalDigits.decode_text(text_buf);
}

struct ISUP__Calling__Party__Number_template::single_value_struct {
ISUP__NatureOfAddress_template field_natureOfAddressIndicator;
ISUP__ScreeningIndicator_template field_screening__indicator;
ISUP__AddressPresentationRestrictedIndicator_template field_address__presentation__restricted__indicator;
NumberPlan_template field_numberingPlanIndicator;
ISUP__NumberingIncompleteIndicator_template field_iNN;
HEXSTRING_template field_addressSignalDigits;
};

void ISUP__Calling__Party__Number_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_natureOfAddressIndicator = ANY_VALUE;
single_value->field_screening__indicator = ANY_VALUE;
single_value->field_address__presentation__restricted__indicator = ANY_VALUE;
single_value->field_numberingPlanIndicator = ANY_VALUE;
single_value->field_iNN = ANY_VALUE;
single_value->field_addressSignalDigits = ANY_VALUE;
}
}
}

void ISUP__Calling__Party__Number_template::copy_value(const ISUP__Calling__Party__Number& other_value)
{
single_value = new single_value_struct;
if (other_value.natureOfAddressIndicator().is_bound()) {
  single_value->field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
} else {
  single_value->field_natureOfAddressIndicator.clean_up();
}
if (other_value.screening__indicator().is_bound()) {
  single_value->field_screening__indicator = other_value.screening__indicator();
} else {
  single_value->field_screening__indicator.clean_up();
}
if (other_value.address__presentation__restricted__indicator().is_bound()) {
  single_value->field_address__presentation__restricted__indicator = other_value.address__presentation__restricted__indicator();
} else {
  single_value->field_address__presentation__restricted__indicator.clean_up();
}
if (other_value.numberingPlanIndicator().is_bound()) {
  single_value->field_numberingPlanIndicator = other_value.numberingPlanIndicator();
} else {
  single_value->field_numberingPlanIndicator.clean_up();
}
if (other_value.iNN().is_bound()) {
  single_value->field_iNN = other_value.iNN();
} else {
  single_value->field_iNN.clean_up();
}
if (other_value.addressSignalDigits().is_bound()) {
  single_value->field_addressSignalDigits = other_value.addressSignalDigits();
} else {
  single_value->field_addressSignalDigits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ISUP__Calling__Party__Number_template::copy_template(const ISUP__Calling__Party__Number_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.natureOfAddressIndicator().get_selection()) {
single_value->field_natureOfAddressIndicator = other_value.natureOfAddressIndicator();
} else {
single_value->field_natureOfAddressIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.screening__indicator().get_selection()) {
single_value->field_screening__indicator = other_value.screening__indicator();
} else {
single_value->field_screening__indicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.address__presentation__restricted__indicator().get_selection()) {
single_value->field_address__presentation__restricted__indicator = other_value.address__presentation__restricted__indicator();
} else {
single_value->field_address__presentation__restricted__indicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlanIndicator().get_selection()) {
single_value->field_numberingPlanIndicator = other_value.numberingPlanIndicator();
} else {
single_value->field_numberingPlanIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.iNN().get_selection()) {
single_value->field_iNN = other_value.iNN();
} else {
single_value->field_iNN.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.addressSignalDigits().get_selection()) {
single_value->field_addressSignalDigits = other_value.addressSignalDigits();
} else {
single_value->field_addressSignalDigits.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ISUP__Calling__Party__Number_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ISUP__Calling__Party__Number_template(*other_value.implication_.precondition);
implication_.implied_template = new ISUP__Calling__Party__Number_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
break;
}
set_selection(other_value);
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template()
{
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(const ISUP__Calling__Party__Number& other_value)
{
copy_value(other_value);
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(const OPTIONAL<ISUP__Calling__Party__Number>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ISUP__Calling__Party__Number&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number from an unbound optional field.");
}
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(ISUP__Calling__Party__Number_template* p_precondition, ISUP__Calling__Party__Number_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(Dynamic_Match_Interface<ISUP__Calling__Party__Number>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ISUP__Calling__Party__Number>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ISUP__Calling__Party__Number_template::ISUP__Calling__Party__Number_template(const ISUP__Calling__Party__Number_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

ISUP__Calling__Party__Number_template::~ISUP__Calling__Party__Number_template()
{
clean_up();
}

ISUP__Calling__Party__Number_template& ISUP__Calling__Party__Number_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ISUP__Calling__Party__Number_template& ISUP__Calling__Party__Number_template::operator=(const ISUP__Calling__Party__Number& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

ISUP__Calling__Party__Number_template& ISUP__Calling__Party__Number_template::operator=(const OPTIONAL<ISUP__Calling__Party__Number>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ISUP__Calling__Party__Number&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
}
return *this;
}

ISUP__Calling__Party__Number_template& ISUP__Calling__Party__Number_template::operator=(const ISUP__Calling__Party__Number_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean ISUP__Calling__Party__Number_template::match(const ISUP__Calling__Party__Number& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.natureOfAddressIndicator().is_bound()) return FALSE;
if(!single_value->field_natureOfAddressIndicator.match(other_value.natureOfAddressIndicator(), legacy))return FALSE;
if(!other_value.screening__indicator().is_bound()) return FALSE;
if(!single_value->field_screening__indicator.match(other_value.screening__indicator(), legacy))return FALSE;
if(!other_value.address__presentation__restricted__indicator().is_bound()) return FALSE;
if(!single_value->field_address__presentation__restricted__indicator.match(other_value.address__presentation__restricted__indicator(), legacy))return FALSE;
if(!other_value.numberingPlanIndicator().is_bound()) return FALSE;
if(!single_value->field_numberingPlanIndicator.match(other_value.numberingPlanIndicator(), legacy))return FALSE;
if(!other_value.iNN().is_bound()) return FALSE;
if(!single_value->field_iNN.match(other_value.iNN(), legacy))return FALSE;
if(!other_value.addressSignalDigits().is_bound()) return FALSE;
if(!single_value->field_addressSignalDigits.match(other_value.addressSignalDigits(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
}
return FALSE;
}

boolean ISUP__Calling__Party__Number_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_natureOfAddressIndicator.is_bound()
 || single_value->field_screening__indicator.is_bound()
 || single_value->field_address__presentation__restricted__indicator.is_bound()
 || single_value->field_numberingPlanIndicator.is_bound()
 || single_value->field_iNN.is_bound()
 || single_value->field_addressSignalDigits.is_bound();
}

boolean ISUP__Calling__Party__Number_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_natureOfAddressIndicator.is_value()
 && single_value->field_screening__indicator.is_value()
 && single_value->field_address__presentation__restricted__indicator.is_value()
 && single_value->field_numberingPlanIndicator.is_value()
 && single_value->field_iNN.is_value()
 && single_value->field_addressSignalDigits.is_value();
}

void ISUP__Calling__Party__Number_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ISUP__Calling__Party__Number ISUP__Calling__Party__Number_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
ISUP__Calling__Party__Number ret_val;
if (single_value->field_natureOfAddressIndicator.is_bound()) {
ret_val.natureOfAddressIndicator() = single_value->field_natureOfAddressIndicator.valueof();
}
if (single_value->field_screening__indicator.is_bound()) {
ret_val.screening__indicator() = single_value->field_screening__indicator.valueof();
}
if (single_value->field_address__presentation__restricted__indicator.is_bound()) {
ret_val.address__presentation__restricted__indicator() = single_value->field_address__presentation__restricted__indicator.valueof();
}
if (single_value->field_numberingPlanIndicator.is_bound()) {
ret_val.numberingPlanIndicator() = single_value->field_numberingPlanIndicator.valueof();
}
if (single_value->field_iNN.is_bound()) {
ret_val.iNN() = single_value->field_iNN.valueof();
}
if (single_value->field_addressSignalDigits.is_bound()) {
ret_val.addressSignalDigits() = single_value->field_addressSignalDigits.valueof();
}
return ret_val;
}

void ISUP__Calling__Party__Number_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ISUP__Calling__Party__Number_template[list_length];
}

ISUP__Calling__Party__Number_template& ISUP__Calling__Party__Number_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return value_list.list_value[list_index];
}

ISUP__NatureOfAddress_template& ISUP__Calling__Party__Number_template::natureOfAddressIndicator()
{
set_specific();
return single_value->field_natureOfAddressIndicator;
}

const ISUP__NatureOfAddress_template& ISUP__Calling__Party__Number_template::natureOfAddressIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field natureOfAddressIndicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_natureOfAddressIndicator;
}

ISUP__ScreeningIndicator_template& ISUP__Calling__Party__Number_template::screening__indicator()
{
set_specific();
return single_value->field_screening__indicator;
}

const ISUP__ScreeningIndicator_template& ISUP__Calling__Party__Number_template::screening__indicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field screening_indicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_screening__indicator;
}

ISUP__AddressPresentationRestrictedIndicator_template& ISUP__Calling__Party__Number_template::address__presentation__restricted__indicator()
{
set_specific();
return single_value->field_address__presentation__restricted__indicator;
}

const ISUP__AddressPresentationRestrictedIndicator_template& ISUP__Calling__Party__Number_template::address__presentation__restricted__indicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field address_presentation_restricted_indicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_address__presentation__restricted__indicator;
}

NumberPlan_template& ISUP__Calling__Party__Number_template::numberingPlanIndicator()
{
set_specific();
return single_value->field_numberingPlanIndicator;
}

const NumberPlan_template& ISUP__Calling__Party__Number_template::numberingPlanIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlanIndicator of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_numberingPlanIndicator;
}

ISUP__NumberingIncompleteIndicator_template& ISUP__Calling__Party__Number_template::iNN()
{
set_specific();
return single_value->field_iNN;
}

const ISUP__NumberingIncompleteIndicator_template& ISUP__Calling__Party__Number_template::iNN() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field iNN of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_iNN;
}

HEXSTRING_template& ISUP__Calling__Party__Number_template::addressSignalDigits()
{
set_specific();
return single_value->field_addressSignalDigits;
}

const HEXSTRING_template& ISUP__Calling__Party__Number_template::addressSignalDigits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field addressSignalDigits of a non-specific template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
return single_value->field_addressSignalDigits;
}

int ISUP__Calling__Party__Number_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
    return 6;
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
  }
  return 0;
}

void ISUP__Calling__Party__Number_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
single_value->field_natureOfAddressIndicator.log();
TTCN_Logger::log_event_str(", screening_indicator := ");
single_value->field_screening__indicator.log();
TTCN_Logger::log_event_str(", address_presentation_restricted_indicator := ");
single_value->field_address__presentation__restricted__indicator.log();
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
single_value->field_numberingPlanIndicator.log();
TTCN_Logger::log_event_str(", iNN := ");
single_value->field_iNN.log();
TTCN_Logger::log_event_str(", addressSignalDigits := ");
single_value->field_addressSignalDigits.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ISUP__Calling__Party__Number_template::log_match(const ISUP__Calling__Party__Number& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_natureOfAddressIndicator.match(match_value.natureOfAddressIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".natureOfAddressIndicator");
single_value->field_natureOfAddressIndicator.log_match(match_value.natureOfAddressIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_screening__indicator.match(match_value.screening__indicator(), legacy)){
TTCN_Logger::log_logmatch_info(".screening_indicator");
single_value->field_screening__indicator.log_match(match_value.screening__indicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_address__presentation__restricted__indicator.match(match_value.address__presentation__restricted__indicator(), legacy)){
TTCN_Logger::log_logmatch_info(".address_presentation_restricted_indicator");
single_value->field_address__presentation__restricted__indicator.log_match(match_value.address__presentation__restricted__indicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberingPlanIndicator.match(match_value.numberingPlanIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlanIndicator");
single_value->field_numberingPlanIndicator.log_match(match_value.numberingPlanIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_iNN.match(match_value.iNN(), legacy)){
TTCN_Logger::log_logmatch_info(".iNN");
single_value->field_iNN.log_match(match_value.iNN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_addressSignalDigits.match(match_value.addressSignalDigits(), legacy)){
TTCN_Logger::log_logmatch_info(".addressSignalDigits");
single_value->field_addressSignalDigits.log_match(match_value.addressSignalDigits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ natureOfAddressIndicator := ");
single_value->field_natureOfAddressIndicator.log_match(match_value.natureOfAddressIndicator(), legacy);
TTCN_Logger::log_event_str(", screening_indicator := ");
single_value->field_screening__indicator.log_match(match_value.screening__indicator(), legacy);
TTCN_Logger::log_event_str(", address_presentation_restricted_indicator := ");
single_value->field_address__presentation__restricted__indicator.log_match(match_value.address__presentation__restricted__indicator(), legacy);
TTCN_Logger::log_event_str(", numberingPlanIndicator := ");
single_value->field_numberingPlanIndicator.log_match(match_value.numberingPlanIndicator(), legacy);
TTCN_Logger::log_event_str(", iNN := ");
single_value->field_iNN.log_match(match_value.iNN(), legacy);
TTCN_Logger::log_event_str(", addressSignalDigits := ");
single_value->field_addressSignalDigits.log_match(match_value.addressSignalDigits(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ISUP__Calling__Party__Number_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (natureOfAddressIndicator().is_bound()) natureOfAddressIndicator().set_implicit_omit();
if (screening__indicator().is_bound()) screening__indicator().set_implicit_omit();
if (address__presentation__restricted__indicator().is_bound()) address__presentation__restricted__indicator().set_implicit_omit();
if (numberingPlanIndicator().is_bound()) numberingPlanIndicator().set_implicit_omit();
if (iNN().is_bound()) iNN().set_implicit_omit();
if (addressSignalDigits().is_bound()) addressSignalDigits().set_implicit_omit();
}

void ISUP__Calling__Party__Number_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_natureOfAddressIndicator.encode_text(text_buf);
single_value->field_screening__indicator.encode_text(text_buf);
single_value->field_address__presentation__restricted__indicator.encode_text(text_buf);
single_value->field_numberingPlanIndicator.encode_text(text_buf);
single_value->field_iNN.encode_text(text_buf);
single_value->field_addressSignalDigits.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
}
}

void ISUP__Calling__Party__Number_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_natureOfAddressIndicator.decode_text(text_buf);
single_value->field_screening__indicator.decode_text(text_buf);
single_value->field_address__presentation__restricted__indicator.decode_text(text_buf);
single_value->field_numberingPlanIndicator.decode_text(text_buf);
single_value->field_iNN.decode_text(text_buf);
single_value->field_addressSignalDigits.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ISUP__Calling__Party__Number_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number.");
}
}

void ISUP__Calling__Party__Number_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ISUP__Calling__Party__Number_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (6<param.get_size()) {
      param.error("record template of type @TCCEncoding_Functions.ISUP_Calling_Party_Number has 6 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) natureOfAddressIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) screening__indicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) address__presentation__restricted__indicator().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) iNN().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) addressSignalDigits().set_param(*param.get_elem(5));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "natureOfAddressIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          natureOfAddressIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "screening_indicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          screening__indicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "address_presentation_restricted_indicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          address__presentation__restricted__indicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "iNN")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iNN().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "addressSignalDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          addressSignalDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.ISUP_Calling_Party_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ISUP__Calling__Party__Number_template* precondition = new ISUP__Calling__Party__Number_template;
    precondition->set_param(*param.get_elem(0));
    ISUP__Calling__Party__Number_template* implied_template = new ISUP__Calling__Party__Number_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ISUP__Calling__Party__Number_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
  }
  is_ifpresent = param.get_ifpresent();
}

void ISUP__Calling__Party__Number_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_natureOfAddressIndicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
single_value->field_screening__indicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
single_value->field_address__presentation__restricted__indicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
single_value->field_numberingPlanIndicator.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
single_value->field_iNN.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
single_value->field_addressSignalDigits.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.ISUP_Calling_Party_Number");
}

boolean ISUP__Calling__Party__Number_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ISUP__Calling__Party__Number_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

MobileL3__TypeOfNumber::MobileL3__TypeOfNumber()
{
enum_value = UNBOUND_VALUE;
}

MobileL3__TypeOfNumber::MobileL3__TypeOfNumber(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

MobileL3__TypeOfNumber::MobileL3__TypeOfNumber(enum_type other_value)
{
enum_value = other_value;
}

MobileL3__TypeOfNumber::MobileL3__TypeOfNumber(const MobileL3__TypeOfNumber& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
enum_value = other_value.enum_value;
}

MobileL3__TypeOfNumber& MobileL3__TypeOfNumber::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

MobileL3__TypeOfNumber& MobileL3__TypeOfNumber::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

MobileL3__TypeOfNumber& MobileL3__TypeOfNumber::operator=(const MobileL3__TypeOfNumber& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
enum_value = other_value.enum_value;
return *this;
}

boolean MobileL3__TypeOfNumber::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

boolean MobileL3__TypeOfNumber::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value == other_value;
}

boolean MobileL3__TypeOfNumber::operator==(const MobileL3__TypeOfNumber& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value == other_value.enum_value;
}

boolean MobileL3__TypeOfNumber::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean MobileL3__TypeOfNumber::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value < other_value;
}

boolean MobileL3__TypeOfNumber::operator<(const MobileL3__TypeOfNumber& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value < other_value.enum_value;
}

boolean MobileL3__TypeOfNumber::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean MobileL3__TypeOfNumber::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value > other_value;
}

boolean MobileL3__TypeOfNumber::operator>(const MobileL3__TypeOfNumber& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value > other_value.enum_value;
}

const char *MobileL3__TypeOfNumber::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case unknown: return "unknown";
case internationalNumber: return "internationalNumber";
case nationalNumber: return "nationalNumber";
case networkSpecificNumber: return "networkSpecificNumber";
case dedicatedAccess: return "dedicatedAccess";
case reserved1: return "reserved1";
case reserved2: return "reserved2";
case reservedForExtension: return "reservedForExtension";
default:
return "<unknown>";
}
}

MobileL3__TypeOfNumber::enum_type MobileL3__TypeOfNumber::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "unknown")) return unknown;
if (!strcmp(str_par, "internationalNumber")) return internationalNumber;
if (!strcmp(str_par, "nationalNumber")) return nationalNumber;
if (!strcmp(str_par, "networkSpecificNumber")) return networkSpecificNumber;
if (!strcmp(str_par, "dedicatedAccess")) return dedicatedAccess;
if (!strcmp(str_par, "reserved1")) return reserved1;
if (!strcmp(str_par, "reserved2")) return reserved2;
if (!strcmp(str_par, "reservedForExtension")) return reservedForExtension;
}
return UNKNOWN_VALUE;
}

boolean MobileL3__TypeOfNumber::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return TRUE;
default:
return FALSE;
}
}

int MobileL3__TypeOfNumber::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int MobileL3__TypeOfNumber::enum2int(const MobileL3__TypeOfNumber& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void MobileL3__TypeOfNumber::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", int_val);
enum_value = (enum_type)int_val;
}

MobileL3__TypeOfNumber::operator MobileL3__TypeOfNumber::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return enum_value;
}

void MobileL3__TypeOfNumber::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void MobileL3__TypeOfNumber::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@TCCEncoding_Functions.MobileL3_TypeOfNumber");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
  }
}

void MobileL3__TypeOfNumber::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
text_buf.push_int(enum_value);
}

void MobileL3__TypeOfNumber::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", enum_value);
}

void MobileL3__TypeOfNumber_template::copy_template(const MobileL3__TypeOfNumber_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new MobileL3__TypeOfNumber_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new MobileL3__TypeOfNumber_template(*other_value.implication_.precondition);
implication_.implied_template = new MobileL3__TypeOfNumber_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template()
{
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!MobileL3__TypeOfNumber::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber with unknown numeric value %d.", other_value);
single_value = (MobileL3__TypeOfNumber::enum_type)other_value;
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(MobileL3__TypeOfNumber::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(const MobileL3__TypeOfNumber& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == MobileL3__TypeOfNumber::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
single_value = other_value.enum_value;
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(const OPTIONAL<MobileL3__TypeOfNumber>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (MobileL3__TypeOfNumber::enum_type)(const MobileL3__TypeOfNumber&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber from an unbound optional field.");
}
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(MobileL3__TypeOfNumber_template* p_precondition, MobileL3__TypeOfNumber_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(Dynamic_Match_Interface<MobileL3__TypeOfNumber>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<MobileL3__TypeOfNumber>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

MobileL3__TypeOfNumber_template::MobileL3__TypeOfNumber_template(const MobileL3__TypeOfNumber_template& other_value)
 : Base_Template()
{
copy_template(other_value);
}

MobileL3__TypeOfNumber_template::~MobileL3__TypeOfNumber_template()
{
clean_up();
}

boolean MobileL3__TypeOfNumber_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean MobileL3__TypeOfNumber_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != MobileL3__TypeOfNumber::UNBOUND_VALUE;
}

void MobileL3__TypeOfNumber_template::clean_up()
{
switch (template_selection) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(int other_value)
{
if (!MobileL3__TypeOfNumber::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (MobileL3__TypeOfNumber::enum_type)other_value;
return *this;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(MobileL3__TypeOfNumber::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(const MobileL3__TypeOfNumber& other_value)
{
if (other_value.enum_value == MobileL3__TypeOfNumber::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(const OPTIONAL<MobileL3__TypeOfNumber>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (MobileL3__TypeOfNumber::enum_type)(const MobileL3__TypeOfNumber&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
return *this;
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::operator=(const MobileL3__TypeOfNumber_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean MobileL3__TypeOfNumber_template::match(MobileL3__TypeOfNumber::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
return FALSE;
}

boolean MobileL3__TypeOfNumber_template::match(const MobileL3__TypeOfNumber& other_value, boolean) const
{
if (other_value.enum_value == MobileL3__TypeOfNumber::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber with an unbound value.");
return match(other_value.enum_value);
}

MobileL3__TypeOfNumber::enum_type MobileL3__TypeOfNumber_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return single_value;
}

void MobileL3__TypeOfNumber_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new MobileL3__TypeOfNumber_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
}

MobileL3__TypeOfNumber_template& MobileL3__TypeOfNumber_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
return value_list.list_value[list_index];
}

void MobileL3__TypeOfNumber_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(MobileL3__TypeOfNumber::enum_to_str(single_value), single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[elem_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void MobileL3__TypeOfNumber_template::log_match(const MobileL3__TypeOfNumber& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void MobileL3__TypeOfNumber_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
}

void MobileL3__TypeOfNumber_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (MobileL3__TypeOfNumber::enum_type)text_buf.pull_int().get_val();
if (!MobileL3__TypeOfNumber::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new MobileL3__TypeOfNumber_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
}
}

boolean MobileL3__TypeOfNumber_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean MobileL3__TypeOfNumber_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void MobileL3__TypeOfNumber_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    MobileL3__TypeOfNumber_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    MobileL3__TypeOfNumber::enum_type enum_val = MobileL3__TypeOfNumber::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!MobileL3__TypeOfNumber::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @TCCEncoding_Functions.MobileL3_TypeOfNumber.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    MobileL3__TypeOfNumber_template* precondition = new MobileL3__TypeOfNumber_template;
    precondition->set_param(*m_p->get_elem(0));
    MobileL3__TypeOfNumber_template* implied_template = new MobileL3__TypeOfNumber_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = MobileL3__TypeOfNumber_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@TCCEncoding_Functions.MobileL3_TypeOfNumber");
  }
  is_ifpresent = param.get_ifpresent();
}

void MobileL3__TypeOfNumber_template::check_restriction(template_res t_res, const char* t_name,
boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.MobileL3_TypeOfNumber");
}

MobileL3__CalledPartyBCDNumber::MobileL3__CalledPartyBCDNumber()
{
}

MobileL3__CalledPartyBCDNumber::MobileL3__CalledPartyBCDNumber(const NumberPlan& par_numberingPlanIdentification,
    const MobileL3__TypeOfNumber& par_typeOfNumber,
    const HEXSTRING& par_numberDigits)
  :   field_numberingPlanIdentification(par_numberingPlanIdentification),
  field_typeOfNumber(par_typeOfNumber),
  field_numberDigits(par_numberDigits)
{
}

MobileL3__CalledPartyBCDNumber::MobileL3__CalledPartyBCDNumber(const MobileL3__CalledPartyBCDNumber& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
else field_numberingPlanIdentification.clean_up();
if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
else field_typeOfNumber.clean_up();
if (other_value.numberDigits().is_bound()) field_numberDigits = other_value.numberDigits();
else field_numberDigits.clean_up();
}

void MobileL3__CalledPartyBCDNumber::clean_up()
{
field_numberingPlanIdentification.clean_up();
field_typeOfNumber.clean_up();
field_numberDigits.clean_up();
}

const TTCN_Typedescriptor_t* MobileL3__CalledPartyBCDNumber::get_descriptor() const { return &MobileL3__CalledPartyBCDNumber_descr_; }
MobileL3__CalledPartyBCDNumber& MobileL3__CalledPartyBCDNumber::operator=(const MobileL3__CalledPartyBCDNumber& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
  if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
  else field_numberingPlanIdentification.clean_up();
  if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
  else field_typeOfNumber.clean_up();
  if (other_value.numberDigits().is_bound()) field_numberDigits = other_value.numberDigits();
  else field_numberDigits.clean_up();
}
return *this;
}

boolean MobileL3__CalledPartyBCDNumber::operator==(const MobileL3__CalledPartyBCDNumber& other_value) const
{
return field_numberingPlanIdentification==other_value.field_numberingPlanIdentification
  && field_typeOfNumber==other_value.field_typeOfNumber
  && field_numberDigits==other_value.field_numberDigits;
}

boolean MobileL3__CalledPartyBCDNumber::is_bound() const
{
return (field_numberingPlanIdentification.is_bound())
  || (field_typeOfNumber.is_bound())
  || (field_numberDigits.is_bound());
}
boolean MobileL3__CalledPartyBCDNumber::is_value() const
{
return field_numberingPlanIdentification.is_value()
  && field_typeOfNumber.is_value()
  && field_numberDigits.is_value();
}
void MobileL3__CalledPartyBCDNumber::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ numberingPlanIdentification := ");
field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
field_typeOfNumber.log();
TTCN_Logger::log_event_str(", numberDigits := ");
field_numberDigits.log();
TTCN_Logger::log_event_str(" }");
}

void MobileL3__CalledPartyBCDNumber::set_implicit_omit()
{
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (numberDigits().is_bound()) numberDigits().set_implicit_omit();
}

void MobileL3__CalledPartyBCDNumber::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (3<param.get_size()) {
      param.error("record value of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber has 3 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIdentification().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) numberDigits().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
  }
}

void MobileL3__CalledPartyBCDNumber::encode_text(Text_Buf& text_buf) const
{
field_numberingPlanIdentification.encode_text(text_buf);
field_typeOfNumber.encode_text(text_buf);
field_numberDigits.encode_text(text_buf);
}

void MobileL3__CalledPartyBCDNumber::decode_text(Text_Buf& text_buf)
{
field_numberingPlanIdentification.decode_text(text_buf);
field_typeOfNumber.decode_text(text_buf);
field_numberDigits.decode_text(text_buf);
}

struct MobileL3__CalledPartyBCDNumber_template::single_value_struct {
NumberPlan_template field_numberingPlanIdentification;
MobileL3__TypeOfNumber_template field_typeOfNumber;
HEXSTRING_template field_numberDigits;
};

void MobileL3__CalledPartyBCDNumber_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_numberingPlanIdentification = ANY_VALUE;
single_value->field_typeOfNumber = ANY_VALUE;
single_value->field_numberDigits = ANY_VALUE;
}
}
}

void MobileL3__CalledPartyBCDNumber_template::copy_value(const MobileL3__CalledPartyBCDNumber& other_value)
{
single_value = new single_value_struct;
if (other_value.numberingPlanIdentification().is_bound()) {
  single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
  single_value->field_numberingPlanIdentification.clean_up();
}
if (other_value.typeOfNumber().is_bound()) {
  single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
  single_value->field_typeOfNumber.clean_up();
}
if (other_value.numberDigits().is_bound()) {
  single_value->field_numberDigits = other_value.numberDigits();
} else {
  single_value->field_numberDigits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void MobileL3__CalledPartyBCDNumber_template::copy_template(const MobileL3__CalledPartyBCDNumber_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlanIdentification().get_selection()) {
single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
single_value->field_numberingPlanIdentification.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfNumber().get_selection()) {
single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
single_value->field_typeOfNumber.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberDigits().get_selection()) {
single_value->field_numberDigits = other_value.numberDigits();
} else {
single_value->field_numberDigits.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new MobileL3__CalledPartyBCDNumber_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new MobileL3__CalledPartyBCDNumber_template(*other_value.implication_.precondition);
implication_.implied_template = new MobileL3__CalledPartyBCDNumber_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
break;
}
set_selection(other_value);
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template()
{
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(const MobileL3__CalledPartyBCDNumber& other_value)
{
copy_value(other_value);
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(const OPTIONAL<MobileL3__CalledPartyBCDNumber>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const MobileL3__CalledPartyBCDNumber&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber from an unbound optional field.");
}
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(MobileL3__CalledPartyBCDNumber_template* p_precondition, MobileL3__CalledPartyBCDNumber_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(Dynamic_Match_Interface<MobileL3__CalledPartyBCDNumber>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<MobileL3__CalledPartyBCDNumber>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

MobileL3__CalledPartyBCDNumber_template::MobileL3__CalledPartyBCDNumber_template(const MobileL3__CalledPartyBCDNumber_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

MobileL3__CalledPartyBCDNumber_template::~MobileL3__CalledPartyBCDNumber_template()
{
clean_up();
}

MobileL3__CalledPartyBCDNumber_template& MobileL3__CalledPartyBCDNumber_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

MobileL3__CalledPartyBCDNumber_template& MobileL3__CalledPartyBCDNumber_template::operator=(const MobileL3__CalledPartyBCDNumber& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

MobileL3__CalledPartyBCDNumber_template& MobileL3__CalledPartyBCDNumber_template::operator=(const OPTIONAL<MobileL3__CalledPartyBCDNumber>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const MobileL3__CalledPartyBCDNumber&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
}
return *this;
}

MobileL3__CalledPartyBCDNumber_template& MobileL3__CalledPartyBCDNumber_template::operator=(const MobileL3__CalledPartyBCDNumber_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean MobileL3__CalledPartyBCDNumber_template::match(const MobileL3__CalledPartyBCDNumber& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.numberingPlanIdentification().is_bound()) return FALSE;
if(!single_value->field_numberingPlanIdentification.match(other_value.numberingPlanIdentification(), legacy))return FALSE;
if(!other_value.typeOfNumber().is_bound()) return FALSE;
if(!single_value->field_typeOfNumber.match(other_value.typeOfNumber(), legacy))return FALSE;
if(!other_value.numberDigits().is_bound()) return FALSE;
if(!single_value->field_numberDigits.match(other_value.numberDigits(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
}
return FALSE;
}

boolean MobileL3__CalledPartyBCDNumber_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_numberingPlanIdentification.is_bound()
 || single_value->field_typeOfNumber.is_bound()
 || single_value->field_numberDigits.is_bound();
}

boolean MobileL3__CalledPartyBCDNumber_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_numberingPlanIdentification.is_value()
 && single_value->field_typeOfNumber.is_value()
 && single_value->field_numberDigits.is_value();
}

void MobileL3__CalledPartyBCDNumber_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

MobileL3__CalledPartyBCDNumber MobileL3__CalledPartyBCDNumber_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
MobileL3__CalledPartyBCDNumber ret_val;
if (single_value->field_numberingPlanIdentification.is_bound()) {
ret_val.numberingPlanIdentification() = single_value->field_numberingPlanIdentification.valueof();
}
if (single_value->field_typeOfNumber.is_bound()) {
ret_val.typeOfNumber() = single_value->field_typeOfNumber.valueof();
}
if (single_value->field_numberDigits.is_bound()) {
ret_val.numberDigits() = single_value->field_numberDigits.valueof();
}
return ret_val;
}

void MobileL3__CalledPartyBCDNumber_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new MobileL3__CalledPartyBCDNumber_template[list_length];
}

MobileL3__CalledPartyBCDNumber_template& MobileL3__CalledPartyBCDNumber_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
return value_list.list_value[list_index];
}

NumberPlan_template& MobileL3__CalledPartyBCDNumber_template::numberingPlanIdentification()
{
set_specific();
return single_value->field_numberingPlanIdentification;
}

const NumberPlan_template& MobileL3__CalledPartyBCDNumber_template::numberingPlanIdentification() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlanIdentification of a non-specific template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
return single_value->field_numberingPlanIdentification;
}

MobileL3__TypeOfNumber_template& MobileL3__CalledPartyBCDNumber_template::typeOfNumber()
{
set_specific();
return single_value->field_typeOfNumber;
}

const MobileL3__TypeOfNumber_template& MobileL3__CalledPartyBCDNumber_template::typeOfNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfNumber of a non-specific template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
return single_value->field_typeOfNumber;
}

HEXSTRING_template& MobileL3__CalledPartyBCDNumber_template::numberDigits()
{
set_specific();
return single_value->field_numberDigits;
}

const HEXSTRING_template& MobileL3__CalledPartyBCDNumber_template::numberDigits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberDigits of a non-specific template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
return single_value->field_numberDigits;
}

int MobileL3__CalledPartyBCDNumber_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
    return 3;
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
  }
  return 0;
}

void MobileL3__CalledPartyBCDNumber_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log();
TTCN_Logger::log_event_str(", numberDigits := ");
single_value->field_numberDigits.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void MobileL3__CalledPartyBCDNumber_template::log_match(const MobileL3__CalledPartyBCDNumber& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_numberingPlanIdentification.match(match_value.numberingPlanIdentification(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlanIdentification");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_typeOfNumber.match(match_value.typeOfNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfNumber");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberDigits.match(match_value.numberDigits(), legacy)){
TTCN_Logger::log_logmatch_info(".numberDigits");
single_value->field_numberDigits.log_match(match_value.numberDigits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::log_event_str(", numberDigits := ");
single_value->field_numberDigits.log_match(match_value.numberDigits(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void MobileL3__CalledPartyBCDNumber_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (numberDigits().is_bound()) numberDigits().set_implicit_omit();
}

void MobileL3__CalledPartyBCDNumber_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_numberingPlanIdentification.encode_text(text_buf);
single_value->field_typeOfNumber.encode_text(text_buf);
single_value->field_numberDigits.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
}
}

void MobileL3__CalledPartyBCDNumber_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_numberingPlanIdentification.decode_text(text_buf);
single_value->field_typeOfNumber.decode_text(text_buf);
single_value->field_numberDigits.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new MobileL3__CalledPartyBCDNumber_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber.");
}
}

void MobileL3__CalledPartyBCDNumber_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    MobileL3__CalledPartyBCDNumber_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (3<param.get_size()) {
      param.error("record template of type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber has 3 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIdentification().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) numberDigits().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberDigits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberDigits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    MobileL3__CalledPartyBCDNumber_template* precondition = new MobileL3__CalledPartyBCDNumber_template;
    precondition->set_param(*param.get_elem(0));
    MobileL3__CalledPartyBCDNumber_template* implied_template = new MobileL3__CalledPartyBCDNumber_template;
    implied_template->set_param(*param.get_elem(1));
    *this = MobileL3__CalledPartyBCDNumber_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
  }
  is_ifpresent = param.get_ifpresent();
}

void MobileL3__CalledPartyBCDNumber_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_numberingPlanIdentification.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
single_value->field_typeOfNumber.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
single_value->field_numberDigits.check_restriction(t_res, t_name ? t_name : "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@TCCEncoding_Functions.MobileL3_CalledPartyBCDNumber");
}

boolean MobileL3__CalledPartyBCDNumber_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean MobileL3__CalledPartyBCDNumber_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}


/* Bodies of functions, altsteps and testcases */

OCTETSTRING f__encode__ISUP__Called__Party__Number(const ISUP__Called__Party__Number& pl__ISUP__Called__Party__Number)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 131, TTCN_Location::LOCATION_FUNCTION, "f_encode_ISUP_Called_Party_Number");
current_location.update_lineno(134);
/* TCCEncoding_Functions.ttcn, line 134 */
if ((NumberPlan::enum2int(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).numberingPlanIndicator()) > 7)) {
current_location.update_lineno(136);
/* TCCEncoding_Functions.ttcn, line 136 */
TTCN_Logger::log_str(TTCN_USER, "Error : Invalid numberingPlanIndicator");
current_location.update_lineno(137);
/* TCCEncoding_Functions.ttcn, line 137 */
return os_0;
}
current_location.update_lineno(140);
/* TCCEncoding_Functions.ttcn, line 140 */
INTEGER vl__i;
current_location.update_lineno(141);
/* TCCEncoding_Functions.ttcn, line 141 */
OCTETSTRING vl__oct;
current_location.update_lineno(142);
/* TCCEncoding_Functions.ttcn, line 142 */
HEXSTRING vl__digits(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).addressSignalDigits());
current_location.update_lineno(143);
/* TCCEncoding_Functions.ttcn, line 143 */
INTEGER vl__size(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).addressSignalDigits().lengthof());
current_location.update_lineno(144);
/* TCCEncoding_Functions.ttcn, line 144 */
BITSTRING vl__oddEvenIndicator(bs_0);
current_location.update_lineno(145);
/* TCCEncoding_Functions.ttcn, line 145 */
if ((mod(vl__size, 2) == 1)) {
current_location.update_lineno(146);
/* TCCEncoding_Functions.ttcn, line 146 */
vl__oddEvenIndicator = bs_1;
current_location.update_lineno(147);
/* TCCEncoding_Functions.ttcn, line 147 */
{
HEXSTRING tmp_1;
tmp_1 = (vl__digits + hs_0);
vl__digits = tmp_1;
}
current_location.update_lineno(148);
/* TCCEncoding_Functions.ttcn, line 148 */
{
INTEGER tmp_2;
++vl__size;
}
}
current_location.update_lineno(151);
/* TCCEncoding_Functions.ttcn, line 151 */
vl__oct = bit2oct(((((vl__oddEvenIndicator + int2bit(ISUP__NatureOfAddress::enum2int(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).natureOfAddressIndicator()), 7)) + int2bit(ISUP__NumberingIncompleteIndicator::enum2int(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).iNN()), 1)) + int2bit(NumberPlan::enum2int(const_cast< const ISUP__Called__Party__Number&>(pl__ISUP__Called__Party__Number).numberingPlanIndicator()), 3)) + bs_2));
current_location.update_lineno(157);
/* TCCEncoding_Functions.ttcn, line 157 */
{
INTEGER tmp_4;
tmp_4 = (vl__size / 2);
vl__size = tmp_4;
}
current_location.update_lineno(159);
/* TCCEncoding_Functions.ttcn, line 159 */
vl__i = 0;
current_location.update_lineno(159);
/* TCCEncoding_Functions.ttcn, line 159 */
for ( ; ; ) {
current_location.update_lineno(159);
/* TCCEncoding_Functions.ttcn, line 159 */
if (!(vl__i < vl__size)) break;
current_location.update_lineno(161);
/* TCCEncoding_Functions.ttcn, line 161 */
{
OCTETSTRING tmp_6;
tmp_6 = (vl__oct + hex2oct((const_cast< const HEXSTRING&>(vl__digits)[((2 * vl__i) + 1)] + const_cast< const HEXSTRING&>(vl__digits)[(2 * vl__i)])));
vl__oct = tmp_6;
}
current_location.update_lineno(159);
/* TCCEncoding_Functions.ttcn, line 159 */
{
INTEGER tmp_7;
++vl__i;
}
}
current_location.update_lineno(164);
/* TCCEncoding_Functions.ttcn, line 164 */
return vl__oct;
}

OCTETSTRING f__encode__ISUP__Calling__Party__Number(const ISUP__Calling__Party__Number& pl__ISUP__Calling__Party__Number)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 186, TTCN_Location::LOCATION_FUNCTION, "f_encode_ISUP_Calling_Party_Number");
current_location.update_lineno(189);
/* TCCEncoding_Functions.ttcn, line 189 */
if ((NumberPlan::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).numberingPlanIndicator()) > 7)) {
current_location.update_lineno(191);
/* TCCEncoding_Functions.ttcn, line 191 */
TTCN_Logger::log_str(TTCN_USER, "Error : Invalid numberingPlanIndicator");
current_location.update_lineno(192);
/* TCCEncoding_Functions.ttcn, line 192 */
return os_0;
}
current_location.update_lineno(195);
/* TCCEncoding_Functions.ttcn, line 195 */
INTEGER vl__i;
current_location.update_lineno(196);
/* TCCEncoding_Functions.ttcn, line 196 */
OCTETSTRING vl__oct;
current_location.update_lineno(197);
/* TCCEncoding_Functions.ttcn, line 197 */
HEXSTRING vl__digits(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).addressSignalDigits());
current_location.update_lineno(198);
/* TCCEncoding_Functions.ttcn, line 198 */
INTEGER vl__size(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).addressSignalDigits().lengthof());
current_location.update_lineno(199);
/* TCCEncoding_Functions.ttcn, line 199 */
BITSTRING vl__oddEvenIndicator(bs_0);
current_location.update_lineno(200);
/* TCCEncoding_Functions.ttcn, line 200 */
if ((mod(vl__size, 2) == 1)) {
current_location.update_lineno(201);
/* TCCEncoding_Functions.ttcn, line 201 */
vl__oddEvenIndicator = bs_1;
current_location.update_lineno(202);
/* TCCEncoding_Functions.ttcn, line 202 */
{
HEXSTRING tmp_9;
tmp_9 = (vl__digits + hs_0);
vl__digits = tmp_9;
}
current_location.update_lineno(203);
/* TCCEncoding_Functions.ttcn, line 203 */
{
INTEGER tmp_10;
++vl__size;
}
}
current_location.update_lineno(206);
/* TCCEncoding_Functions.ttcn, line 206 */
vl__oct = bit2oct((((((vl__oddEvenIndicator + int2bit(ISUP__NatureOfAddress::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).natureOfAddressIndicator()), 7)) + int2bit(ISUP__NumberingIncompleteIndicator::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).iNN()), 1)) + int2bit(NumberPlan::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).numberingPlanIndicator()), 3)) + int2bit(ISUP__AddressPresentationRestrictedIndicator::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).address__presentation__restricted__indicator()), 2)) + int2bit(ISUP__ScreeningIndicator::enum2int(const_cast< const ISUP__Calling__Party__Number&>(pl__ISUP__Calling__Party__Number).screening__indicator()), 2)));
current_location.update_lineno(213);
/* TCCEncoding_Functions.ttcn, line 213 */
{
INTEGER tmp_12;
tmp_12 = (vl__size / 2);
vl__size = tmp_12;
}
current_location.update_lineno(215);
/* TCCEncoding_Functions.ttcn, line 215 */
vl__i = 0;
current_location.update_lineno(215);
/* TCCEncoding_Functions.ttcn, line 215 */
for ( ; ; ) {
current_location.update_lineno(215);
/* TCCEncoding_Functions.ttcn, line 215 */
if (!(vl__i < vl__size)) break;
current_location.update_lineno(217);
/* TCCEncoding_Functions.ttcn, line 217 */
{
OCTETSTRING tmp_14;
tmp_14 = (vl__oct + hex2oct((const_cast< const HEXSTRING&>(vl__digits)[((2 * vl__i) + 1)] + const_cast< const HEXSTRING&>(vl__digits)[(2 * vl__i)])));
vl__oct = tmp_14;
}
current_location.update_lineno(215);
/* TCCEncoding_Functions.ttcn, line 215 */
{
INTEGER tmp_15;
++vl__i;
}
}
current_location.update_lineno(220);
/* TCCEncoding_Functions.ttcn, line 220 */
return vl__oct;
}

OCTETSTRING f__encode__MobileL3__CalledPartyBCDNumber(const MobileL3__CalledPartyBCDNumber& pl__MobileL3__CalledPartyBCDNumber)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 263, TTCN_Location::LOCATION_FUNCTION, "f_encode_MobileL3_CalledPartyBCDNumber");
current_location.update_lineno(266);
/* TCCEncoding_Functions.ttcn, line 266 */
INTEGER vl__i;
current_location.update_lineno(267);
/* TCCEncoding_Functions.ttcn, line 267 */
OCTETSTRING vl__oct;
current_location.update_lineno(268);
/* TCCEncoding_Functions.ttcn, line 268 */
HEXSTRING vl__digits(const_cast< const MobileL3__CalledPartyBCDNumber&>(pl__MobileL3__CalledPartyBCDNumber).numberDigits());
current_location.update_lineno(269);
/* TCCEncoding_Functions.ttcn, line 269 */
INTEGER vl__size(const_cast< const MobileL3__CalledPartyBCDNumber&>(pl__MobileL3__CalledPartyBCDNumber).numberDigits().lengthof());
current_location.update_lineno(270);
/* TCCEncoding_Functions.ttcn, line 270 */
if ((mod(vl__size, 2) == 1)) {
current_location.update_lineno(271);
/* TCCEncoding_Functions.ttcn, line 271 */
{
HEXSTRING tmp_16;
tmp_16 = (vl__digits + hs_1);
vl__digits = tmp_16;
}
current_location.update_lineno(272);
/* TCCEncoding_Functions.ttcn, line 272 */
{
INTEGER tmp_17;
++vl__size;
}
}
current_location.update_lineno(275);
/* TCCEncoding_Functions.ttcn, line 275 */
vl__oct = bit2oct(((bs_1 + int2bit(MobileL3__TypeOfNumber::enum2int(const_cast< const MobileL3__CalledPartyBCDNumber&>(pl__MobileL3__CalledPartyBCDNumber).typeOfNumber()), 3)) + int2bit(NumberPlan::enum2int(const_cast< const MobileL3__CalledPartyBCDNumber&>(pl__MobileL3__CalledPartyBCDNumber).numberingPlanIdentification()), 4)));
current_location.update_lineno(279);
/* TCCEncoding_Functions.ttcn, line 279 */
{
INTEGER tmp_19;
tmp_19 = (vl__size / 2);
vl__size = tmp_19;
}
current_location.update_lineno(281);
/* TCCEncoding_Functions.ttcn, line 281 */
vl__i = 0;
current_location.update_lineno(281);
/* TCCEncoding_Functions.ttcn, line 281 */
for ( ; ; ) {
current_location.update_lineno(281);
/* TCCEncoding_Functions.ttcn, line 281 */
if (!(vl__i < vl__size)) break;
current_location.update_lineno(283);
/* TCCEncoding_Functions.ttcn, line 283 */
{
OCTETSTRING tmp_21;
tmp_21 = (vl__oct + hex2oct((const_cast< const HEXSTRING&>(vl__digits)[((2 * vl__i) + 1)] + const_cast< const HEXSTRING&>(vl__digits)[(2 * vl__i)])));
vl__oct = tmp_21;
}
current_location.update_lineno(281);
/* TCCEncoding_Functions.ttcn, line 281 */
{
INTEGER tmp_22;
++vl__i;
}
}
current_location.update_lineno(285);
/* TCCEncoding_Functions.ttcn, line 285 */
return vl__oct;
}

OCTETSTRING f__encGSM7bit(const UNIVERSAL_CHARSTRING& pl__str)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 397, TTCN_Location::LOCATION_FUNCTION, "f_encGSM7bit");
current_location.update_lineno(398);
/* TCCEncoding_Functions.ttcn, line 398 */
INTEGER vl__len;
current_location.update_lineno(398);
/* TCCEncoding_Functions.ttcn, line 398 */
INTEGER i;
current_location.update_lineno(398);
/* TCCEncoding_Functions.ttcn, line 398 */
INTEGER v__unichar__code;
current_location.update_lineno(399);
/* TCCEncoding_Functions.ttcn, line 399 */
BITSTRING vl__ret(bs_3);
current_location.update_lineno(399);
/* TCCEncoding_Functions.ttcn, line 399 */
BITSTRING vl__ret2(bs_3);
current_location.update_lineno(399);
/* TCCEncoding_Functions.ttcn, line 399 */
BITSTRING vl__padstr(bs_3);
current_location.update_lineno(399);
/* TCCEncoding_Functions.ttcn, line 399 */
BITSTRING vl__bitstr(bs_3);
current_location.update_lineno(401);
/* TCCEncoding_Functions.ttcn, line 401 */
i = 0;
current_location.update_lineno(401);
/* TCCEncoding_Functions.ttcn, line 401 */
for ( ; ; ) {
current_location.update_lineno(401);
/* TCCEncoding_Functions.ttcn, line 401 */
if (!(i < pl__str.lengthof())) break;
current_location.update_lineno(403);
/* TCCEncoding_Functions.ttcn, line 403 */
v__unichar__code = unichar2int(const_cast< const UNIVERSAL_CHARSTRING&>(pl__str)[i]);
current_location.update_lineno(404);
/* TCCEncoding_Functions.ttcn, line 404 */
if ((v__unichar__code <= 255)) {
current_location.update_lineno(406);
/* TCCEncoding_Functions.ttcn, line 406 */
if ((c__GSM__7__bit__Default__Alphabet__Encoder[v__unichar__code] != bs_3)) {
current_location.update_lineno(408);
/* TCCEncoding_Functions.ttcn, line 408 */
{
BITSTRING tmp_25;
tmp_25 = (vl__ret + c__GSM__7__bit__Default__Alphabet__Encoder[v__unichar__code]);
vl__ret = tmp_25;
}
}
else {
current_location.update_lineno(412);
/* TCCEncoding_Functions.ttcn, line 412 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Warning : Invalid character ");
const_cast< const UNIVERSAL_CHARSTRING&>(pl__str)[i].log();
TTCN_Logger::log_event_str(" will be encoded as space!");
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(413);
/* TCCEncoding_Functions.ttcn, line 413 */
{
BITSTRING tmp_26;
tmp_26 = (vl__ret + bs_4);
vl__ret = tmp_26;
}
}
}
else {
current_location.update_lineno(416);
/* TCCEncoding_Functions.ttcn, line 416 */
boolean tmp_27;
tmp_27 = (v__unichar__code >= 915);
if (tmp_27) tmp_27 = (v__unichar__code <= 937);
if (tmp_27) {
current_location.update_lineno(418);
/* TCCEncoding_Functions.ttcn, line 418 */
if ((c__GSM__7__bit__Greek__Encoder[(v__unichar__code - 915)] != bs_3)) {
current_location.update_lineno(420);
/* TCCEncoding_Functions.ttcn, line 420 */
{
BITSTRING tmp_28;
tmp_28 = (vl__ret + c__GSM__7__bit__Greek__Encoder[(v__unichar__code - 915)]);
vl__ret = tmp_28;
}
}
else {
current_location.update_lineno(424);
/* TCCEncoding_Functions.ttcn, line 424 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Warning : Invalid character ");
const_cast< const UNIVERSAL_CHARSTRING&>(pl__str)[i].log();
TTCN_Logger::log_event_str(" will be encoded as space!");
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(425);
/* TCCEncoding_Functions.ttcn, line 425 */
{
BITSTRING tmp_29;
tmp_29 = (vl__ret + bs_4);
vl__ret = tmp_29;
}
}
}
else {
current_location.update_lineno(428);
/* TCCEncoding_Functions.ttcn, line 428 */
if ((v__unichar__code == 8364)) {
current_location.update_lineno(430);
/* TCCEncoding_Functions.ttcn, line 430 */
{
BITSTRING tmp_30;
tmp_30 = (vl__ret + bs_5);
vl__ret = tmp_30;
}
}
else {
current_location.update_lineno(434);
/* TCCEncoding_Functions.ttcn, line 434 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Warning : Invalid character ");
const_cast< const UNIVERSAL_CHARSTRING&>(pl__str)[i].log();
TTCN_Logger::log_event_str(" will be encoded as space!");
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(435);
/* TCCEncoding_Functions.ttcn, line 435 */
{
BITSTRING tmp_31;
tmp_31 = (vl__ret + bs_4);
vl__ret = tmp_31;
}
}
}
}
current_location.update_lineno(401);
/* TCCEncoding_Functions.ttcn, line 401 */
{
INTEGER tmp_32;
++i;
}
}
current_location.update_lineno(439);
/* TCCEncoding_Functions.ttcn, line 439 */
if ((mod(vl__ret.lengthof(), 8) != 1)) {
current_location.update_lineno(440);
/* TCCEncoding_Functions.ttcn, line 440 */
vl__padstr = int2bit(0, (8 - mod(vl__ret.lengthof(), 8)));
}
else {
current_location.update_lineno(442);
/* TCCEncoding_Functions.ttcn, line 442 */
vl__padstr = bs_6;
}
current_location.update_lineno(445);
/* TCCEncoding_Functions.ttcn, line 445 */
{
BITSTRING tmp_35;
tmp_35 = (vl__ret + vl__padstr);
vl__ret = tmp_35;
}
current_location.update_lineno(446);
/* TCCEncoding_Functions.ttcn, line 446 */
vl__len = (vl__ret.lengthof() / 8);
current_location.update_lineno(449);
/* TCCEncoding_Functions.ttcn, line 449 */
i = 0;
current_location.update_lineno(449);
/* TCCEncoding_Functions.ttcn, line 449 */
for ( ; ; ) {
current_location.update_lineno(449);
/* TCCEncoding_Functions.ttcn, line 449 */
if (!(i < vl__len)) break;
current_location.update_lineno(451);
/* TCCEncoding_Functions.ttcn, line 451 */
vl__bitstr = substr(vl__ret, (i * 8), 8);
current_location.update_lineno(452);
/* TCCEncoding_Functions.ttcn, line 452 */
{
BITSTRING tmp_39;
tmp_39 = ((((((((vl__ret2 + const_cast< const BITSTRING&>(vl__bitstr)[7]) + const_cast< const BITSTRING&>(vl__bitstr)[6]) + const_cast< const BITSTRING&>(vl__bitstr)[5]) + const_cast< const BITSTRING&>(vl__bitstr)[4]) + const_cast< const BITSTRING&>(vl__bitstr)[3]) + const_cast< const BITSTRING&>(vl__bitstr)[2]) + const_cast< const BITSTRING&>(vl__bitstr)[1]) + const_cast< const BITSTRING&>(vl__bitstr)[0]);
vl__ret2 = tmp_39;
}
current_location.update_lineno(449);
/* TCCEncoding_Functions.ttcn, line 449 */
{
INTEGER tmp_40;
++i;
}
}
current_location.update_lineno(455);
/* TCCEncoding_Functions.ttcn, line 455 */
return bit2oct(vl__ret2);
}

UNIVERSAL_CHARSTRING f__decGSM7bit(const OCTETSTRING& pl__gsm7bit)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 474, TTCN_Location::LOCATION_FUNCTION, "f_decGSM7bit");
current_location.update_lineno(475);
/* TCCEncoding_Functions.ttcn, line 475 */
BITSTRING vl__7bitstr(oct2bit(pl__gsm7bit));
current_location.update_lineno(476);
/* TCCEncoding_Functions.ttcn, line 476 */
BITSTRING vl__reversed(bs_3);
current_location.update_lineno(477);
/* TCCEncoding_Functions.ttcn, line 477 */
BITSTRING vl__8bits(bs_3);
current_location.update_lineno(478);
/* TCCEncoding_Functions.ttcn, line 478 */
BITSTRING vl__7bits(bs_3);
current_location.update_lineno(479);
/* TCCEncoding_Functions.ttcn, line 479 */
UNIVERSAL_CHARSTRING vl__ret(cs_0);
current_location.update_lineno(480);
/* TCCEncoding_Functions.ttcn, line 480 */
UNIVERSAL_CHARSTRING vl__char(cs_0);
current_location.update_lineno(481);
/* TCCEncoding_Functions.ttcn, line 481 */
INTEGER vl__index;
{
current_location.update_lineno(483);
/* TCCEncoding_Functions.ttcn, line 483 */
INTEGER i(0);
current_location.update_lineno(483);
/* TCCEncoding_Functions.ttcn, line 483 */
for ( ; ; ) {
current_location.update_lineno(483);
/* TCCEncoding_Functions.ttcn, line 483 */
if (!(i < vl__7bitstr.lengthof())) break;
current_location.update_lineno(484);
/* TCCEncoding_Functions.ttcn, line 484 */
vl__8bits = substr(vl__7bitstr, i, 8);
current_location.update_lineno(485);
/* TCCEncoding_Functions.ttcn, line 485 */
{
BITSTRING tmp_42;
tmp_42 = ((((((((vl__reversed + const_cast< const BITSTRING&>(vl__8bits)[7]) + const_cast< const BITSTRING&>(vl__8bits)[6]) + const_cast< const BITSTRING&>(vl__8bits)[5]) + const_cast< const BITSTRING&>(vl__8bits)[4]) + const_cast< const BITSTRING&>(vl__8bits)[3]) + const_cast< const BITSTRING&>(vl__8bits)[2]) + const_cast< const BITSTRING&>(vl__8bits)[1]) + const_cast< const BITSTRING&>(vl__8bits)[0]);
vl__reversed = tmp_42;
}
current_location.update_lineno(483);
/* TCCEncoding_Functions.ttcn, line 483 */
{
INTEGER tmp_43;
tmp_43 = (i + 8);
i = tmp_43;
}
}
}
current_location.update_lineno(488);
/* TCCEncoding_Functions.ttcn, line 488 */
INTEGER vl__septets((vl__reversed.lengthof() / 7));
{
current_location.update_lineno(490);
/* TCCEncoding_Functions.ttcn, line 490 */
INTEGER i(0);
current_location.update_lineno(490);
/* TCCEncoding_Functions.ttcn, line 490 */
for ( ; ; ) {
current_location.update_lineno(490);
/* TCCEncoding_Functions.ttcn, line 490 */
if (!(i < vl__septets)) break;
current_location.update_lineno(491);
/* TCCEncoding_Functions.ttcn, line 491 */
vl__7bits = substr(vl__reversed, (i * 7), 7);
current_location.update_lineno(492);
/* TCCEncoding_Functions.ttcn, line 492 */
vl__index = bit2int((((((((bs_0 + const_cast< const BITSTRING&>(vl__7bits)[6]) + const_cast< const BITSTRING&>(vl__7bits)[5]) + const_cast< const BITSTRING&>(vl__7bits)[4]) + const_cast< const BITSTRING&>(vl__7bits)[3]) + const_cast< const BITSTRING&>(vl__7bits)[2]) + const_cast< const BITSTRING&>(vl__7bits)[1]) + const_cast< const BITSTRING&>(vl__7bits)[0]));
current_location.update_lineno(494);
/* TCCEncoding_Functions.ttcn, line 494 */
if ((vl__index < 128)) {
current_location.update_lineno(495);
/* TCCEncoding_Functions.ttcn, line 495 */
if ((vl__index != 27)) {
current_location.update_lineno(497);
/* TCCEncoding_Functions.ttcn, line 497 */
vl__char = c__GSM__7__bit__Default__Alphabet__Decoder[vl__index];
}
else {
current_location.update_lineno(501);
/* TCCEncoding_Functions.ttcn, line 501 */
vl__7bits = substr(vl__reversed, ((i + 1) * 7), 7);
current_location.update_lineno(502);
/* TCCEncoding_Functions.ttcn, line 502 */
vl__index = bit2int((((((((bs_0 + const_cast< const BITSTRING&>(vl__7bits)[6]) + const_cast< const BITSTRING&>(vl__7bits)[5]) + const_cast< const BITSTRING&>(vl__7bits)[4]) + const_cast< const BITSTRING&>(vl__7bits)[3]) + const_cast< const BITSTRING&>(vl__7bits)[2]) + const_cast< const BITSTRING&>(vl__7bits)[1]) + const_cast< const BITSTRING&>(vl__7bits)[0]));
current_location.update_lineno(503);
/* TCCEncoding_Functions.ttcn, line 503 */
vl__char = c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[vl__index];
current_location.update_lineno(504);
/* TCCEncoding_Functions.ttcn, line 504 */
if ((vl__char == cs_0)) {
current_location.update_lineno(506);
/* TCCEncoding_Functions.ttcn, line 506 */
vl__char = cs_1;
current_location.update_lineno(507);
/* TCCEncoding_Functions.ttcn, line 507 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Warning : Unknown extension character ");
vl__index.log();
TTCN_Logger::log_event_str(" will be decoded as space!");
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
}
current_location.update_lineno(509);
/* TCCEncoding_Functions.ttcn, line 509 */
{
INTEGER tmp_51;
++i;
}
}
}
current_location.update_lineno(513);
/* TCCEncoding_Functions.ttcn, line 513 */
{
UNIVERSAL_CHARSTRING tmp_52;
tmp_52 = (vl__ret + vl__char);
vl__ret = tmp_52;
}
current_location.update_lineno(490);
/* TCCEncoding_Functions.ttcn, line 490 */
{
INTEGER tmp_53;
++i;
}
}
}
current_location.update_lineno(516);
/* TCCEncoding_Functions.ttcn, line 516 */
return vl__ret;
}

BOOLEAN f__is__TBCD(const CHARSTRING& pl__number)
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 646, TTCN_Location::LOCATION_FUNCTION, "f_is_TBCD");
current_location.update_lineno(648);
/* TCCEncoding_Functions.ttcn, line 648 */
INTEGER vl__iterations(pl__number.lengthof());
{
current_location.update_lineno(649);
/* TCCEncoding_Functions.ttcn, line 649 */
INTEGER i(0);
current_location.update_lineno(649);
/* TCCEncoding_Functions.ttcn, line 649 */
for ( ; ; ) {
current_location.update_lineno(649);
/* TCCEncoding_Functions.ttcn, line 649 */
if (!(i < vl__iterations)) break;
{
const CHARSTRING &tmp_55 = const_cast< const CHARSTRING&>(pl__number)[i];
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_31) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_32) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_33) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_34) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_35) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_36) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_37) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_38) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_39) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_40) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_47) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_48) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_49) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_50) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_51) goto tmp_54_0;
current_location.update_lineno(653);
/* TCCEncoding_Functions.ttcn, line 653 */
if(tmp_55 == cs_52) goto tmp_54_0;
goto tmp_54_1;
tmp_54_0:
{
goto tmp_54_end;
}
tmp_54_1:
{
current_location.update_lineno(654);
/* TCCEncoding_Functions.ttcn, line 654 */
return FALSE;
}
tmp_54_end: /* empty */;
}
current_location.update_lineno(649);
/* TCCEncoding_Functions.ttcn, line 649 */
{
INTEGER tmp_56;
++i;
}
}
}
current_location.update_lineno(657);
/* TCCEncoding_Functions.ttcn, line 657 */
return TRUE;
}

OCTETSTRING f__enc__TBCD__hex(const HEXSTRING& pl__hex)
{
HEXSTRING pl__hex_shadow(pl__hex);
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 715, TTCN_Location::LOCATION_FUNCTION, "f_enc_TBCD_hex");
current_location.update_lineno(717);
/* TCCEncoding_Functions.ttcn, line 717 */
INTEGER vl__size(pl__hex_shadow.lengthof());
current_location.update_lineno(718);
/* TCCEncoding_Functions.ttcn, line 718 */
if ((mod(vl__size, 2) == 1)) {
current_location.update_lineno(719);
/* TCCEncoding_Functions.ttcn, line 719 */
{
HEXSTRING tmp_57;
tmp_57 = (pl__hex_shadow + hs_1);
pl__hex_shadow = tmp_57;
}
current_location.update_lineno(720);
/* TCCEncoding_Functions.ttcn, line 720 */
{
INTEGER tmp_58;
++vl__size;
}
}
current_location.update_lineno(723);
/* TCCEncoding_Functions.ttcn, line 723 */
INTEGER vl__i;
current_location.update_lineno(724);
/* TCCEncoding_Functions.ttcn, line 724 */
OCTETSTRING vl__oct(os_0);
current_location.update_lineno(726);
/* TCCEncoding_Functions.ttcn, line 726 */
vl__i = 0;
current_location.update_lineno(726);
/* TCCEncoding_Functions.ttcn, line 726 */
for ( ; ; ) {
current_location.update_lineno(726);
/* TCCEncoding_Functions.ttcn, line 726 */
if (!(vl__i < vl__size)) break;
current_location.update_lineno(727);
/* TCCEncoding_Functions.ttcn, line 727 */
{
OCTETSTRING tmp_60;
tmp_60 = (vl__oct + hex2oct((const_cast< const HEXSTRING&>(pl__hex_shadow)[(vl__i + 1)] + const_cast< const HEXSTRING&>(pl__hex_shadow)[vl__i])));
vl__oct = tmp_60;
}
current_location.update_lineno(726);
/* TCCEncoding_Functions.ttcn, line 726 */
{
INTEGER tmp_61;
tmp_61 = (vl__i + 2);
vl__i = tmp_61;
}
}
current_location.update_lineno(730);
/* TCCEncoding_Functions.ttcn, line 730 */
return vl__oct;
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("TCCEncoding_Functions.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "TCCEncoding_Functions");
module_object.add_function("f_encode_ISUP_Called_Party_Number", (genericfunc_t)&f__encode__ISUP__Called__Party__Number, NULL);
module_object.add_function("f_encode_ISUP_Calling_Party_Number", (genericfunc_t)&f__encode__ISUP__Calling__Party__Number, NULL);
module_object.add_function("f_encode_MobileL3_CalledPartyBCDNumber", (genericfunc_t)&f__encode__MobileL3__CalledPartyBCDNumber, NULL);
module_object.add_function("enc_MIME_Base64", (genericfunc_t)&enc__MIME__Base64, NULL);
module_object.add_function("dec_MIME_Base64", (genericfunc_t)&dec__MIME__Base64, NULL);
module_object.add_function("enc_LDIF_Base64", (genericfunc_t)&enc__LDIF__Base64, NULL);
module_object.add_function("dec_LDIF_Base64", (genericfunc_t)&dec__LDIF__Base64, NULL);
module_object.add_function("f_encGSM7bit", (genericfunc_t)&f__encGSM7bit, NULL);
module_object.add_function("f_decGSM7bit", (genericfunc_t)&f__decGSM7bit, NULL);
current_location.update_lineno(524);
/* TCCEncoding_Functions.ttcn, line 524 */
const_c__GSM__7__bit__Default__Alphabet__Encoder.set_size(256);
const_c__GSM__7__bit__Default__Alphabet__Encoder[0] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[1] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[2] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[3] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[4] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[5] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[6] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[7] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[8] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[9] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[10] = bs_7;
const_c__GSM__7__bit__Default__Alphabet__Encoder[11] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[12] = bs_8;
const_c__GSM__7__bit__Default__Alphabet__Encoder[13] = bs_6;
const_c__GSM__7__bit__Default__Alphabet__Encoder[14] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[15] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[16] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[17] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[18] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[19] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[20] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[21] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[22] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[23] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[24] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[25] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[26] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[27] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[28] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[29] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[30] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[31] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[32] = bs_4;
const_c__GSM__7__bit__Default__Alphabet__Encoder[33] = bs_9;
const_c__GSM__7__bit__Default__Alphabet__Encoder[34] = bs_10;
const_c__GSM__7__bit__Default__Alphabet__Encoder[35] = bs_11;
const_c__GSM__7__bit__Default__Alphabet__Encoder[36] = bs_12;
const_c__GSM__7__bit__Default__Alphabet__Encoder[37] = bs_13;
const_c__GSM__7__bit__Default__Alphabet__Encoder[38] = bs_14;
const_c__GSM__7__bit__Default__Alphabet__Encoder[39] = bs_15;
const_c__GSM__7__bit__Default__Alphabet__Encoder[40] = bs_16;
const_c__GSM__7__bit__Default__Alphabet__Encoder[41] = bs_17;
const_c__GSM__7__bit__Default__Alphabet__Encoder[42] = bs_18;
const_c__GSM__7__bit__Default__Alphabet__Encoder[43] = bs_19;
const_c__GSM__7__bit__Default__Alphabet__Encoder[44] = bs_20;
const_c__GSM__7__bit__Default__Alphabet__Encoder[45] = bs_21;
const_c__GSM__7__bit__Default__Alphabet__Encoder[46] = bs_22;
const_c__GSM__7__bit__Default__Alphabet__Encoder[47] = bs_23;
const_c__GSM__7__bit__Default__Alphabet__Encoder[48] = bs_24;
const_c__GSM__7__bit__Default__Alphabet__Encoder[49] = bs_25;
const_c__GSM__7__bit__Default__Alphabet__Encoder[50] = bs_26;
const_c__GSM__7__bit__Default__Alphabet__Encoder[51] = bs_27;
const_c__GSM__7__bit__Default__Alphabet__Encoder[52] = bs_28;
const_c__GSM__7__bit__Default__Alphabet__Encoder[53] = bs_29;
const_c__GSM__7__bit__Default__Alphabet__Encoder[54] = bs_30;
const_c__GSM__7__bit__Default__Alphabet__Encoder[55] = bs_31;
const_c__GSM__7__bit__Default__Alphabet__Encoder[56] = bs_32;
const_c__GSM__7__bit__Default__Alphabet__Encoder[57] = bs_33;
const_c__GSM__7__bit__Default__Alphabet__Encoder[58] = bs_34;
const_c__GSM__7__bit__Default__Alphabet__Encoder[59] = bs_35;
const_c__GSM__7__bit__Default__Alphabet__Encoder[60] = bs_36;
const_c__GSM__7__bit__Default__Alphabet__Encoder[61] = bs_37;
const_c__GSM__7__bit__Default__Alphabet__Encoder[62] = bs_38;
const_c__GSM__7__bit__Default__Alphabet__Encoder[63] = bs_39;
const_c__GSM__7__bit__Default__Alphabet__Encoder[64] = bs_40;
const_c__GSM__7__bit__Default__Alphabet__Encoder[65] = bs_41;
const_c__GSM__7__bit__Default__Alphabet__Encoder[66] = bs_42;
const_c__GSM__7__bit__Default__Alphabet__Encoder[67] = bs_43;
const_c__GSM__7__bit__Default__Alphabet__Encoder[68] = bs_44;
const_c__GSM__7__bit__Default__Alphabet__Encoder[69] = bs_45;
const_c__GSM__7__bit__Default__Alphabet__Encoder[70] = bs_46;
const_c__GSM__7__bit__Default__Alphabet__Encoder[71] = bs_47;
const_c__GSM__7__bit__Default__Alphabet__Encoder[72] = bs_48;
const_c__GSM__7__bit__Default__Alphabet__Encoder[73] = bs_49;
const_c__GSM__7__bit__Default__Alphabet__Encoder[74] = bs_50;
const_c__GSM__7__bit__Default__Alphabet__Encoder[75] = bs_51;
const_c__GSM__7__bit__Default__Alphabet__Encoder[76] = bs_52;
const_c__GSM__7__bit__Default__Alphabet__Encoder[77] = bs_53;
const_c__GSM__7__bit__Default__Alphabet__Encoder[78] = bs_54;
const_c__GSM__7__bit__Default__Alphabet__Encoder[79] = bs_55;
const_c__GSM__7__bit__Default__Alphabet__Encoder[80] = bs_56;
const_c__GSM__7__bit__Default__Alphabet__Encoder[81] = bs_57;
const_c__GSM__7__bit__Default__Alphabet__Encoder[82] = bs_58;
const_c__GSM__7__bit__Default__Alphabet__Encoder[83] = bs_59;
const_c__GSM__7__bit__Default__Alphabet__Encoder[84] = bs_60;
const_c__GSM__7__bit__Default__Alphabet__Encoder[85] = bs_61;
const_c__GSM__7__bit__Default__Alphabet__Encoder[86] = bs_62;
const_c__GSM__7__bit__Default__Alphabet__Encoder[87] = bs_63;
const_c__GSM__7__bit__Default__Alphabet__Encoder[88] = bs_64;
const_c__GSM__7__bit__Default__Alphabet__Encoder[89] = bs_65;
const_c__GSM__7__bit__Default__Alphabet__Encoder[90] = bs_66;
const_c__GSM__7__bit__Default__Alphabet__Encoder[91] = bs_67;
const_c__GSM__7__bit__Default__Alphabet__Encoder[92] = bs_68;
const_c__GSM__7__bit__Default__Alphabet__Encoder[93] = bs_69;
const_c__GSM__7__bit__Default__Alphabet__Encoder[94] = bs_70;
const_c__GSM__7__bit__Default__Alphabet__Encoder[95] = bs_71;
const_c__GSM__7__bit__Default__Alphabet__Encoder[96] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[97] = bs_72;
const_c__GSM__7__bit__Default__Alphabet__Encoder[98] = bs_73;
const_c__GSM__7__bit__Default__Alphabet__Encoder[99] = bs_74;
const_c__GSM__7__bit__Default__Alphabet__Encoder[100] = bs_75;
const_c__GSM__7__bit__Default__Alphabet__Encoder[101] = bs_76;
const_c__GSM__7__bit__Default__Alphabet__Encoder[102] = bs_77;
const_c__GSM__7__bit__Default__Alphabet__Encoder[103] = bs_78;
const_c__GSM__7__bit__Default__Alphabet__Encoder[104] = bs_79;
const_c__GSM__7__bit__Default__Alphabet__Encoder[105] = bs_80;
const_c__GSM__7__bit__Default__Alphabet__Encoder[106] = bs_81;
const_c__GSM__7__bit__Default__Alphabet__Encoder[107] = bs_82;
const_c__GSM__7__bit__Default__Alphabet__Encoder[108] = bs_83;
const_c__GSM__7__bit__Default__Alphabet__Encoder[109] = bs_84;
const_c__GSM__7__bit__Default__Alphabet__Encoder[110] = bs_85;
const_c__GSM__7__bit__Default__Alphabet__Encoder[111] = bs_86;
const_c__GSM__7__bit__Default__Alphabet__Encoder[112] = bs_87;
const_c__GSM__7__bit__Default__Alphabet__Encoder[113] = bs_88;
const_c__GSM__7__bit__Default__Alphabet__Encoder[114] = bs_89;
const_c__GSM__7__bit__Default__Alphabet__Encoder[115] = bs_90;
const_c__GSM__7__bit__Default__Alphabet__Encoder[116] = bs_91;
const_c__GSM__7__bit__Default__Alphabet__Encoder[117] = bs_92;
const_c__GSM__7__bit__Default__Alphabet__Encoder[118] = bs_93;
const_c__GSM__7__bit__Default__Alphabet__Encoder[119] = bs_94;
const_c__GSM__7__bit__Default__Alphabet__Encoder[120] = bs_95;
const_c__GSM__7__bit__Default__Alphabet__Encoder[121] = bs_96;
const_c__GSM__7__bit__Default__Alphabet__Encoder[122] = bs_97;
const_c__GSM__7__bit__Default__Alphabet__Encoder[123] = bs_98;
const_c__GSM__7__bit__Default__Alphabet__Encoder[124] = bs_99;
const_c__GSM__7__bit__Default__Alphabet__Encoder[125] = bs_100;
const_c__GSM__7__bit__Default__Alphabet__Encoder[126] = bs_101;
const_c__GSM__7__bit__Default__Alphabet__Encoder[127] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[128] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[129] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[130] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[131] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[132] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[133] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[134] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[135] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[136] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[137] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[138] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[139] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[140] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[141] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[142] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[143] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[144] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[145] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[146] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[147] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[148] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[149] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[150] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[151] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[152] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[153] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[154] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[155] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[156] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[157] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[158] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[159] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[160] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[161] = bs_102;
const_c__GSM__7__bit__Default__Alphabet__Encoder[162] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[163] = bs_103;
const_c__GSM__7__bit__Default__Alphabet__Encoder[164] = bs_104;
const_c__GSM__7__bit__Default__Alphabet__Encoder[165] = bs_105;
const_c__GSM__7__bit__Default__Alphabet__Encoder[166] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[167] = bs_106;
const_c__GSM__7__bit__Default__Alphabet__Encoder[168] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[169] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[170] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[171] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[172] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[173] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[174] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[175] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[176] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[177] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[178] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[179] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[180] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[181] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[182] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[183] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[184] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[185] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[186] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[187] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[188] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[189] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[190] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[191] = bs_107;
const_c__GSM__7__bit__Default__Alphabet__Encoder[192] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[193] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[194] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[195] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[196] = bs_108;
const_c__GSM__7__bit__Default__Alphabet__Encoder[197] = bs_109;
const_c__GSM__7__bit__Default__Alphabet__Encoder[198] = bs_110;
const_c__GSM__7__bit__Default__Alphabet__Encoder[199] = bs_111;
const_c__GSM__7__bit__Default__Alphabet__Encoder[200] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[201] = bs_112;
const_c__GSM__7__bit__Default__Alphabet__Encoder[202] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[203] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[204] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[205] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[206] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[207] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[208] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[209] = bs_113;
const_c__GSM__7__bit__Default__Alphabet__Encoder[210] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[211] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[212] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[213] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[214] = bs_114;
const_c__GSM__7__bit__Default__Alphabet__Encoder[215] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[216] = bs_115;
const_c__GSM__7__bit__Default__Alphabet__Encoder[217] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[218] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[219] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[220] = bs_116;
const_c__GSM__7__bit__Default__Alphabet__Encoder[221] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[222] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[223] = bs_117;
const_c__GSM__7__bit__Default__Alphabet__Encoder[224] = bs_118;
const_c__GSM__7__bit__Default__Alphabet__Encoder[225] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[226] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[227] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[228] = bs_119;
const_c__GSM__7__bit__Default__Alphabet__Encoder[229] = bs_120;
const_c__GSM__7__bit__Default__Alphabet__Encoder[230] = bs_121;
const_c__GSM__7__bit__Default__Alphabet__Encoder[231] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[232] = bs_102;
const_c__GSM__7__bit__Default__Alphabet__Encoder[233] = bs_122;
const_c__GSM__7__bit__Default__Alphabet__Encoder[234] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[235] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[236] = bs_123;
const_c__GSM__7__bit__Default__Alphabet__Encoder[237] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[238] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[239] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[240] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[241] = bs_124;
const_c__GSM__7__bit__Default__Alphabet__Encoder[242] = bs_125;
const_c__GSM__7__bit__Default__Alphabet__Encoder[243] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[244] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[245] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[246] = bs_126;
const_c__GSM__7__bit__Default__Alphabet__Encoder[247] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[248] = bs_127;
const_c__GSM__7__bit__Default__Alphabet__Encoder[249] = bs_128;
const_c__GSM__7__bit__Default__Alphabet__Encoder[250] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[251] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[252] = bs_129;
const_c__GSM__7__bit__Default__Alphabet__Encoder[253] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[254] = bs_3;
const_c__GSM__7__bit__Default__Alphabet__Encoder[255] = bs_3;
current_location.update_lineno(553);
/* TCCEncoding_Functions.ttcn, line 553 */
const_c__GSM__7__bit__Greek__Encoder.set_size(23);
const_c__GSM__7__bit__Greek__Encoder[0] = bs_130;
const_c__GSM__7__bit__Greek__Encoder[1] = bs_131;
const_c__GSM__7__bit__Greek__Encoder[2] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[3] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[4] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[5] = bs_132;
const_c__GSM__7__bit__Greek__Encoder[6] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[7] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[8] = bs_133;
const_c__GSM__7__bit__Greek__Encoder[9] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[10] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[11] = bs_134;
const_c__GSM__7__bit__Greek__Encoder[12] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[13] = bs_135;
const_c__GSM__7__bit__Greek__Encoder[14] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[15] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[16] = bs_136;
const_c__GSM__7__bit__Greek__Encoder[17] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[18] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[19] = bs_137;
const_c__GSM__7__bit__Greek__Encoder[20] = bs_3;
const_c__GSM__7__bit__Greek__Encoder[21] = bs_138;
const_c__GSM__7__bit__Greek__Encoder[22] = bs_139;
current_location.update_lineno(577);
/* TCCEncoding_Functions.ttcn, line 577 */
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder.set_size(128);
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[0] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[1] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[2] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[3] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[4] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[5] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[6] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[7] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[8] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[9] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[10] = cs_2;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[11] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[12] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[13] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[14] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[15] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[16] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[17] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[18] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[19] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[20] = cs_3;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[21] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[22] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[23] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[24] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[25] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[26] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[27] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[28] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[29] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[30] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[31] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[32] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[33] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[34] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[35] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[36] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[37] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[38] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[39] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[40] = cs_4;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[41] = cs_5;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[42] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[43] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[44] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[45] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[46] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[47] = cs_6;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[48] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[49] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[50] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[51] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[52] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[53] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[54] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[55] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[56] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[57] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[58] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[59] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[60] = cs_7;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[61] = cs_8;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[62] = cs_9;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[63] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[64] = cs_10;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[65] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[66] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[67] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[68] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[69] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[70] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[71] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[72] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[73] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[74] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[75] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[76] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[77] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[78] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[79] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[80] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[81] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[82] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[83] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[84] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[85] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[86] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[87] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[88] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[89] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[90] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[91] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[92] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[93] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[94] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[95] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[96] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[97] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[98] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[99] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[100] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[101] = us_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[102] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[103] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[104] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[105] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[106] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[107] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[108] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[109] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[110] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[111] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[112] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[113] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[114] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[115] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[116] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[117] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[118] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[119] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[120] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[121] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[122] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[123] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[124] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[125] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[126] = cs_0;
const_c__GSM__7__bit__Default__Alphabet__Extensions__Decoder[127] = cs_0;
current_location.update_lineno(596);
/* TCCEncoding_Functions.ttcn, line 596 */
const_c__GSM__7__bit__Default__Alphabet__Decoder.set_size(128);
const_c__GSM__7__bit__Default__Alphabet__Decoder[0] = cs_11;
const_c__GSM__7__bit__Default__Alphabet__Decoder[1] = us_1;
const_c__GSM__7__bit__Default__Alphabet__Decoder[2] = cs_12;
const_c__GSM__7__bit__Default__Alphabet__Decoder[3] = us_2;
const_c__GSM__7__bit__Default__Alphabet__Decoder[4] = us_3;
const_c__GSM__7__bit__Default__Alphabet__Decoder[5] = us_4;
const_c__GSM__7__bit__Default__Alphabet__Decoder[6] = us_5;
const_c__GSM__7__bit__Default__Alphabet__Decoder[7] = us_6;
const_c__GSM__7__bit__Default__Alphabet__Decoder[8] = us_7;
const_c__GSM__7__bit__Default__Alphabet__Decoder[9] = us_8;
const_c__GSM__7__bit__Default__Alphabet__Decoder[10] = cs_13;
const_c__GSM__7__bit__Default__Alphabet__Decoder[11] = us_9;
const_c__GSM__7__bit__Default__Alphabet__Decoder[12] = us_10;
const_c__GSM__7__bit__Default__Alphabet__Decoder[13] = cs_14;
const_c__GSM__7__bit__Default__Alphabet__Decoder[14] = us_11;
const_c__GSM__7__bit__Default__Alphabet__Decoder[15] = us_12;
const_c__GSM__7__bit__Default__Alphabet__Decoder[16] = us_13;
const_c__GSM__7__bit__Default__Alphabet__Decoder[17] = cs_15;
const_c__GSM__7__bit__Default__Alphabet__Decoder[18] = us_14;
const_c__GSM__7__bit__Default__Alphabet__Decoder[19] = us_15;
const_c__GSM__7__bit__Default__Alphabet__Decoder[20] = us_16;
const_c__GSM__7__bit__Default__Alphabet__Decoder[21] = us_17;
const_c__GSM__7__bit__Default__Alphabet__Decoder[22] = us_18;
const_c__GSM__7__bit__Default__Alphabet__Decoder[23] = us_19;
const_c__GSM__7__bit__Default__Alphabet__Decoder[24] = us_20;
const_c__GSM__7__bit__Default__Alphabet__Decoder[25] = us_21;
const_c__GSM__7__bit__Default__Alphabet__Decoder[26] = us_22;
const_c__GSM__7__bit__Default__Alphabet__Decoder[27] = cs_16;
const_c__GSM__7__bit__Default__Alphabet__Decoder[28] = us_23;
const_c__GSM__7__bit__Default__Alphabet__Decoder[29] = us_24;
const_c__GSM__7__bit__Default__Alphabet__Decoder[30] = us_25;
const_c__GSM__7__bit__Default__Alphabet__Decoder[31] = us_26;
const_c__GSM__7__bit__Default__Alphabet__Decoder[32] = cs_1;
const_c__GSM__7__bit__Default__Alphabet__Decoder[33] = cs_17;
const_c__GSM__7__bit__Default__Alphabet__Decoder[34] = cs_18;
const_c__GSM__7__bit__Default__Alphabet__Decoder[35] = cs_19;
const_c__GSM__7__bit__Default__Alphabet__Decoder[36] = us_27;
const_c__GSM__7__bit__Default__Alphabet__Decoder[37] = cs_20;
const_c__GSM__7__bit__Default__Alphabet__Decoder[38] = cs_21;
const_c__GSM__7__bit__Default__Alphabet__Decoder[39] = cs_22;
const_c__GSM__7__bit__Default__Alphabet__Decoder[40] = cs_23;
const_c__GSM__7__bit__Default__Alphabet__Decoder[41] = cs_24;
const_c__GSM__7__bit__Default__Alphabet__Decoder[42] = cs_25;
const_c__GSM__7__bit__Default__Alphabet__Decoder[43] = cs_26;
const_c__GSM__7__bit__Default__Alphabet__Decoder[44] = cs_27;
const_c__GSM__7__bit__Default__Alphabet__Decoder[45] = cs_28;
const_c__GSM__7__bit__Default__Alphabet__Decoder[46] = cs_29;
const_c__GSM__7__bit__Default__Alphabet__Decoder[47] = cs_30;
const_c__GSM__7__bit__Default__Alphabet__Decoder[48] = cs_31;
const_c__GSM__7__bit__Default__Alphabet__Decoder[49] = cs_32;
const_c__GSM__7__bit__Default__Alphabet__Decoder[50] = cs_33;
const_c__GSM__7__bit__Default__Alphabet__Decoder[51] = cs_34;
const_c__GSM__7__bit__Default__Alphabet__Decoder[52] = cs_35;
const_c__GSM__7__bit__Default__Alphabet__Decoder[53] = cs_36;
const_c__GSM__7__bit__Default__Alphabet__Decoder[54] = cs_37;
const_c__GSM__7__bit__Default__Alphabet__Decoder[55] = cs_38;
const_c__GSM__7__bit__Default__Alphabet__Decoder[56] = cs_39;
const_c__GSM__7__bit__Default__Alphabet__Decoder[57] = cs_40;
const_c__GSM__7__bit__Default__Alphabet__Decoder[58] = cs_41;
const_c__GSM__7__bit__Default__Alphabet__Decoder[59] = cs_42;
const_c__GSM__7__bit__Default__Alphabet__Decoder[60] = cs_43;
const_c__GSM__7__bit__Default__Alphabet__Decoder[61] = cs_44;
const_c__GSM__7__bit__Default__Alphabet__Decoder[62] = cs_45;
const_c__GSM__7__bit__Default__Alphabet__Decoder[63] = cs_46;
const_c__GSM__7__bit__Default__Alphabet__Decoder[64] = us_28;
const_c__GSM__7__bit__Default__Alphabet__Decoder[65] = cs_47;
const_c__GSM__7__bit__Default__Alphabet__Decoder[66] = cs_48;
const_c__GSM__7__bit__Default__Alphabet__Decoder[67] = cs_49;
const_c__GSM__7__bit__Default__Alphabet__Decoder[68] = cs_50;
const_c__GSM__7__bit__Default__Alphabet__Decoder[69] = cs_51;
const_c__GSM__7__bit__Default__Alphabet__Decoder[70] = cs_52;
const_c__GSM__7__bit__Default__Alphabet__Decoder[71] = cs_53;
const_c__GSM__7__bit__Default__Alphabet__Decoder[72] = cs_54;
const_c__GSM__7__bit__Default__Alphabet__Decoder[73] = cs_55;
const_c__GSM__7__bit__Default__Alphabet__Decoder[74] = cs_56;
const_c__GSM__7__bit__Default__Alphabet__Decoder[75] = cs_57;
const_c__GSM__7__bit__Default__Alphabet__Decoder[76] = cs_58;
const_c__GSM__7__bit__Default__Alphabet__Decoder[77] = cs_59;
const_c__GSM__7__bit__Default__Alphabet__Decoder[78] = cs_60;
const_c__GSM__7__bit__Default__Alphabet__Decoder[79] = cs_61;
const_c__GSM__7__bit__Default__Alphabet__Decoder[80] = cs_62;
const_c__GSM__7__bit__Default__Alphabet__Decoder[81] = cs_63;
const_c__GSM__7__bit__Default__Alphabet__Decoder[82] = cs_64;
const_c__GSM__7__bit__Default__Alphabet__Decoder[83] = cs_65;
const_c__GSM__7__bit__Default__Alphabet__Decoder[84] = cs_66;
const_c__GSM__7__bit__Default__Alphabet__Decoder[85] = cs_67;
const_c__GSM__7__bit__Default__Alphabet__Decoder[86] = cs_68;
const_c__GSM__7__bit__Default__Alphabet__Decoder[87] = cs_69;
const_c__GSM__7__bit__Default__Alphabet__Decoder[88] = cs_70;
const_c__GSM__7__bit__Default__Alphabet__Decoder[89] = cs_71;
const_c__GSM__7__bit__Default__Alphabet__Decoder[90] = cs_72;
const_c__GSM__7__bit__Default__Alphabet__Decoder[91] = us_29;
const_c__GSM__7__bit__Default__Alphabet__Decoder[92] = us_30;
const_c__GSM__7__bit__Default__Alphabet__Decoder[93] = us_31;
const_c__GSM__7__bit__Default__Alphabet__Decoder[94] = us_32;
const_c__GSM__7__bit__Default__Alphabet__Decoder[95] = us_33;
const_c__GSM__7__bit__Default__Alphabet__Decoder[96] = us_34;
const_c__GSM__7__bit__Default__Alphabet__Decoder[97] = cs_73;
const_c__GSM__7__bit__Default__Alphabet__Decoder[98] = cs_74;
const_c__GSM__7__bit__Default__Alphabet__Decoder[99] = cs_75;
const_c__GSM__7__bit__Default__Alphabet__Decoder[100] = cs_76;
const_c__GSM__7__bit__Default__Alphabet__Decoder[101] = cs_77;
const_c__GSM__7__bit__Default__Alphabet__Decoder[102] = cs_78;
const_c__GSM__7__bit__Default__Alphabet__Decoder[103] = cs_79;
const_c__GSM__7__bit__Default__Alphabet__Decoder[104] = cs_80;
const_c__GSM__7__bit__Default__Alphabet__Decoder[105] = cs_81;
const_c__GSM__7__bit__Default__Alphabet__Decoder[106] = cs_82;
const_c__GSM__7__bit__Default__Alphabet__Decoder[107] = cs_83;
const_c__GSM__7__bit__Default__Alphabet__Decoder[108] = cs_84;
const_c__GSM__7__bit__Default__Alphabet__Decoder[109] = cs_85;
const_c__GSM__7__bit__Default__Alphabet__Decoder[110] = cs_86;
const_c__GSM__7__bit__Default__Alphabet__Decoder[111] = cs_87;
const_c__GSM__7__bit__Default__Alphabet__Decoder[112] = cs_88;
const_c__GSM__7__bit__Default__Alphabet__Decoder[113] = cs_89;
const_c__GSM__7__bit__Default__Alphabet__Decoder[114] = cs_90;
const_c__GSM__7__bit__Default__Alphabet__Decoder[115] = cs_91;
const_c__GSM__7__bit__Default__Alphabet__Decoder[116] = cs_92;
const_c__GSM__7__bit__Default__Alphabet__Decoder[117] = cs_93;
const_c__GSM__7__bit__Default__Alphabet__Decoder[118] = cs_94;
const_c__GSM__7__bit__Default__Alphabet__Decoder[119] = cs_95;
const_c__GSM__7__bit__Default__Alphabet__Decoder[120] = cs_96;
const_c__GSM__7__bit__Default__Alphabet__Decoder[121] = cs_97;
const_c__GSM__7__bit__Default__Alphabet__Decoder[122] = cs_98;
const_c__GSM__7__bit__Default__Alphabet__Decoder[123] = us_35;
const_c__GSM__7__bit__Default__Alphabet__Decoder[124] = us_36;
const_c__GSM__7__bit__Default__Alphabet__Decoder[125] = us_37;
const_c__GSM__7__bit__Default__Alphabet__Decoder[126] = us_38;
const_c__GSM__7__bit__Default__Alphabet__Decoder[127] = us_39;
module_object.add_function("f_is_TBCD", (genericfunc_t)&f__is__TBCD, NULL);
module_object.add_function("f_enc_TBCD", (genericfunc_t)&f__enc__TBCD, NULL);
module_object.add_function("f_dec_TBCD", (genericfunc_t)&f__dec__TBCD, NULL);
module_object.add_function("f_enc_TBCD_hex", (genericfunc_t)&f__enc__TBCD__hex, NULL);
}


} /* end of namespace */
