{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# Language ForeignFunctionInterface #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} module Casadi.Wrappers.Classes.IndexList ( IndexList, IndexListClass(..), indexList, indexList', indexList'', indexList''', indexList_getAll, ) 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.CToolsInstances ( ) import Casadi.Wrappers.Data import Casadi.Wrappers.Enums import Casadi.MarshalTypes ( CppVec, StdString' ) -- StdOstream' import Casadi.Marshal ( Marshal(..), withMarshal ) import Casadi.WrapReturn ( WrapReturn(..) ) -- direct wrapper foreign import ccall unsafe "CasADi__IndexList__getAll" c_CasADi__IndexList__getAll :: Ptr IndexList' -> CInt -> IO (Ptr (CppVec CInt)) casADi__IndexList__getAll :: IndexList -> Int -> IO (Vector Int) casADi__IndexList__getAll x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__IndexList__getAll x0' x1' >>= wrapReturn -- classy wrapper {-| >[INTERNAL] Get a vector >of indices. -} indexList_getAll :: IndexListClass a => a -> Int -> IO (Vector Int) indexList_getAll x = casADi__IndexList__getAll (castIndexList x) -- direct wrapper foreign import ccall unsafe "CasADi__IndexList__IndexList" c_CasADi__IndexList__IndexList :: IO (Ptr IndexList') casADi__IndexList__IndexList :: IO IndexList casADi__IndexList__IndexList = c_CasADi__IndexList__IndexList >>= wrapReturn -- classy wrapper {-| >> CasADi::IndexList::IndexList() >------------------------------------------------------------------------ >[INTERNAL] >Constructor. > >> CasADi::IndexList::IndexList(int i) > >> CasADi::IndexList::IndexList(const std::vector< int > &i) > >> CasADi::IndexList::IndexList(const Slice &i) >------------------------------------------------------------------------ >[INTERNAL] -} indexList :: IO IndexList indexList = casADi__IndexList__IndexList -- direct wrapper foreign import ccall unsafe "CasADi__IndexList__IndexList_TIC" c_CasADi__IndexList__IndexList_TIC :: CInt -> IO (Ptr IndexList') casADi__IndexList__IndexList' :: Int -> IO IndexList casADi__IndexList__IndexList' x0 = withMarshal x0 $ \x0' -> c_CasADi__IndexList__IndexList_TIC x0' >>= wrapReturn -- classy wrapper indexList' :: Int -> IO IndexList indexList' = casADi__IndexList__IndexList' -- direct wrapper foreign import ccall unsafe "CasADi__IndexList__IndexList_TIC_TIC" c_CasADi__IndexList__IndexList_TIC_TIC :: Ptr (CppVec CInt) -> IO (Ptr IndexList') casADi__IndexList__IndexList'' :: Vector Int -> IO IndexList casADi__IndexList__IndexList'' x0 = withMarshal x0 $ \x0' -> c_CasADi__IndexList__IndexList_TIC_TIC x0' >>= wrapReturn -- classy wrapper indexList'' :: Vector Int -> IO IndexList indexList'' = casADi__IndexList__IndexList'' -- direct wrapper foreign import ccall unsafe "CasADi__IndexList__IndexList_TIC_TIC_TIC" c_CasADi__IndexList__IndexList_TIC_TIC_TIC :: Ptr Slice' -> IO (Ptr IndexList') casADi__IndexList__IndexList''' :: Slice -> IO IndexList casADi__IndexList__IndexList''' x0 = withMarshal x0 $ \x0' -> c_CasADi__IndexList__IndexList_TIC_TIC_TIC x0' >>= wrapReturn -- classy wrapper indexList''' :: Slice -> IO IndexList indexList''' = casADi__IndexList__IndexList'''