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

class (IDeletable a, IHierarchyLayoutModule a) =>
      IOptimalHierarchyLayout a where

upcastOptimalHierarchyLayout ::
                             forall a . (FPtr a, IOptimalHierarchyLayout a) =>
                               a -> OptimalHierarchyLayout
upcastOptimalHierarchyLayout h
  = let fh = get_fptr h
        fh2 :: Ptr RawOptimalHierarchyLayout = castPtr fh
      in cast_fptr_to_obj fh2

downcastOptimalHierarchyLayout ::
                               forall a . (FPtr a, IOptimalHierarchyLayout a) =>
                                 OptimalHierarchyLayout -> a
downcastOptimalHierarchyLayout h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2
