{-# LINE 1 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
{-# LANGUAGE CPP #-}

module Database.EJDB2.Bindings.Types.EJDBDoc where

import           Foreign
import           Foreign.C.Types

import           Database.EJDB2.Bindings.JBL



data EJDBDoc = EJDBDoc { id :: !CIntMax
                       , raw :: !JBL
                       , node :: !JBLNode
                       , next :: !(Ptr EJDBDoc)
                       , prev :: !(Ptr EJDBDoc) }

instance Storable EJDBDoc where
        sizeOf _ = (40)
{-# LINE 20 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
        alignment _ = 8
{-# LINE 21 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
        peek ptr = do
           id <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 23 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           raw <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 24 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           node <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 25 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           next <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 26 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           prev <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 27 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           return $ EJDBDoc id raw node next prev
        poke ptr (EJDBDoc id raw node next prev) = do
           (\hsc_ptr -> pokeByteOff hsc_ptr 0) ptr id
{-# LINE 30 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr raw
{-# LINE 31 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr node
{-# LINE 32 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr next
{-# LINE 33 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}
           (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr prev
{-# LINE 34 "src/Database/EJDB2/Bindings/Types/EJDBDoc.hsc" #-}