{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module STD.CppString.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import STD.CppString.RawType import STD.Deletable.Interface class (IDeletable a) => ICppString a where upcastCppString :: forall a . (FPtr a, ICppString a) => a -> CppString upcastCppString h = let fh = get_fptr h fh2 :: Ptr RawCppString = castPtr fh in cast_fptr_to_obj fh2 downcastCppString :: forall a . (FPtr a, ICppString a) => CppString -> a downcastCppString h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2