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

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

upcastFastSimpleHierarchyLayout ::
                                forall a . (FPtr a, IFastSimpleHierarchyLayout a) =>
                                  a -> FastSimpleHierarchyLayout
upcastFastSimpleHierarchyLayout h
  = let fh = get_fptr h
        fh2 :: Ptr RawFastSimpleHierarchyLayout = castPtr fh
      in cast_fptr_to_obj fh2

downcastFastSimpleHierarchyLayout ::
                                  forall a . (FPtr a, IFastSimpleHierarchyLayout a) =>
                                    FastSimpleHierarchyLayout -> a
downcastFastSimpleHierarchyLayout h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2
