Files
opm-common/opm/parser/eclipse/python/c_inter/parser_c.cc
Joakim Hove 3a426cb4c9 Added simple python wrapper for Parser and Deck.
- Create a new shared library libcopmparser with small files cxxxx
   which wrap general Cxx classes with C linkage.

 - Added Python packages & modules, based on Python ctypes and the
   ert.cwrap package.
2016-01-15 16:35:09 +01:00

23 lines
407 B
C++

#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
extern "C" {
Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file) {
return parser->newDeckFromFile( file , true );
}
void * parser_alloc() {
Opm::Parser * parser = new Opm::Parser( true );
return parser;
}
void parser_free(Opm::Parser * parser) {
delete parser;
}
}