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
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassImportHeader] -> ShowS
$cshowList :: [ClassImportHeader] -> ShowS
show :: ClassImportHeader -> String
$cshow :: ClassImportHeader -> String
showsPrec :: Int -> ClassImportHeader -> ShowS
$cshowsPrec :: Int -> ClassImportHeader -> ShowS
Show)
data ClassSubmoduleType
= CSTRawType
| CSTInterface
| CSTImplementation
| CSTFFI
| CSTCast
deriving (Int -> ClassSubmoduleType -> ShowS
[ClassSubmoduleType] -> ShowS
ClassSubmoduleType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassSubmoduleType] -> ShowS
$cshowList :: [ClassSubmoduleType] -> ShowS
show :: ClassSubmoduleType -> String
$cshow :: ClassSubmoduleType -> String
showsPrec :: Int -> ClassSubmoduleType -> ShowS
$cshowsPrec :: Int -> ClassSubmoduleType -> ShowS
Show)
data TemplateClassSubmoduleType
= TCSTTH
| TCSTTemplate
deriving (Int -> TemplateClassSubmoduleType -> ShowS
[TemplateClassSubmoduleType] -> ShowS
TemplateClassSubmoduleType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateClassSubmoduleType] -> ShowS
$cshowList :: [TemplateClassSubmoduleType] -> ShowS
show :: TemplateClassSubmoduleType -> String
$cshow :: TemplateClassSubmoduleType -> String
showsPrec :: Int -> TemplateClassSubmoduleType -> ShowS
$cshowsPrec :: Int -> 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
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassModule] -> ShowS
$cshowList :: [ClassModule] -> ShowS
show :: ClassModule -> String
$cshow :: ClassModule -> String
showsPrec :: Int -> ClassModule -> ShowS
$cshowsPrec :: Int -> ClassModule -> ShowS
Show)
data TemplateClassModule = TCM
{ TemplateClassModule -> String
tcmModule :: String,
TemplateClassModule -> TemplateClassImportHeader
tcmTCIH :: TemplateClassImportHeader
}
deriving (Int -> TemplateClassModule -> ShowS
[TemplateClassModule] -> ShowS
TemplateClassModule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateClassModule] -> ShowS
$cshowList :: [TemplateClassModule] -> ShowS
show :: TemplateClassModule -> String
$cshow :: TemplateClassModule -> String
showsPrec :: Int -> TemplateClassModule -> ShowS
$cshowsPrec :: Int -> TemplateClassModule -> ShowS
Show)
data = TCIH
{ TemplateClassImportHeader -> TemplateClass
tcihTClass :: TemplateClass,
:: [HeaderName]
}
deriving (Int -> TemplateClassImportHeader -> ShowS
[TemplateClassImportHeader] -> ShowS
TemplateClassImportHeader -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateClassImportHeader] -> ShowS
$cshowList :: [TemplateClassImportHeader] -> ShowS
show :: TemplateClassImportHeader -> String
$cshow :: TemplateClassImportHeader -> String
showsPrec :: Int -> TemplateClassImportHeader -> ShowS
$cshowsPrec :: Int -> 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
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TopLevelImportHeader] -> ShowS
$cshowList :: [TopLevelImportHeader] -> ShowS
show :: TopLevelImportHeader -> String
$cshow :: TopLevelImportHeader -> String
showsPrec :: Int -> TopLevelImportHeader -> ShowS
$cshowsPrec :: Int -> 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]
}