{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module OGDF.FMMMLayout.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import OGDF.FMMMLayout.RawType
import STD.Deletable.Interface
import OGDF.LayoutModule.Interface

class (IDeletable a, ILayoutModule a) => IFMMMLayout a where

upcastFMMMLayout ::
                 forall a . (FPtr a, IFMMMLayout a) => a -> FMMMLayout
upcastFMMMLayout h
  = let fh = get_fptr h
        fh2 :: Ptr RawFMMMLayout = castPtr fh
      in cast_fptr_to_obj fh2

downcastFMMMLayout ::
                   forall a . (FPtr a, IFMMMLayout a) => FMMMLayout -> a
downcastFMMMLayout h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2
