module FFICXX.Generate.Type.Module where
import FFICXX.Generate.Type.Cabal (AddCInc, AddCSrc)
import FFICXX.Generate.Type.Class (Class, TemplateClass, TopLevel)
import FFICXX.Runtime.CodeGen.Cxx (HeaderName (..), Namespace (..))
data =
{ ClassImportHeader -> Class
cihClass :: Class,
:: HeaderName,
ClassImportHeader -> [Namespace]
cihNamespace :: [Namespace],
ClassImportHeader -> String
cihSelfCpp :: String,
ClassImportHeader -> [Either TemplateClass Class]
cihImportedClasses :: [Either TemplateClass Class],
:: [HeaderName],
:: [HeaderName],
:: [HeaderName]
}
deriving (Int -> ClassImportHeader -> ShowS
[ClassImportHeader] -> ShowS
ClassImportHeader -> String
(Int -> ClassImportHeader -> ShowS)
-> (ClassImportHeader -> String)
-> ([ClassImportHeader] -> ShowS)
-> Show ClassImportHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClassImportHeader -> ShowS
showsPrec :: Int -> ClassImportHeader -> ShowS
$cshow :: ClassImportHeader -> String
show :: ClassImportHeader -> String
$cshowList :: [ClassImportHeader] -> ShowS
showList :: [ClassImportHeader] -> ShowS
Show)
data ClassSubmoduleType
= CSTRawType
| CSTInterface
| CSTImplementation
| CSTFFI
| CSTCast
deriving (Int -> ClassSubmoduleType -> ShowS
[ClassSubmoduleType] -> ShowS
ClassSubmoduleType -> String
(Int -> ClassSubmoduleType -> ShowS)
-> (ClassSubmoduleType -> String)
-> ([ClassSubmoduleType] -> ShowS)
-> Show ClassSubmoduleType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClassSubmoduleType -> ShowS
showsPrec :: Int -> ClassSubmoduleType -> ShowS
$cshow :: ClassSubmoduleType -> String
show :: ClassSubmoduleType -> String
$cshowList :: [ClassSubmoduleType] -> ShowS
showList :: [ClassSubmoduleType] -> ShowS
Show)
data TemplateClassSubmoduleType
= TCSTTH
| TCSTTemplate
deriving (Int -> TemplateClassSubmoduleType -> ShowS
[TemplateClassSubmoduleType] -> ShowS
TemplateClassSubmoduleType -> String
(Int -> TemplateClassSubmoduleType -> ShowS)
-> (TemplateClassSubmoduleType -> String)
-> ([TemplateClassSubmoduleType] -> ShowS)
-> Show TemplateClassSubmoduleType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateClassSubmoduleType -> ShowS
showsPrec :: Int -> TemplateClassSubmoduleType -> ShowS
$cshow :: TemplateClassSubmoduleType -> String
show :: TemplateClassSubmoduleType -> String
$cshowList :: [TemplateClassSubmoduleType] -> ShowS
showList :: [TemplateClassSubmoduleType] -> ShowS
Show)
type UClass = Either TemplateClass Class
type UClassSubmodule =
Either (TemplateClassSubmoduleType, TemplateClass) (ClassSubmoduleType, Class)
type DepCycles = [[(String, ([String], [String]))]]
data ClassModule = ClassModule
{ ClassModule -> String
cmModule :: String,
ClassModule -> ClassImportHeader
cmCIH :: ClassImportHeader,
ClassModule -> [UClassSubmodule]
cmImportedSubmodulesForInterface :: [UClassSubmodule],
ClassModule -> [UClassSubmodule]
cmImportedSubmodulesForFFI :: [UClassSubmodule],
ClassModule -> [UClassSubmodule]
cmImportedSubmodulesForCast,
ClassModule -> [UClassSubmodule]
cmImportedSubmodulesForImplementation ::
[UClassSubmodule],
:: [String]
}
deriving (Int -> ClassModule -> ShowS
[ClassModule] -> ShowS
ClassModule -> String
(Int -> ClassModule -> ShowS)
-> (ClassModule -> String)
-> ([ClassModule] -> ShowS)
-> Show ClassModule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClassModule -> ShowS
showsPrec :: Int -> ClassModule -> ShowS
$cshow :: ClassModule -> String
show :: ClassModule -> String
$cshowList :: [ClassModule] -> ShowS
showList :: [ClassModule] -> ShowS
Show)
data TemplateClassModule = TCM
{ TemplateClassModule -> String
tcmModule :: String,
TemplateClassModule -> TemplateClassImportHeader
tcmTCIH :: TemplateClassImportHeader
}
deriving (Int -> TemplateClassModule -> ShowS
[TemplateClassModule] -> ShowS
TemplateClassModule -> String
(Int -> TemplateClassModule -> ShowS)
-> (TemplateClassModule -> String)
-> ([TemplateClassModule] -> ShowS)
-> Show TemplateClassModule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateClassModule -> ShowS
showsPrec :: Int -> TemplateClassModule -> ShowS
$cshow :: TemplateClassModule -> String
show :: TemplateClassModule -> String
$cshowList :: [TemplateClassModule] -> ShowS
showList :: [TemplateClassModule] -> ShowS
Show)
data = TCIH
{ TemplateClassImportHeader -> TemplateClass
tcihTClass :: TemplateClass,
:: [HeaderName]
}
deriving (Int -> TemplateClassImportHeader -> ShowS
[TemplateClassImportHeader] -> ShowS
TemplateClassImportHeader -> String
(Int -> TemplateClassImportHeader -> ShowS)
-> (TemplateClassImportHeader -> String)
-> ([TemplateClassImportHeader] -> ShowS)
-> Show TemplateClassImportHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateClassImportHeader -> ShowS
showsPrec :: Int -> TemplateClassImportHeader -> ShowS
$cshow :: TemplateClassImportHeader -> String
show :: TemplateClassImportHeader -> String
$cshowList :: [TemplateClassImportHeader] -> ShowS
showList :: [TemplateClassImportHeader] -> ShowS
Show)
data =
{ :: String,
TopLevelImportHeader -> [ClassImportHeader]
tihClassDep :: [ClassImportHeader],
:: [Either TemplateClass Class],
TopLevelImportHeader -> [TopLevel]
tihFuncs :: [TopLevel],
TopLevelImportHeader -> [Namespace]
tihNamespaces :: [Namespace],
:: [HeaderName],
:: [HeaderName]
}
deriving (Int -> TopLevelImportHeader -> ShowS
[TopLevelImportHeader] -> ShowS
TopLevelImportHeader -> String
(Int -> TopLevelImportHeader -> ShowS)
-> (TopLevelImportHeader -> String)
-> ([TopLevelImportHeader] -> ShowS)
-> Show TopLevelImportHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TopLevelImportHeader -> ShowS
showsPrec :: Int -> TopLevelImportHeader -> ShowS
$cshow :: TopLevelImportHeader -> String
show :: TopLevelImportHeader -> String
$cshowList :: [TopLevelImportHeader] -> ShowS
showList :: [TopLevelImportHeader] -> ShowS
Show)
data PackageConfig = PkgConfig
{ PackageConfig -> [ClassModule]
pcfg_classModules :: [ClassModule],
:: [ClassImportHeader],
:: TopLevelImportHeader,
PackageConfig -> [TemplateClassModule]
pcfg_templateClassModules :: [TemplateClassModule],
:: [TemplateClassImportHeader],
PackageConfig -> [AddCInc]
pcfg_additional_c_incs :: [AddCInc],
PackageConfig -> [AddCSrc]
pcfg_additional_c_srcs :: [AddCSrc]
}