packages feed

casadi-bindings-1.9.0.0: Casadi/Wrappers/Classes/FixedStepIntegrator.hs

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

module Casadi.Wrappers.Classes.FixedStepIntegrator
       (
         FixedStepIntegrator,
         FixedStepIntegratorClass(..),
         fixedStepIntegrator,
         fixedStepIntegrator_checkNode,
       ) where


import Prelude hiding ( Functor )

import Data.Vector ( Vector )
import Foreign.C.Types
import Foreign.Ptr ( Ptr )
import Foreign.ForeignPtr ( newForeignPtr )
import System.IO.Unsafe ( unsafePerformIO ) -- for show instances

import Casadi.Wrappers.Classes.PrintableObject
import Casadi.Wrappers.CToolsInstances ( )
import Casadi.Wrappers.Data
import Casadi.Wrappers.Enums
import Casadi.MarshalTypes ( CppVec, StdString' ) -- StdOstream'
import Casadi.Marshal ( Marshal(..), withMarshal )
import Casadi.WrapReturn ( WrapReturn(..) )

instance Show FixedStepIntegrator where
  show = unsafePerformIO . printableObject_getDescription
-- direct wrapper
foreign import ccall unsafe "CasADi__FixedStepIntegrator__checkNode" c_CasADi__FixedStepIntegrator__checkNode
  :: Ptr FixedStepIntegrator' -> IO CInt
casADi__FixedStepIntegrator__checkNode
  :: FixedStepIntegrator -> IO Bool
casADi__FixedStepIntegrator__checkNode x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__FixedStepIntegrator__checkNode x0' >>= wrapReturn

-- classy wrapper
{-|
>Check if the node is pointing to the right type of object.
-}
fixedStepIntegrator_checkNode :: FixedStepIntegratorClass a => a -> IO Bool
fixedStepIntegrator_checkNode x = casADi__FixedStepIntegrator__checkNode (castFixedStepIntegrator x)


-- direct wrapper
foreign import ccall unsafe "CasADi__FixedStepIntegrator__FixedStepIntegrator" c_CasADi__FixedStepIntegrator__FixedStepIntegrator
  :: IO (Ptr FixedStepIntegrator')
casADi__FixedStepIntegrator__FixedStepIntegrator
  :: IO FixedStepIntegrator
casADi__FixedStepIntegrator__FixedStepIntegrator  =
  c_CasADi__FixedStepIntegrator__FixedStepIntegrator  >>= wrapReturn

-- classy wrapper
{-|
>Default constructor.
-}
fixedStepIntegrator :: IO FixedStepIntegrator
fixedStepIntegrator = casADi__FixedStepIntegrator__FixedStepIntegrator