{-# 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 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.Core.Classes.PrintableObject import Casadi.Internal.CToolsInstances ( ) import Casadi.Internal.FormatException ( formatException ) import Casadi.Internal.MarshalTypes ( StdVec, StdString) -- StdPair StdOstream' import Casadi.Internal.Marshal ( Marshal(..), withMarshal ) import Casadi.Internal.WrapReturn ( WrapReturn(..) ) import Casadi.Core.Data import Casadi.Core.Enums instance Show Simulator where show = unsafePerformIO . printableObject_getDescription -- direct wrapper foreign import ccall unsafe "casadi__Simulator__CONSTRUCTOR__0" c_casadi__Simulator__CONSTRUCTOR__0 :: Ptr (Ptr StdString) -> Ptr Integrator' -> Ptr DMatrix' -> IO (Ptr Simulator') casadi__Simulator__CONSTRUCTOR__0 :: Integrator -> DMatrix -> IO Simulator casadi__Simulator__CONSTRUCTOR__0 x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> do errStrPtrP <- new nullPtr ret <- c_casadi__Simulator__CONSTRUCTOR__0 errStrPtrP x0' x1' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper simulator__0 :: 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 Integrator' -> Ptr (StdVec CDouble) -> IO (Ptr Simulator') casadi__Simulator__CONSTRUCTOR__1 :: Integrator -> Vector Double -> IO Simulator casadi__Simulator__CONSTRUCTOR__1 x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> do errStrPtrP <- new nullPtr ret <- c_casadi__Simulator__CONSTRUCTOR__1 errStrPtrP x0' x1' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper simulator__1 :: Integrator -> Vector Double -> 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 Integrator' -> Ptr Function' -> Ptr DMatrix' -> IO (Ptr Simulator') casadi__Simulator__CONSTRUCTOR__2 :: Integrator -> Function -> DMatrix -> IO Simulator casadi__Simulator__CONSTRUCTOR__2 x0 x1 x2 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> do errStrPtrP <- new nullPtr ret <- c_casadi__Simulator__CONSTRUCTOR__2 errStrPtrP x0' x1' x2' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper simulator__2 :: 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 Integrator' -> Ptr Function' -> Ptr (StdVec CDouble) -> IO (Ptr Simulator') casadi__Simulator__CONSTRUCTOR__3 :: Integrator -> Function -> Vector Double -> IO Simulator casadi__Simulator__CONSTRUCTOR__3 x0 x1 x2 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> do errStrPtrP <- new nullPtr ret <- c_casadi__Simulator__CONSTRUCTOR__3 errStrPtrP x0' x1' x2' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper simulator__3 :: Integrator -> Function -> Vector Double -> 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