OGDF-1.0.0.0: src/OGDF/OptimalRanking/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module OGDF.OptimalRanking.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import OGDF.OptimalRanking.RawType
import STD.Deletable.Interface
import OGDF.RankingModule.Interface
class (IDeletable a, IRankingModule a) => IOptimalRanking a where
upcastOptimalRanking ::
forall a . (FPtr a, IOptimalRanking a) => a -> OptimalRanking
upcastOptimalRanking h
= let fh = get_fptr h
fh2 :: Ptr RawOptimalRanking = castPtr fh
in cast_fptr_to_obj fh2
downcastOptimalRanking ::
forall a . (FPtr a, IOptimalRanking a) => OptimalRanking -> a
downcastOptimalRanking h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2