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

class (IDeletable a, ILayerByLayerSweep a) => IMedianHeuristic a
      where

upcastMedianHeuristic ::
                      forall a . (FPtr a, IMedianHeuristic a) => a -> MedianHeuristic
upcastMedianHeuristic :: forall a. (FPtr a, IMedianHeuristic a) => a -> MedianHeuristic
upcastMedianHeuristic a
h
  = let fh :: Ptr (Raw a)
fh = a -> Ptr (Raw a)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr a
h
        Ptr RawMedianHeuristic
fh2 :: Ptr RawMedianHeuristic = Ptr (Raw a) -> Ptr RawMedianHeuristic
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw MedianHeuristic) -> MedianHeuristic
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw MedianHeuristic)
Ptr RawMedianHeuristic
fh2

downcastMedianHeuristic ::
                        forall a . (FPtr a, IMedianHeuristic a) => MedianHeuristic -> a
downcastMedianHeuristic :: forall a. (FPtr a, IMedianHeuristic a) => MedianHeuristic -> a
downcastMedianHeuristic MedianHeuristic
h
  = let fh :: Ptr (Raw MedianHeuristic)
fh = MedianHeuristic -> Ptr (Raw MedianHeuristic)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr MedianHeuristic
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawMedianHeuristic -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw MedianHeuristic)
Ptr RawMedianHeuristic
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2