packages feed

casadi-bindings-core-2.4.1.0: Casadi/Core/Classes/Simulator.hs

{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# Language ForeignFunctionInterface #-}
{-# Language FlexibleInstances #-}
{-# Language MultiParamTypeClasses #-}

module Casadi.Core.Classes.Simulator
       (
         Simulator,
         SimulatorClass(..),
         simulator__0,
         simulator__1,
         simulator__2,
         simulator__3,
         simulator__4,
       ) where


import Prelude hiding ( Functor )

import Data.Vector ( Vector )
import qualified Data.Map as M
import Foreign.C.Types
import Foreign.Marshal ( new, free )
import Foreign.Storable ( peek )
import Foreign.Ptr ( Ptr, nullPtr )
import Foreign.ForeignPtr ( newForeignPtr )
import System.IO.Unsafe ( unsafePerformIO ) -- for show instances

import Casadi.Internal.FormatException ( formatException )
import Casadi.Internal.MarshalTypes ( StdVec, StdString, StdMap, StdPair ) -- StdPair StdOstream'
import Casadi.Internal.Marshal ( Marshal(..), withMarshal )
import Casadi.Internal.WrapReturn ( WrapReturn(..) )
import Casadi.Core.Data
import Casadi.Core.Enums
-- direct wrapper
foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__0" c_casadi__Simulator__CONSTRUCTOR__0
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Integrator' -> Ptr DMatrix' -> IO (Ptr Simulator')
casadi__Simulator__CONSTRUCTOR__0
  :: String -> Integrator -> DMatrix -> IO Simulator
casadi__Simulator__CONSTRUCTOR__0 x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__Simulator__CONSTRUCTOR__0 errStrPtrP x0' x1' x2'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
simulator__0 :: String -> Integrator -> DMatrix -> IO Simulator
simulator__0 = casadi__Simulator__CONSTRUCTOR__0


-- direct wrapper
foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__1" c_casadi__Simulator__CONSTRUCTOR__1
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Integrator' -> Ptr DMatrix' -> Ptr (StdMap StdString (Ptr GenericType')) -> IO (Ptr Simulator')
casadi__Simulator__CONSTRUCTOR__1
  :: String -> Integrator -> DMatrix -> M.Map String GenericType -> IO Simulator
casadi__Simulator__CONSTRUCTOR__1 x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__Simulator__CONSTRUCTOR__1 errStrPtrP x0' x1' x2' x3'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
simulator__1 :: String -> Integrator -> DMatrix -> M.Map String GenericType -> IO Simulator
simulator__1 = casadi__Simulator__CONSTRUCTOR__1


-- direct wrapper
foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__2" c_casadi__Simulator__CONSTRUCTOR__2
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Integrator' -> Ptr Function' -> Ptr DMatrix' -> IO (Ptr Simulator')
casadi__Simulator__CONSTRUCTOR__2
  :: String -> Integrator -> Function -> DMatrix -> IO Simulator
casadi__Simulator__CONSTRUCTOR__2 x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__Simulator__CONSTRUCTOR__2 errStrPtrP x0' x1' x2' x3'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
simulator__2 :: String -> Integrator -> Function -> DMatrix -> IO Simulator
simulator__2 = casadi__Simulator__CONSTRUCTOR__2


-- direct wrapper
foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__3" c_casadi__Simulator__CONSTRUCTOR__3
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Integrator' -> Ptr Function' -> Ptr DMatrix' -> Ptr (StdMap StdString (Ptr GenericType')) -> IO (Ptr Simulator')
casadi__Simulator__CONSTRUCTOR__3
  :: String -> Integrator -> Function -> DMatrix -> M.Map String GenericType -> IO Simulator
casadi__Simulator__CONSTRUCTOR__3 x0 x1 x2 x3 x4 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  withMarshal x4 $ \x4' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__Simulator__CONSTRUCTOR__3 errStrPtrP x0' x1' x2' x3' x4'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
simulator__3 :: String -> Integrator -> Function -> DMatrix -> M.Map String GenericType -> IO Simulator
simulator__3 = casadi__Simulator__CONSTRUCTOR__3


-- direct wrapper
foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__4" c_casadi__Simulator__CONSTRUCTOR__4
  :: Ptr (Ptr StdString) -> IO (Ptr Simulator')
casadi__Simulator__CONSTRUCTOR__4
  :: IO Simulator
casadi__Simulator__CONSTRUCTOR__4  =

  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__Simulator__CONSTRUCTOR__4 errStrPtrP 
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
simulator__4 :: IO Simulator
simulator__4 = casadi__Simulator__CONSTRUCTOR__4