module FFICXX.Generate.Type.Module where
import FFICXX.Generate.Type.Cabal (AddCInc,AddCSrc)
import FFICXX.Generate.Type.Class
import FFICXX.Generate.Type.PackageInterface (HeaderName(..),Namespace(..))
data ClassImportHeader = ClassImportHeader
{ cihClass :: Class
, cihSelfHeader :: HeaderName
, cihNamespace :: [Namespace]
, cihSelfCpp :: String
, cihImportedClasses :: [Either TemplateClass Class]
, cihIncludedHPkgHeadersInH :: [HeaderName]
, cihIncludedHPkgHeadersInCPP :: [HeaderName]
, cihIncludedCPkgHeaders :: [HeaderName]
} deriving (Show)
data ClassModule = ClassModule
{ cmModule :: String
, cmClass :: [Class]
, cmCIH :: [ClassImportHeader]
, cmImportedModulesHighNonSource :: [Either TemplateClass Class]
, cmImportedModulesRaw :: [Either TemplateClass Class]
, cmImportedModulesHighSource :: [Either TemplateClass Class]
, cmImportedModulesForFFI :: [Either TemplateClass Class]
, cmExtraImport :: [String]
} deriving (Show)
data TemplateClassModule = TCM { tcmModule :: String
, tcmTemplateClasses :: [TemplateClass]
, tcmTCIH :: [TemplateClassImportHeader]
} deriving (Show)
data TemplateClassImportHeader = TCIH { tcihTClass :: TemplateClass
, tcihSelfHeader :: HeaderName
} deriving (Show)
data TopLevelImportHeader = TopLevelImportHeader {
tihHeaderFileName :: String
, tihClassDep :: [ClassImportHeader]
, tihExtraClassDep :: [Either TemplateClass Class]
, tihFuncs :: [TopLevelFunction]
, tihNamespaces :: [Namespace]
, tihExtraHeadersInH :: [HeaderName]
, tihExtraHeadersInCPP :: [HeaderName]
} deriving (Show)
data PackageConfig = PkgConfig { pcfg_classModules :: [ClassModule]
, pcfg_classImportHeaders :: [ClassImportHeader]
, pcfg_topLevelImportHeader :: TopLevelImportHeader
, pcfg_templateClassModules :: [TemplateClassModule]
, pcfg_templateClassImportHeaders :: [TemplateClassImportHeader]
, pcfg_additional_c_incs :: [AddCInc]
, pcfg_additional_c_srcs :: [AddCSrc]
}