<commit_before>/*****************************************************************************\
 * Copyright 2005, 2006 <NAME>, <NAME>                      *
 *                                                                           *
 * This file is part of GNU BPEL2oWFN.                                       *
 *                                                                           *
 * GNU BPEL2oWFN is free software; you can redistribute it and/or modify it  *
 * under the terms of the GNU General Public License as published by the     *
 * Free Software Foundation; either version 2 of the License, or (at your    *
 * option) any later version.                                                *
 *                                                                           *
 * GNU BPEL2oWFN is distributed in the hope that it will be useful, but      *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General  *
 * Public License for more details.                                          *
 *                                                                           *
 * You should have received a copy of the GNU General Public License along   *
 * with GNU BPEL2oWFN; see file COPYING. if not, write to the Free Software  *
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. *
\*****************************************************************************/

/*!
 * \file    helpers.h
 *
 * \brief   helper functions
 *
 * \author  <NAME> <<EMAIL>>,
 *          <NAME> <<EMAIL>>,
 *          last changes of: \$Author: nlohmann $
 * 
 * \since   2005/11/11
 *
 * \date    \$Date: 2006/12/10 17:31:16 $
 * 
 * \note    This file is part of the tool BPEL2oWFN and was created during the
 *          project "Tools4BPEL" at the Humboldt-Universitt zu Berlin. See
 *          http://www.informatik.hu-berlin.de/top/tools4bpel for details.
 *
 * \version \$Revision: 1.41 $
 *
 * \ingroup conversion
 * \ingroup debug
 */





#ifndef HELPERS_H
#define HELPERS_H





/******************************************************************************
 * Headers
 *****************************************************************************/

#include <set>
#include <string>
#include <vector>
#include "bpel2owfn.h"

#ifdef USING_BPEL2OWFN
#include "ast-config.h"		// all you need from Kimwitu++
#endif

using namespace std;





/******************************************************************************
 * Conversion and error handling functions
 *****************************************************************************/

/// converts int to string
string toString(int i);
///converts a vector to a C++ string
string toString(vector<unsigned int> &v);
#ifdef USING_BPEL2OWFN
/// converts integer to string
string toString(kc::integer i);
#endif

/// converts string to int
int toInt(string s);
/// converts string to unsigned int
unsigned int toUInt(string s);

/// returns the maximum of two unsigned ints
unsigned int max(unsigned int a, unsigned int b);

/// calls #cleanup() then exits
void error();
/// closes all open files and delete all pointers
void cleanup();

/// increases the index vector<commit_msg>+ minor change (in fact a test of the CVS notification)<commit_after>/*****************************************************************************\
 * Copyright 2005, 2006 <NAME>, <NAME>                      *
 *                                                                           *
 * This file is part of GNU BPEL2oWFN.                                       *
 *                                                                           *
 * GNU BPEL2oWFN is free software; you can redistribute it and/or modify it  *
 * under the terms of the GNU General Public License as published by the     *
 * Free Software Foundation; either version 2 of the License, or (at your    *
 * option) any later version.                                                *
 *                                                                           *
 * GNU BPEL2oWFN is distributed in the hope that it will be useful, but      *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General  *
 * Public License for more details.                                          *
 *                                                                           *
 * You should have received a copy of the GNU General Public License along   *
 * with GNU BPEL2oWFN; see file COPYING. if not, write to the Free Software  *
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. *
\*****************************************************************************/

/*!
 * \file    helpers.h
 *
 * \brief   helper functions
 *
 * \author  <NAME> <<EMAIL>>,
 *          <NAME> <<EMAIL>>,
 *          last changes of: \$Author: nielslohmann $
 * 
 * \since   2005/11/11
 *
 * \date    \$Date: 2006/12/17 00:15:07 $
 * 
 * \note    This file is part of the tool BPEL2oWFN and was created during the
 *          project "Tools4BPEL" at the Humboldt-Universitt zu Berlin. See
 *          http://www.informatik.hu-berlin.de/top/tools4bpel for details.
 *
 * \version \$Revision: 1.42 $
 *
 * \ingroup conversion
 * \ingroup debug
 */





#ifndef HELPERS_H
#define HELPERS_H





/******************************************************************************
 * Headers
 *****************************************************************************/

#include <set>
#include <string>
#include <vector>
#include "bpel2owfn.h"

#ifdef USING_BPEL2OWFN
#include "ast-config.h"		// all you need from Kimwitu++
#endif

using namespace std;





/******************************************************************************
 * Conversion and error handling functions
 *****************************************************************************/

/// converts int to string
string toString(int i);
///converts a vector to a C++ string
string toString(vector<unsigned int> &v);

#ifdef USING_BPEL2OWFN
/// converts integer to string
string toString(kc::integer i);
#endif

/// converts string to int
int toInt(string s);
/// converts string to unsigned int
unsigned int toUInt(string s);

/// returns the maximum of two unsigned ints
unsigned int max(unsigned int a, unsigned int b);

/// calls #cleanup() then exits
void error();
/// closes all open files and delete all pointers
void cleanup();

/// increases the index vector
{'fraction_non_alphanumeric': 0.21784137616075505, 'fraction_numerical': 0.016745318922210383, 'mean_word_length': 2.1405353728489485, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6291691', 'n_tokens_mistral': 1668, 'n_tokens_neox': 1496, 'n_words': 593}