Skip to content
Snippets Groups Projects
Commit 11f6a2f2 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

template for corpus2 wrappers

parent 19fce2a7
Branches
No related merge requests found
#!/bin/bash -x
if [ ${#} -eq 0 ]
then
echo "Usage: $0 corpus2class"
exit 1
fi
UPPER=`echo ${1} | tr '[:lower:]' '[:upper:]'`
LOWER=`echo ${1} | tr '[:upper:]' '[:lower:]'`
CLNAM=${1}
OUTFILE=libcorpus${LOWER}.i
cat swig_template_corpus2.template | sed s/TEMPLATE/${UPPER}/g | sed s/Template/${CLNAM}/g | sed s/template/${LOWER}/g > ${OUTFILE}
echo -e "\e[1;32m${OUTFILE} was generated. Don't forget to add ${OUTFILE} to Makefile (or CMake)!\e[0m"
#ifndef SWIG_LIBCORPUS2_TEMPLATE_I
#define SWIG_LIBCORPUS2_TEMPLATE_I
%module libcorpustemplate
%{
// Add includes here...
// #include <...>
%}
// %include "...i"
namespace Corpus2 {
class Template {
public:
Template();
/* --------------------------------------------------------------------- */
~Template();
};
}
using namespace std;
using namespace Corpus2;
#endif /* SWIG_LIBCORPUS2_TEMPLATE_I */
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment