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

Wrappers for Corpus2::Corpus2Error and Corpus2::FileNotFound

parent 3c4ee371
Branches
No related merge requests found
...@@ -14,6 +14,7 @@ ANTLRLIB=/usr/lib/libantlr-pic.a ...@@ -14,6 +14,7 @@ ANTLRLIB=/usr/lib/libantlr-pic.a
CPPFLAGS=-fPIC -O2 CPPFLAGS=-fPIC -O2
CBIN=libpwrnlperror.o \ CBIN=libpwrnlperror.o \
libcorpus2exception.o \
libcorpustag.o \ libcorpustag.o \
libcorpustagset.o \ libcorpustagset.o \
libcorpustagsetmanager.o \ libcorpustagsetmanager.o \
...@@ -29,6 +30,7 @@ CBIN=libpwrnlperror.o \ ...@@ -29,6 +30,7 @@ CBIN=libpwrnlperror.o \
libcorpusannotationview.o libcorpusannotationview.o
CBINOUT=_libpwrnlperror.so \ CBINOUT=_libpwrnlperror.so \
_libcorpus2exception.so \
_boost_shared_ptr.so \ _boost_shared_ptr.so \
_libcorpustag.so \ _libcorpustag.so \
_libcorpustagset.so \ _libcorpustagset.so \
...@@ -45,6 +47,7 @@ CBINOUT=_libpwrnlperror.so \ ...@@ -45,6 +47,7 @@ CBINOUT=_libpwrnlperror.so \
_libcorpusannotationview.so _libcorpusannotationview.so
CWRAP=libpwrnlperror_wrap.cxx \ CWRAP=libpwrnlperror_wrap.cxx \
libcorpus2exception_wrap.cxx \
boost_shared_ptr_wrap.cxx \ boost_shared_ptr_wrap.cxx \
libcorpustag_wrap.cxx \ libcorpustag_wrap.cxx \
libcorpustagset_wrap.cxx \ libcorpustagset_wrap.cxx \
...@@ -61,6 +64,7 @@ CWRAP=libpwrnlperror_wrap.cxx \ ...@@ -61,6 +64,7 @@ CWRAP=libpwrnlperror_wrap.cxx \
libcorpusannotationview_wrap.cxx libcorpusannotationview_wrap.cxx
CWRAPBIN=libpwrnlperror_wrap.o \ CWRAPBIN=libpwrnlperror_wrap.o \
libcorpus2exception_wrap.o \
boost_shared_ptr_wrap.o \ boost_shared_ptr_wrap.o \
libcorpustag_wrap.o \ libcorpustag_wrap.o \
libcorpustagset_wrap.o \ libcorpustagset_wrap.o \
...@@ -77,6 +81,7 @@ CWRAPBIN=libpwrnlperror_wrap.o \ ...@@ -77,6 +81,7 @@ CWRAPBIN=libpwrnlperror_wrap.o \
libcorpusannotationview_wrap.o libcorpusannotationview_wrap.o
PYMODULES=libpwrnlperror.py \ PYMODULES=libpwrnlperror.py \
libcorpus2exception.py \
boost_shared_ptr.py \ boost_shared_ptr.py \
libcorpustag.py \ libcorpustag.py \
libcorpustagset.py \ libcorpustagset.py \
...@@ -93,6 +98,7 @@ PYMODULES=libpwrnlperror.py \ ...@@ -93,6 +98,7 @@ PYMODULES=libpwrnlperror.py \
libcorpusannotationview.py libcorpusannotationview.py
PYCBIN=libpwrnlperror.pyc \ PYCBIN=libpwrnlperror.pyc \
libcorpus2exception.pyc \
boost_shared_ptr.pyc \ boost_shared_ptr.pyc \
libcorpustag.pyc \ libcorpustag.pyc \
libcorpustagset.pyc \ libcorpustagset.pyc \
...@@ -134,6 +140,13 @@ libpwrnlperror.o: ...@@ -134,6 +140,13 @@ libpwrnlperror.o:
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Corpus2 Wrappers # Corpus2 Wrappers
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
libcorpus2exception.o:
$(SWIG) $(SWIGOPTS_LANG) libcorpus2exception.i
$(CPP) -c libcorpus2exception_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS)
$(CPP) -shared libcorpus2exception_wrap.o \
$(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpus2exception.so
# Tag # Tag
libcorpustag.o: libcorpustag.o:
$(SWIG) $(SWIGOPTS_LANG) libcorpustag.i $(SWIG) $(SWIGOPTS_LANG) libcorpustag.i
......
#ifndef SWIG_LIBCORPUS2_EXCEPTION_I
#define SWIG_LIBCORPUS2_EXCEPTION_I
%module libcorpus2exception
%{
#include <libcorpus2/exception.h>
%}
%include "std_string.i"
%include "libpwrnlperror.i"
namespace Corpus2 {
class Corpus2Error : public PwrNlp::PwrNlpError {
public:
Corpus2Error(const std::string &what);
~Corpus2Error() throw();
/* --------------------------------------------------------------------- */
std::string scope() const;
};
class FileNotFound : public Corpus2Error {
public:
FileNotFound(const std::string& filename, const std::string& paths,
const std::string& where);
~FileNotFound() throw();
/* --------------------------------------------------------------------- */
std::string info() const;
std::string filename, paths, where;
};
}
using namespace std;
using namespace Corpus2;
#endif /* SWIG_LIBCORPUS2_EXCEPTION_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