Skip to content
Snippets Groups Projects
Commit 7b67d334 authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

No commit message

No commit message
parent 0ece80b0
No related branches found
No related tags found
No related merge requests found
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
########################################################
## C++ PROJECT ###
########################################################
PROJECT(PyVirtualFluids)
INCLUDE(${SOURCE_ROOT}/lib/IncludsList.txt)
#################################################################
### LOCAL FILES ###
#################################################################
FILE(GLOB SPECIFIC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp )
SET(ALL_SOURCES ${ALL_SOURCES} ${SPECIFIC_FILES})
SOURCE_GROUP(src FILES ${SPECIFIC_FILES})
SET(CAB_ADDITIONAL_LINK_LIBRARIES vfluids)
#################################################################
### CREATE PROJECT ###
#################################################################
CREATE_CAB_PROJECT(virtualfluids SHARED)
#ifdef VF_PYTHON
#include <boost/python.hpp>
#include "vfluids.h"
using namespace boost::python;
BOOST_PYTHON_MODULE(virtualfluids)
{
//bool (Configuration::*get1)(const std::string&, std::string&)const = &Configuration::get;
//bool (Configuration::*get2)(const std::string&, int&)const = &Configuration::get;
//bool (Configuration::*get3)(const std::string&, long&)const = &Configuration::get;
//bool (Configuration::*get4)(const std::string&, double&)const = &Configuration::get;
//bool (Configuration::*get5)(const std::string&, bool&)const = &Configuration::get;
//class_<Configuration>("Configuration")
// .def("load", &Configuration::load)
// .def("get", get1)
// .def("get", get2)
// .def("get", get3)
// .def("get", get4)
// .def("get", get5)
// ;
class_<Configuration>("Configuration")
.def("load", &Configuration::load)
.def("getString", &Configuration::getString)
.def("getInt", &Configuration::getInt)
.def("getLong", &Configuration::getLong)
.def("getDouble", &Configuration::getDouble)
.def("getFloat", &Configuration::getFloat)
.def("getBool", &Configuration::getBool)
;
}
#endif
import virtualfluids
config=virtualfluids.load("config.txt")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment