packages feed

casadi-bindings-1.9.0.0: Casadi/Wrappers/Classes/LPStructure.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.LPStructure
       (
         LPStructure,
         LPStructureClass(..),
         lpStructure,
       ) 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 LPStructure where
  show = unsafePerformIO . printableObject_getDescription
-- direct wrapper
foreign import ccall unsafe "CasADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure" c_CasADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure
  :: Ptr (CppVec (Ptr Sparsity')) -> IO (Ptr LPStructure')
casADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure
  :: Vector Sparsity -> IO LPStructure
casADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure x0' >>= wrapReturn

-- classy wrapper
{-|
>[INTERNAL] 
-}
lpStructure :: Vector Sparsity -> IO LPStructure
lpStructure = casADi__LPStructIOSchemeVector_CasADi__Sparsity___LPStructure