// 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 "TCCConversion_Functions.hh"

namespace TCCConversion__Functions {

/* Literal string constants */

extern const OCTETSTRING os_0(0, NULL);
extern const CHARSTRING cs_0(0, NULL),
cs_7('\t'),
cs_6('\n'),
cs_5('\r'),
cs_4(' '),
cs_8('0'),
cs_2(':'),
cs_1('['),
cs_3(']');
const unsigned char module_checksum[] = { 0xf4, 0x51, 0x10, 0x3b, 0x83, 0x19, 0x96, 0xe2, 0x0c, 0x59, 0x98, 0x26, 0x71, 0x84, 0xb5, 0xbb };

/* Global variable definitions */

// No XER for TCC__Conversion__ch__list
const TTCN_Typedescriptor_t TCC__Conversion__ch__list_descr_ = { "@TCCConversion_Functions.TCC_Conversion_ch_list", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       TCC__Conversion__ch__list_0_xer_ = { {"CHARSTRING>\n", "CHARSTRING>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t TCC__Conversion__ch__list_0_descr_ = { "@TCCConversion_Functions.TCC_Conversion_ch_list.<oftype>", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &TCC__Conversion__ch__list_0_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
TCC__Conversion__ch__list const_TCC__Converion__ch__empty__list;
const TCC__Conversion__ch__list& TCC__Converion__ch__empty__list = const_TCC__Converion__ch__empty__list;
INTEGER const_f__strstr_offset_defval;
const INTEGER& f__strstr_offset_defval = const_f__strstr_offset_defval;
INTEGER const_f__strstr__oct_offset_defval;
const INTEGER& f__strstr__oct_offset_defval = const_f__strstr__oct_offset_defval;
TTCN_Module module_object("TCCConversion_Functions", __DATE__, __TIME__, module_checksum, pre_init_module, "", 0U, 36U, 1U, 99U, "", 0LU, 0, post_init_module, 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);

/* Bodies of functions, altsteps and testcases */

CHARSTRING f__unichar2charstr(const UNIVERSAL_CHARSTRING& p__unichar)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 92, TTCN_Location::LOCATION_FUNCTION, "f_unichar2charstr");
current_location.update_lineno(94);
/* TCCConversion_Functions.ttcn, line 94 */
CHARSTRING vl__char(cs_0);
current_location.update_lineno(96);
/* TCCConversion_Functions.ttcn, line 96 */
if ((p__unichar.lengthof() == 0)) {
current_location.update_lineno(96);
/* TCCConversion_Functions.ttcn, line 96 */
return cs_0;
}
{
current_location.update_lineno(97);
/* TCCConversion_Functions.ttcn, line 97 */
INTEGER i(0);
current_location.update_lineno(97);
/* TCCConversion_Functions.ttcn, line 97 */
for ( ; ; ) {
current_location.update_lineno(97);
/* TCCConversion_Functions.ttcn, line 97 */
if (!(i < p__unichar.lengthof())) break;
current_location.update_lineno(99);
/* TCCConversion_Functions.ttcn, line 99 */
{
CHARSTRING tmp_0;
tmp_0 = (vl__char + int2char(unichar2int(const_cast< const UNIVERSAL_CHARSTRING&>(p__unichar)[i])));
vl__char = tmp_0;
}
current_location.update_lineno(97);
/* TCCConversion_Functions.ttcn, line 97 */
{
INTEGER tmp_1;
++i;
}
}
}
current_location.update_lineno(101);
/* TCCConversion_Functions.ttcn, line 101 */
return vl__char;
}

UNIVERSAL_CHARSTRING f__charstr2unichar(const CHARSTRING& p__char)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 124, TTCN_Location::LOCATION_FUNCTION, "f_charstr2unichar");
current_location.update_lineno(126);
/* TCCConversion_Functions.ttcn, line 126 */
UNIVERSAL_CHARSTRING vl__unichar(cs_0);
current_location.update_lineno(128);
/* TCCConversion_Functions.ttcn, line 128 */
if ((p__char.lengthof() == 0)) {
current_location.update_lineno(128);
/* TCCConversion_Functions.ttcn, line 128 */
return cs_0;
}
{
current_location.update_lineno(129);
/* TCCConversion_Functions.ttcn, line 129 */
INTEGER i(0);
current_location.update_lineno(129);
/* TCCConversion_Functions.ttcn, line 129 */
for ( ; ; ) {
current_location.update_lineno(129);
/* TCCConversion_Functions.ttcn, line 129 */
if (!(i < p__char.lengthof())) break;
current_location.update_lineno(131);
/* TCCConversion_Functions.ttcn, line 131 */
{
UNIVERSAL_CHARSTRING tmp_2;
tmp_2 = (vl__unichar + int2unichar(char2int(const_cast< const CHARSTRING&>(p__char)[i])));
vl__unichar = tmp_2;
}
current_location.update_lineno(129);
/* TCCConversion_Functions.ttcn, line 129 */
{
INTEGER tmp_3;
++i;
}
}
}
current_location.update_lineno(133);
/* TCCConversion_Functions.ttcn, line 133 */
return vl__unichar;
}

CHARSTRING f__replaceFirstOccurenceOfSubstring(const CHARSTRING& parInStr, const CHARSTRING& parSubStrA, const CHARSTRING& parSubStrB)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 157, TTCN_Location::LOCATION_FUNCTION, "f_replaceFirstOccurenceOfSubstring");
current_location.update_lineno(163);
/* TCCConversion_Functions.ttcn, line 163 */
INTEGER i(f__strstr(parInStr, parSubStrA, f__strstr_offset_defval));
current_location.update_lineno(164);
/* TCCConversion_Functions.ttcn, line 164 */
CHARSTRING OutStr;
current_location.update_lineno(166);
/* TCCConversion_Functions.ttcn, line 166 */
if ((i == -1)) {
current_location.update_lineno(167);
/* TCCConversion_Functions.ttcn, line 167 */
return parInStr;
}
current_location.update_lineno(169);
/* TCCConversion_Functions.ttcn, line 169 */
OutStr = ((substr(parInStr, 0, i) + parSubStrB) + substr(parInStr, (i + parSubStrA.lengthof()), ((parInStr.lengthof() - i) - parSubStrA.lengthof())));
current_location.update_lineno(174);
/* TCCConversion_Functions.ttcn, line 174 */
return OutStr;
}

CHARSTRING f__replaceEveryOccurenceOfSubstring(const CHARSTRING& parInStr, const CHARSTRING& parSubStrA, const CHARSTRING& parSubStrB)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 199, TTCN_Location::LOCATION_FUNCTION, "f_replaceEveryOccurenceOfSubstring");
current_location.update_lineno(204);
/* TCCConversion_Functions.ttcn, line 204 */
INTEGER startRegion(0);
current_location.update_lineno(205);
/* TCCConversion_Functions.ttcn, line 205 */
INTEGER i(f__strstr(parInStr, parSubStrA, f__strstr_offset_defval));
current_location.update_lineno(206);
/* TCCConversion_Functions.ttcn, line 206 */
CHARSTRING OutStr(cs_0);
current_location.update_lineno(207);
/* TCCConversion_Functions.ttcn, line 207 */
INTEGER vl__sizeA(parSubStrA.lengthof());
for ( ; ; ) {
current_location.update_lineno(209);
/* TCCConversion_Functions.ttcn, line 209 */
if (!(i != -1)) break;
current_location.update_lineno(211);
/* TCCConversion_Functions.ttcn, line 211 */
{
CHARSTRING tmp_5;
tmp_5 = ((OutStr + substr(parInStr, startRegion, (i - startRegion))) + parSubStrB);
OutStr = tmp_5;
}
current_location.update_lineno(214);
/* TCCConversion_Functions.ttcn, line 214 */
startRegion = (i + vl__sizeA);
current_location.update_lineno(215);
/* TCCConversion_Functions.ttcn, line 215 */
i = f__strstr(parInStr, parSubStrA, startRegion);
}
current_location.update_lineno(218);
/* TCCConversion_Functions.ttcn, line 218 */
INTEGER remainderSize((parInStr.lengthof() - startRegion));
current_location.update_lineno(219);
/* TCCConversion_Functions.ttcn, line 219 */
if ((remainderSize > 0)) {
current_location.update_lineno(220);
/* TCCConversion_Functions.ttcn, line 220 */
{
CHARSTRING tmp_8;
tmp_8 = (OutStr + substr(parInStr, startRegion, remainderSize));
OutStr = tmp_8;
}
}
current_location.update_lineno(223);
/* TCCConversion_Functions.ttcn, line 223 */
return OutStr;
}

CHARSTRING f__replaceFirstOccurenceOfPattern(const CHARSTRING& parInStr, const CHARSTRING& parSubStrA, const CHARSTRING& parSubStrB)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 246, TTCN_Location::LOCATION_FUNCTION, "f_replaceFirstOccurenceOfPattern");
current_location.update_lineno(252);
/* TCCConversion_Functions.ttcn, line 252 */
CHARSTRING v__SubStrA;
current_location.update_lineno(254);
/* TCCConversion_Functions.ttcn, line 254 */
v__SubStrA = regexp(parInStr, parSubStrA, 0, FALSE);
current_location.update_lineno(255);
/* TCCConversion_Functions.ttcn, line 255 */
if ((v__SubStrA != cs_0)) {
current_location.update_lineno(256);
/* TCCConversion_Functions.ttcn, line 256 */
return f__replaceFirstOccurenceOfSubstring(parInStr, v__SubStrA, parSubStrB);
}
else {
current_location.update_lineno(259);
/* TCCConversion_Functions.ttcn, line 259 */
return parInStr;
}
}

CHARSTRING f__replaceEveryOccurenceOfPattern(const CHARSTRING& parInStr, const CHARSTRING& parSubStrA, const CHARSTRING& parSubStrB)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 285, TTCN_Location::LOCATION_FUNCTION, "f_replaceEveryOccurenceOfPattern");
current_location.update_lineno(290);
/* TCCConversion_Functions.ttcn, line 290 */
CHARSTRING OutStr;
current_location.update_lineno(290);
/* TCCConversion_Functions.ttcn, line 290 */
CHARSTRING v__SubStrA;
current_location.update_lineno(291);
/* TCCConversion_Functions.ttcn, line 291 */
CHARSTRING MyPattern(parSubStrA);
current_location.update_lineno(293);
/* TCCConversion_Functions.ttcn, line 293 */
OutStr = parInStr;
current_location.update_lineno(294);
/* TCCConversion_Functions.ttcn, line 294 */
v__SubStrA = regexp(OutStr, MyPattern, 0, FALSE);
for ( ; ; ) {
current_location.update_lineno(296);
/* TCCConversion_Functions.ttcn, line 296 */
if (!(v__SubStrA != cs_0)) break;
current_location.update_lineno(298);
/* TCCConversion_Functions.ttcn, line 298 */
OutStr = f__replaceEveryOccurenceOfSubstring(OutStr, v__SubStrA, parSubStrB);
current_location.update_lineno(299);
/* TCCConversion_Functions.ttcn, line 299 */
v__SubStrA = regexp(OutStr, MyPattern, 0, FALSE);
}
current_location.update_lineno(302);
/* TCCConversion_Functions.ttcn, line 302 */
return OutStr;
}

TCC__Conversion__ch__list f__substr__all__tokens(const CHARSTRING& str, const CHARSTRING& begin__token, const CHARSTRING& end__token)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 477, TTCN_Location::LOCATION_FUNCTION, "f_substr_all_tokens");
current_location.update_lineno(481);
/* TCCConversion_Functions.ttcn, line 481 */
TCC__Conversion__ch__list result(NULL_VALUE);
current_location.update_lineno(482);
/* TCCConversion_Functions.ttcn, line 482 */
INTEGER startIndex(0);
current_location.update_lineno(483);
/* TCCConversion_Functions.ttcn, line 483 */
INTEGER endIndex(0);
current_location.update_lineno(484);
/* TCCConversion_Functions.ttcn, line 484 */
BOOLEAN found(TRUE);
current_location.update_lineno(486);
/* TCCConversion_Functions.ttcn, line 486 */
{
boolean tmp_14;
tmp_14 = (begin__token.lengthof() == 0);
if (tmp_14) tmp_14 = (end__token.lengthof() == 0);
if (tmp_14) {
current_location.update_lineno(487);
/* TCCConversion_Functions.ttcn, line 487 */
result[0] = str;
current_location.update_lineno(488);
/* TCCConversion_Functions.ttcn, line 488 */
return result;
}
}
for ( ; ; ) {
current_location.update_lineno(491);
/* TCCConversion_Functions.ttcn, line 491 */
if (!found) break;
current_location.update_lineno(493);
/* TCCConversion_Functions.ttcn, line 493 */
startIndex = f__strstr(str, begin__token, startIndex);
current_location.update_lineno(494);
/* TCCConversion_Functions.ttcn, line 494 */
if ((startIndex > -1)) {
current_location.update_lineno(497);
/* TCCConversion_Functions.ttcn, line 497 */
{
INTEGER tmp_17;
tmp_17 = (startIndex + begin__token.lengthof());
startIndex = tmp_17;
}
current_location.update_lineno(499);
/* TCCConversion_Functions.ttcn, line 499 */
if ((end__token.lengthof() == 0)) {
current_location.update_lineno(500);
/* TCCConversion_Functions.ttcn, line 500 */
endIndex = str.lengthof();
}
else {
current_location.update_lineno(502);
/* TCCConversion_Functions.ttcn, line 502 */
endIndex = f__strstr(str, end__token, startIndex);
}
current_location.update_lineno(505);
/* TCCConversion_Functions.ttcn, line 505 */
if ((endIndex > -1)) {
current_location.update_lineno(506);
/* TCCConversion_Functions.ttcn, line 506 */
result[result.size_of()] = substr(str, startIndex, (endIndex - startIndex));
current_location.update_lineno(507);
/* TCCConversion_Functions.ttcn, line 507 */
startIndex = (endIndex + end__token.lengthof());
}
else {
current_location.update_lineno(509);
/* TCCConversion_Functions.ttcn, line 509 */
found = FALSE;
}
}
else {
current_location.update_lineno(513);
/* TCCConversion_Functions.ttcn, line 513 */
found = FALSE;
}
}
current_location.update_lineno(517);
/* TCCConversion_Functions.ttcn, line 517 */
return result;
}

TCC__Conversion__ch__list f__substr__all__tokens__oct(const OCTETSTRING& str, const OCTETSTRING& begin__token, const OCTETSTRING& end__token)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 553, TTCN_Location::LOCATION_FUNCTION, "f_substr_all_tokens_oct");
current_location.update_lineno(557);
/* TCCConversion_Functions.ttcn, line 557 */
TCC__Conversion__ch__list result(NULL_VALUE);
current_location.update_lineno(558);
/* TCCConversion_Functions.ttcn, line 558 */
OCTETSTRING token(os_0);
current_location.update_lineno(559);
/* TCCConversion_Functions.ttcn, line 559 */
INTEGER startIndex(0);
current_location.update_lineno(560);
/* TCCConversion_Functions.ttcn, line 560 */
INTEGER endIndex(0);
current_location.update_lineno(561);
/* TCCConversion_Functions.ttcn, line 561 */
BOOLEAN found(TRUE);
for ( ; ; ) {
current_location.update_lineno(562);
/* TCCConversion_Functions.ttcn, line 562 */
if (!found) break;
current_location.update_lineno(564);
/* TCCConversion_Functions.ttcn, line 564 */
startIndex = f__strstr__oct(str, begin__token, startIndex);
current_location.update_lineno(565);
/* TCCConversion_Functions.ttcn, line 565 */
if ((startIndex > -1)) {
current_location.update_lineno(567);
/* TCCConversion_Functions.ttcn, line 567 */
{
INTEGER tmp_25;
tmp_25 = (startIndex + begin__token.lengthof());
startIndex = tmp_25;
}
current_location.update_lineno(568);
/* TCCConversion_Functions.ttcn, line 568 */
endIndex = f__strstr__oct(str, end__token, startIndex);
current_location.update_lineno(570);
/* TCCConversion_Functions.ttcn, line 570 */
if ((endIndex > -1)) {
current_location.update_lineno(571);
/* TCCConversion_Functions.ttcn, line 571 */
token = substr(str, startIndex, (endIndex - startIndex));
current_location.update_lineno(572);
/* TCCConversion_Functions.ttcn, line 572 */
{
boolean tmp_30;
{
CHARSTRING tmp_28;
BOOLEAN tmp_29 = f__oct2char__safe(token, tmp_28);
if (tmp_28.is_bound()) result[result.size_of()] = tmp_28;
tmp_30 = (!(tmp_29));
}
if (tmp_30) {
current_location.update_lineno(573);
/* TCCConversion_Functions.ttcn, line 573 */
return NULL_VALUE;
}
}
current_location.update_lineno(575);
/* TCCConversion_Functions.ttcn, line 575 */
startIndex = (endIndex + end__token.lengthof());
}
else {
current_location.update_lineno(577);
/* TCCConversion_Functions.ttcn, line 577 */
found = FALSE;
}
}
else {
current_location.update_lineno(581);
/* TCCConversion_Functions.ttcn, line 581 */
found = FALSE;
}
}
current_location.update_lineno(585);
/* TCCConversion_Functions.ttcn, line 585 */
return result;
}

OCTETSTRING f__OctetIpv4(const CHARSTRING& pl__ip)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 665, TTCN_Location::LOCATION_FUNCTION, "f_OctetIpv4");
current_location.update_lineno(666);
/* TCCConversion_Functions.ttcn, line 666 */
return f__convertIPAddrToBinary(pl__ip);
}

CHARSTRING f__IPv6CreateLiteral(const CHARSTRING& pl__ip)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 757, TTCN_Location::LOCATION_FUNCTION, "f_IPv6CreateLiteral");
current_location.update_lineno(762);
/* TCCConversion_Functions.ttcn, line 762 */
CHARSTRING vl__ipAddress(pl__ip);
current_location.update_lineno(763);
/* TCCConversion_Functions.ttcn, line 763 */
if ((const_cast< const CHARSTRING&>(vl__ipAddress)[0] != cs_1)) {
{
current_location.update_lineno(767);
/* TCCConversion_Functions.ttcn, line 767 */
INTEGER i(0);
current_location.update_lineno(767);
/* TCCConversion_Functions.ttcn, line 767 */
for ( ; ; ) {
current_location.update_lineno(767);
/* TCCConversion_Functions.ttcn, line 767 */
if (!(i < 5)) break;
current_location.update_lineno(769);
/* TCCConversion_Functions.ttcn, line 769 */
if ((const_cast< const CHARSTRING&>(vl__ipAddress)[i] == cs_2)) {
current_location.update_lineno(771);
/* TCCConversion_Functions.ttcn, line 771 */
{
CHARSTRING tmp_34;
tmp_34 = ((cs_1 + vl__ipAddress) + cs_3);
vl__ipAddress = tmp_34;
}
current_location.update_lineno(772);
/* TCCConversion_Functions.ttcn, line 772 */
break;
}
current_location.update_lineno(767);
/* TCCConversion_Functions.ttcn, line 767 */
{
INTEGER tmp_35;
++i;
}
}
}
}
current_location.update_lineno(777);
/* TCCConversion_Functions.ttcn, line 777 */
return vl__ipAddress;
}

BOOLEAN f__isWhiteSpace(const CHARSTRING& pl__str)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 824, TTCN_Location::LOCATION_FUNCTION, "f_isWhiteSpace");
current_location.update_lineno(825);
/* TCCConversion_Functions.ttcn, line 825 */
INTEGER vl__size(pl__str.lengthof());
current_location.update_lineno(826);
/* TCCConversion_Functions.ttcn, line 826 */
if ((vl__size == 0)) {
current_location.update_lineno(827);
/* TCCConversion_Functions.ttcn, line 827 */
return FALSE;
}
{
current_location.update_lineno(830);
/* TCCConversion_Functions.ttcn, line 830 */
INTEGER j(0);
current_location.update_lineno(830);
/* TCCConversion_Functions.ttcn, line 830 */
for ( ; ; ) {
current_location.update_lineno(830);
/* TCCConversion_Functions.ttcn, line 830 */
if (!(j < vl__size)) break;
{
const CHARSTRING &tmp_37 = const_cast< const CHARSTRING&>(pl__str)[j];
current_location.update_lineno(832);
/* TCCConversion_Functions.ttcn, line 832 */
if(tmp_37 == cs_4) goto tmp_36_0;
current_location.update_lineno(833);
/* TCCConversion_Functions.ttcn, line 833 */
if(tmp_37 == cs_5) goto tmp_36_1;
current_location.update_lineno(834);
/* TCCConversion_Functions.ttcn, line 834 */
if(tmp_37 == cs_6) goto tmp_36_2;
current_location.update_lineno(835);
/* TCCConversion_Functions.ttcn, line 835 */
if(tmp_37 == cs_7) goto tmp_36_3;
goto tmp_36_4;
tmp_36_0:
{
goto tmp_36_end;
}
tmp_36_1:
{
goto tmp_36_end;
}
tmp_36_2:
{
goto tmp_36_end;
}
tmp_36_3:
{
goto tmp_36_end;
}
tmp_36_4:
{
current_location.update_lineno(836);
/* TCCConversion_Functions.ttcn, line 836 */
return FALSE;
}
tmp_36_end: /* empty */;
}
current_location.update_lineno(830);
/* TCCConversion_Functions.ttcn, line 830 */
{
INTEGER tmp_38;
++j;
}
}
}
current_location.update_lineno(839);
/* TCCConversion_Functions.ttcn, line 839 */
return TRUE;
}

CHARSTRING f__stripWhitespaces(const CHARSTRING& pl__str)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 862, TTCN_Location::LOCATION_FUNCTION, "f_stripWhitespaces");
current_location.update_lineno(863);
/* TCCConversion_Functions.ttcn, line 863 */
INTEGER vl__begin(0);
current_location.update_lineno(863);
/* TCCConversion_Functions.ttcn, line 863 */
INTEGER vl__end(pl__str.lengthof());
for ( ; ; ) {
current_location.update_lineno(864);
/* TCCConversion_Functions.ttcn, line 864 */
{
boolean tmp_39;
tmp_39 = (vl__begin < vl__end);
if (tmp_39) tmp_39 = f__isWhiteSpace(const_cast< const CHARSTRING&>(pl__str)[vl__begin]);
if (!tmp_39) break;
}
current_location.update_lineno(864);
/* TCCConversion_Functions.ttcn, line 864 */
{
INTEGER tmp_40;
++vl__begin;
}
}
for ( ; ; ) {
current_location.update_lineno(865);
/* TCCConversion_Functions.ttcn, line 865 */
{
boolean tmp_41;
tmp_41 = ((vl__end - 1) >= vl__begin);
if (tmp_41) tmp_41 = f__isWhiteSpace(const_cast< const CHARSTRING&>(pl__str)[(vl__end - 1)]);
if (!tmp_41) break;
}
current_location.update_lineno(865);
/* TCCConversion_Functions.ttcn, line 865 */
{
INTEGER tmp_42;
--vl__end;
}
}
current_location.update_lineno(866);
/* TCCConversion_Functions.ttcn, line 866 */
return substr(pl__str, vl__begin, (vl__end - vl__begin));
}

BOOLEAN f__isInteger(const CHARSTRING& pl__str)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 889, TTCN_Location::LOCATION_FUNCTION, "f_isInteger");
{
current_location.update_lineno(891);
/* TCCConversion_Functions.ttcn, line 891 */
INTEGER vl__i(0);
current_location.update_lineno(891);
/* TCCConversion_Functions.ttcn, line 891 */
for ( ; ; ) {
current_location.update_lineno(891);
/* TCCConversion_Functions.ttcn, line 891 */
if (!(vl__i < pl__str.lengthof())) break;
current_location.update_lineno(892);
/* TCCConversion_Functions.ttcn, line 892 */
{
boolean tmp_43;
tmp_43 = (char2int(const_cast< const CHARSTRING&>(pl__str)[vl__i]) < 48);
if (!tmp_43) tmp_43 = (char2int(const_cast< const CHARSTRING&>(pl__str)[vl__i]) > 57);
if (tmp_43) {
current_location.update_lineno(892);
/* TCCConversion_Functions.ttcn, line 892 */
return FALSE;
}
}
current_location.update_lineno(891);
/* TCCConversion_Functions.ttcn, line 891 */
{
INTEGER tmp_44;
++vl__i;
}
}
}
current_location.update_lineno(894);
/* TCCConversion_Functions.ttcn, line 894 */
if ((pl__str.lengthof() == 0)) {
current_location.update_lineno(894);
/* TCCConversion_Functions.ttcn, line 894 */
return FALSE;
}
current_location.update_lineno(895);
/* TCCConversion_Functions.ttcn, line 895 */
return TRUE;
}

INTEGER f__str2int(const CHARSTRING& pl__str)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 919, TTCN_Location::LOCATION_FUNCTION, "f_str2int");
current_location.update_lineno(920);
/* TCCConversion_Functions.ttcn, line 920 */
INTEGER vl__zeros(0);
for ( ; ; ) {
current_location.update_lineno(922);
/* TCCConversion_Functions.ttcn, line 922 */
{
boolean tmp_45;
tmp_45 = (vl__zeros < pl__str.lengthof());
if (tmp_45) tmp_45 = (const_cast< const CHARSTRING&>(pl__str)[vl__zeros] == cs_8);
if (!tmp_45) break;
}
current_location.update_lineno(922);
/* TCCConversion_Functions.ttcn, line 922 */
{
INTEGER tmp_46;
++vl__zeros;
}
}
current_location.update_lineno(923);
/* TCCConversion_Functions.ttcn, line 923 */
if ((vl__zeros == pl__str.lengthof())) {
current_location.update_lineno(923);
/* TCCConversion_Functions.ttcn, line 923 */
return 0;
}
current_location.update_lineno(924);
/* TCCConversion_Functions.ttcn, line 924 */
return str2int(substr(pl__str, vl__zeros, (pl__str.lengthof() - vl__zeros)));
}

BOOLEAN f__prePadString(const CHARSTRING& pl__string, const CHARSTRING& pl__pad, const INTEGER& pl__length, CHARSTRING& pl__result)
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 955, TTCN_Location::LOCATION_FUNCTION, "f_prePadString");
current_location.update_lineno(958);
/* TCCConversion_Functions.ttcn, line 958 */
if ((pl__length < pl__string.lengthof())) {
current_location.update_lineno(959);
/* TCCConversion_Functions.ttcn, line 959 */
return FALSE;
}
current_location.update_lineno(961);
/* TCCConversion_Functions.ttcn, line 961 */
pl__result = cs_0;
{
current_location.update_lineno(962);
/* TCCConversion_Functions.ttcn, line 962 */
INTEGER vl__i(0);
current_location.update_lineno(962);
/* TCCConversion_Functions.ttcn, line 962 */
for ( ; ; ) {
current_location.update_lineno(962);
/* TCCConversion_Functions.ttcn, line 962 */
if (!(vl__i < (pl__length - pl__string.lengthof()))) break;
current_location.update_lineno(963);
/* TCCConversion_Functions.ttcn, line 963 */
{
CHARSTRING tmp_48;
tmp_48 = (pl__result + const_cast< const CHARSTRING&>(pl__pad)[0]);
pl__result = tmp_48;
}
current_location.update_lineno(962);
/* TCCConversion_Functions.ttcn, line 962 */
{
INTEGER tmp_49;
++vl__i;
}
}
}
current_location.update_lineno(965);
/* TCCConversion_Functions.ttcn, line 965 */
{
CHARSTRING tmp_50;
tmp_50 = (pl__result + pl__string);
pl__result = tmp_50;
}
current_location.update_lineno(966);
/* TCCConversion_Functions.ttcn, line 966 */
return TRUE;
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "TCCConversion_Functions");
module_object.add_function("f_putInLowercase", (genericfunc_t)&f__putInLowercase, NULL);
module_object.add_function("f_putInUppercase", (genericfunc_t)&f__putInUppercase, NULL);
module_object.add_function("f_unichar2charstr", (genericfunc_t)&f__unichar2charstr, NULL);
module_object.add_function("f_charstr2unichar", (genericfunc_t)&f__charstr2unichar, NULL);
module_object.add_function("f_replaceFirstOccurenceOfSubstring", (genericfunc_t)&f__replaceFirstOccurenceOfSubstring, NULL);
module_object.add_function("f_replaceEveryOccurenceOfSubstring", (genericfunc_t)&f__replaceEveryOccurenceOfSubstring, NULL);
module_object.add_function("f_replaceFirstOccurenceOfPattern", (genericfunc_t)&f__replaceFirstOccurenceOfPattern, NULL);
module_object.add_function("f_replaceEveryOccurenceOfPattern", (genericfunc_t)&f__replaceEveryOccurenceOfPattern, NULL);
module_object.add_function("f_addOctetstring", (genericfunc_t)&f__addOctetstring, NULL);
module_object.add_function("f_subOctetstring", (genericfunc_t)&f__subOctetstring, NULL);
module_object.add_function("f_compOctetstring", (genericfunc_t)&f__compOctetstring, NULL);
module_object.add_function("f_substr_token", (genericfunc_t)&f__substr__token, NULL);
module_object.add_function("f_substr_token_oct", (genericfunc_t)&f__substr__token__oct, NULL);
module_object.add_function("f_substr_all_tokens", (genericfunc_t)&f__substr__all__tokens, NULL);
current_location.update_lineno(552);
/* TCCConversion_Functions.ttcn, line 552 */
const_TCC__Converion__ch__empty__list = NULL_VALUE;
module_object.add_function("f_substr_all_tokens_oct", (genericfunc_t)&f__substr__all__tokens__oct, NULL);
module_object.add_function("f_strstr", (genericfunc_t)&f__strstr, NULL);
module_object.add_function("f_strstr_oct", (genericfunc_t)&f__strstr__oct, NULL);
module_object.add_function("f_OctetIpv4", (genericfunc_t)&f__OctetIpv4, NULL);
module_object.add_function("f_convertIPAddrToBinary", (genericfunc_t)&f__convertIPAddrToBinary, NULL);
module_object.add_function("f_convertBinaryToIPAddr", (genericfunc_t)&f__convertBinaryToIPAddr, NULL);
module_object.add_function("f_oct2char_safe", (genericfunc_t)&f__oct2char__safe, NULL);
module_object.add_function("f_IPv6CreateLiteral", (genericfunc_t)&f__IPv6CreateLiteral, NULL);
module_object.add_function("f_isNumber", (genericfunc_t)&f__isNumber, NULL);
module_object.add_function("f_isWhiteSpace", (genericfunc_t)&f__isWhiteSpace, NULL);
module_object.add_function("f_stripWhitespaces", (genericfunc_t)&f__stripWhitespaces, NULL);
module_object.add_function("f_isInteger", (genericfunc_t)&f__isInteger, NULL);
module_object.add_function("f_str2int", (genericfunc_t)&f__str2int, NULL);
module_object.add_function("f_prePadString", (genericfunc_t)&f__prePadString, NULL);
}

void post_init_module()
{
TTCN_Location current_location("TCCConversion_Functions.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "TCCConversion_Functions");
current_location.update_lineno(614);
/* TCCConversion_Functions.ttcn, line 614 */
const_f__strstr_offset_defval = 0;
current_location.update_lineno(643);
/* TCCConversion_Functions.ttcn, line 643 */
const_f__strstr__oct_offset_defval = 0;
}


} /* end of namespace */
