{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,
  ForeignFunctionInterface, IncoherentInstances,
  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,
  TypeFamilies, TypeSynonymInstances #-}
module OGDF.Graph.Implementation where
import Data.Monoid
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import System.IO.Unsafe
import FFICXX.Runtime.Cast
import FFICXX.Runtime.CodeGen.Cxx
import FFICXX.Runtime.TH
import OGDF.Graph.RawType
import OGDF.Graph.FFI
import OGDF.Graph.Interface
import OGDF.Graph.Cast
import OGDF.Graph.RawType
import OGDF.Graph.Cast
import OGDF.Graph.Interface
import OGDF.NodeElement.RawType
import OGDF.NodeElement.Cast
import OGDF.NodeElement.Interface
import OGDF.EdgeElement.RawType
import OGDF.EdgeElement.Cast
import OGDF.EdgeElement.Interface
import STD.Deletable.RawType
import STD.Deletable.Cast
import STD.Deletable.Interface

instance () => IGraph (Graph) where

instance () => IDeletable (Graph) where
        delete :: Graph -> IO ()
delete = (Ptr RawGraph -> IO ()) -> Graph -> IO ()
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO ()
c_graph_delete

newGraph :: () => IO Graph
newGraph :: IO Graph
newGraph = IO (Ptr RawGraph) -> IO Graph
forall a ca. Castable a ca => IO ca -> IO a
xformnull IO (Ptr RawGraph)
c_graph_newgraph

graph_newNode :: () => Graph -> IO NodeElement
graph_newNode :: Graph -> IO NodeElement
graph_newNode = (Ptr RawGraph -> IO (Ptr RawNodeElement))
-> Graph -> IO NodeElement
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO (Ptr RawNodeElement)
c_graph_graph_newnode

newNode1 :: () => Graph -> CInt -> IO NodeElement
newNode1 :: Graph -> CInt -> IO NodeElement
newNode1 = (Ptr RawGraph -> CInt -> IO (Ptr RawNodeElement))
-> Graph -> CInt -> IO NodeElement
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawGraph -> CInt -> IO (Ptr RawNodeElement)
c_graph_newnode1

graph_newEdge ::
                (INodeElement c1, FPtr c1, INodeElement c0, FPtr c0) =>
                Graph -> c0 -> c1 -> IO EdgeElement
graph_newEdge :: forall c1 c0.
(INodeElement c1, FPtr c1, INodeElement c0, FPtr c0) =>
Graph -> c0 -> c1 -> IO EdgeElement
graph_newEdge = (Ptr RawGraph
 -> Ptr RawNodeElement
 -> Ptr RawNodeElement
 -> IO (Ptr RawEdgeElement))
-> Graph -> c0 -> c1 -> IO EdgeElement
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
xform2 Ptr RawGraph
-> Ptr RawNodeElement
-> Ptr RawNodeElement
-> IO (Ptr RawEdgeElement)
c_graph_graph_newedge

graph_firstNode :: () => Graph -> IO NodeElement
graph_firstNode :: Graph -> IO NodeElement
graph_firstNode = (Ptr RawGraph -> IO (Ptr RawNodeElement))
-> Graph -> IO NodeElement
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO (Ptr RawNodeElement)
c_graph_graph_firstnode

graph_lastNode :: () => Graph -> IO NodeElement
graph_lastNode :: Graph -> IO NodeElement
graph_lastNode = (Ptr RawGraph -> IO (Ptr RawNodeElement))
-> Graph -> IO NodeElement
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO (Ptr RawNodeElement)
c_graph_graph_lastnode

graph_firstEdge :: () => Graph -> IO EdgeElement
graph_firstEdge :: Graph -> IO EdgeElement
graph_firstEdge = (Ptr RawGraph -> IO (Ptr RawEdgeElement))
-> Graph -> IO EdgeElement
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO (Ptr RawEdgeElement)
c_graph_graph_firstedge

graph_lastEdge :: () => Graph -> IO EdgeElement
graph_lastEdge :: Graph -> IO EdgeElement
graph_lastEdge = (Ptr RawGraph -> IO (Ptr RawEdgeElement))
-> Graph -> IO EdgeElement
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawGraph -> IO (Ptr RawEdgeElement)
c_graph_graph_lastedge