packages feed

casadi-bindings-core-2.4.1.0: Casadi/Core/Classes/StabilizedQpSolver.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.StabilizedQpSolver
       (
         StabilizedQpSolver,
         StabilizedQpSolverClass(..),
         stabilizedQpSolver__0,
         stabilizedQpSolver__1,
         stabilizedQpSolver__2,
         stabilizedQpSolver_doc,
         stabilizedQpSolver_generateNativeCode,
         stabilizedQpSolver_hasPlugin,
         stabilizedQpSolver_loadPlugin,
       ) 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__StabilizedQpSolver__CONSTRUCTOR__0" c_casadi__StabilizedQpSolver__CONSTRUCTOR__0
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr StdString -> Ptr (StdMap StdString (Ptr Sparsity')) -> IO (Ptr StabilizedQpSolver')
casadi__StabilizedQpSolver__CONSTRUCTOR__0
  :: String -> String -> M.Map String Sparsity -> IO StabilizedQpSolver
casadi__StabilizedQpSolver__CONSTRUCTOR__0 x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__StabilizedQpSolver__CONSTRUCTOR__0 errStrPtrP x0' x1' x2'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
stabilizedQpSolver__0 :: String -> String -> M.Map String Sparsity -> IO StabilizedQpSolver
stabilizedQpSolver__0 = casadi__StabilizedQpSolver__CONSTRUCTOR__0


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__CONSTRUCTOR__1" c_casadi__StabilizedQpSolver__CONSTRUCTOR__1
  :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr StdString -> Ptr (StdMap StdString (Ptr Sparsity')) -> Ptr (StdMap StdString (Ptr GenericType')) -> IO (Ptr StabilizedQpSolver')
casadi__StabilizedQpSolver__CONSTRUCTOR__1
  :: String -> String -> M.Map String Sparsity -> M.Map String GenericType -> IO StabilizedQpSolver
casadi__StabilizedQpSolver__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__StabilizedQpSolver__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
stabilizedQpSolver__1 :: String -> String -> M.Map String Sparsity -> M.Map String GenericType -> IO StabilizedQpSolver
stabilizedQpSolver__1 = casadi__StabilizedQpSolver__CONSTRUCTOR__1


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__CONSTRUCTOR__2" c_casadi__StabilizedQpSolver__CONSTRUCTOR__2
  :: Ptr (Ptr StdString) -> IO (Ptr StabilizedQpSolver')
casadi__StabilizedQpSolver__CONSTRUCTOR__2
  :: IO StabilizedQpSolver
casadi__StabilizedQpSolver__CONSTRUCTOR__2  =

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


-- classy wrapper
stabilizedQpSolver__2 :: IO StabilizedQpSolver
stabilizedQpSolver__2 = casadi__StabilizedQpSolver__CONSTRUCTOR__2


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__doc" c_casadi__StabilizedQpSolver__doc
  :: Ptr (Ptr StdString) -> Ptr StdString -> IO (Ptr StdString)
casadi__StabilizedQpSolver__doc
  :: String -> IO String
casadi__StabilizedQpSolver__doc x0 =
  withMarshal x0 $ \x0' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__StabilizedQpSolver__doc errStrPtrP x0'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
stabilizedQpSolver_doc :: String -> IO String
stabilizedQpSolver_doc = casadi__StabilizedQpSolver__doc


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__generateNativeCode" c_casadi__StabilizedQpSolver__generateNativeCode
  :: Ptr (Ptr StdString) -> Ptr StabilizedQpSolver' -> Ptr StdString -> IO ()
casadi__StabilizedQpSolver__generateNativeCode
  :: StabilizedQpSolver -> String -> IO ()
casadi__StabilizedQpSolver__generateNativeCode x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__StabilizedQpSolver__generateNativeCode errStrPtrP x0' x1'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
stabilizedQpSolver_generateNativeCode :: StabilizedQpSolverClass a => a -> String -> IO ()
stabilizedQpSolver_generateNativeCode x = casadi__StabilizedQpSolver__generateNativeCode (castStabilizedQpSolver x)


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__hasPlugin" c_casadi__StabilizedQpSolver__hasPlugin
  :: Ptr (Ptr StdString) -> Ptr StdString -> IO CInt
casadi__StabilizedQpSolver__hasPlugin
  :: String -> IO Bool
casadi__StabilizedQpSolver__hasPlugin x0 =
  withMarshal x0 $ \x0' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__StabilizedQpSolver__hasPlugin errStrPtrP x0'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
stabilizedQpSolver_hasPlugin :: String -> IO Bool
stabilizedQpSolver_hasPlugin = casadi__StabilizedQpSolver__hasPlugin


-- direct wrapper
foreign import ccall unsafe "casadi__StabilizedQpSolver__loadPlugin" c_casadi__StabilizedQpSolver__loadPlugin
  :: Ptr (Ptr StdString) -> Ptr StdString -> IO ()
casadi__StabilizedQpSolver__loadPlugin
  :: String -> IO ()
casadi__StabilizedQpSolver__loadPlugin x0 =
  withMarshal x0 $ \x0' ->
  do
    errStrPtrP <- new nullPtr
    ret <- c_casadi__StabilizedQpSolver__loadPlugin errStrPtrP x0'
    errStrPtr <- peek errStrPtrP
    free errStrPtrP
    if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException)


-- classy wrapper
stabilizedQpSolver_loadPlugin :: String -> IO ()
stabilizedQpSolver_loadPlugin = casadi__StabilizedQpSolver__loadPlugin