/*************** ************** * * Copyright 2012-2013 by Ames Laboratory * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2.1 as published by the Free Software Foundation. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * *************** ***************/ %pragma( java ) jniclasscode = %{ static { try { System.loadLibrary( "leaf_wrapper_powersim_jni" ); } catch( UnsatisfiedLinkError e ) { System.err.println( "Native code library failed to load. \n" + e ); System.exit( 1 ); } } %} %include %exception { try { $action } catch( std::exception const& e ) { SWIG_exception( SWIG_RuntimeError, e.what() ); } } %{ #define SWIG_JAVA_EXTRA_NATIVE_CONTAINERS %} %module leaf_wrapper_powersim %{ #include "ComAutoInit.h" #include "SimulationEngine.h" #include "SimulationProject.h" #include "SimulationComponent.h" #include "Simulation.h" #include "ModelVariable.h" #include "Value.h" #include "Dimension.h" using namespace leaf::wrapper::powersim; #include "Poco/Dynamic/Var.h" using namespace Poco; using namespace Poco::Dynamic; %} %include #define __in %include %include %include %include "SimulationEnginePtr.h" %include "SimulationProjectPtr.h" %include "SimulationComponentPtr.h" %include "SimulationPtr.h" %include "ModelVariablePtr.h" %include "ValuePtr.h" %include "DimensionPtr.h" %shared_ptr( leaf::wrapper::powersim::SimulationEngine ) %shared_ptr( leaf::wrapper::powersim::SimulationProject ) %shared_ptr( leaf::wrapper::powersim::SimulationComponent ) %shared_ptr( leaf::wrapper::powersim::Simulation ) %shared_ptr( leaf::wrapper::powersim::ModelVariable ) %shared_ptr( leaf::wrapper::powersim::Value ) %shared_ptr( leaf::wrapper::powersim::Dimension ) //In order of declaration needed %include "Poco/Config.h" %include "Poco/Platform.h" %include "Poco/Platform_WIN32.h" %include "Poco/Foundation.h" %include "Poco/Types.h" %include "Poco/Dynamic/VarHolder.h" %ignore Poco::Dynamic::operator !; %ignore Poco::Dynamic::operator !=; %ignore Poco::Dynamic::operator ==; %ignore Poco::Dynamic::operator -; %ignore Poco::Dynamic::operator --; %ignore Poco::Dynamic::operator -=; %ignore Poco::Dynamic::operator +; %ignore Poco::Dynamic::operator ++; %ignore Poco::Dynamic::operator +=; %ignore Poco::Dynamic::operator *; %ignore Poco::Dynamic::operator *=; %ignore Poco::Dynamic::operator /; %ignore Poco::Dynamic::operator /=; %ignore Poco::Dynamic::operator <; %ignore Poco::Dynamic::operator <=; %ignore Poco::Dynamic::operator >; %ignore Poco::Dynamic::operator >=; %ignore Poco::Dynamic::Var::operator ||; %ignore Poco::Dynamic::Var::operator &&; %ignore Poco::Dynamic::Var::operator !; %ignore Poco::Dynamic::Var::operator !=; %ignore Poco::Dynamic::Var::operator ==; %ignore Poco::Dynamic::Var::operator -; %ignore Poco::Dynamic::Var::operator --; %ignore Poco::Dynamic::Var::operator -=; %ignore Poco::Dynamic::Var::operator +; %ignore Poco::Dynamic::Var::operator ++; %ignore Poco::Dynamic::Var::operator +=; %ignore Poco::Dynamic::Var::operator *; %ignore Poco::Dynamic::Var::operator *=; %ignore Poco::Dynamic::Var::operator /; %ignore Poco::Dynamic::Var::operator /=; %ignore Poco::Dynamic::Var::operator <; %ignore Poco::Dynamic::Var::operator <=; %ignore Poco::Dynamic::Var::operator >; %ignore Poco::Dynamic::Var::operator >=; %ignore Poco::Dynamic::Var::operator []( int ) const; %include "Poco/Dynamic/Var.h" %template( At ) Poco::Dynamic::Var::operator []< int >; %template( Set ) Poco::Dynamic::Var::operator =< bool >; %template( Set ) Poco::Dynamic::Var::operator =< int >; %template( Set ) Poco::Dynamic::Var::operator =< double >; %template( Set ) Poco::Dynamic::Var::operator =< Poco::Dynamic::Var >; %template( ExtractBool ) Poco::Dynamic::Var::extract< bool >; %template( ExtractInt ) Poco::Dynamic::Var::extract< int >; %template( ExtractDouble ) Poco::Dynamic::Var::extract< double >; %template( ConvertBool ) Poco::Dynamic::Var::convert< bool >; %template( ConvertInt ) Poco::Dynamic::Var::convert< int >; %template( ConvertDouble ) Poco::Dynamic::Var::convert< double >; %template( ConvertString ) Poco::Dynamic::Var::convert< std::string >; %include %ignore leaf::wrapper::powersim::Dimension::Dimension( ATL::CComPtr< ::IDimension > const& ); %include "Dimension.h" %ignore leaf::wrapper::powersim::Value::Value( ATL::CComPtr< ::IValue > const& ); %include "Value.h" %ignore leaf::wrapper::powersim::ModelVariable::ModelVariable( ATL::CComPtr< ::IModelVariable > const& ); %include "ModelVariable.h" %ignore leaf::wrapper::powersim::Simulation::Simulation( ATL::CComPtr< ::ISimulation > const& ); %include "Simulation.h" %ignore leaf::wrapper::powersim::SimulationComponent::SimulationComponent( ATL::CComPtr< ::ISimulationComponent > const& ); %include "SimulationComponent.h" %ignore leaf::wrapper::powersim::SimulationProject::SimulationProject( ATL::CComPtr< ::ISimulationProject > const& ); %include "SimulationProject.h" %ignore leaf::wrapper::powersim::SimulationEngine::SimulationEngine(); %include "SimulationEngine.h" %include "ComAutoInit.h"