drasil-code-0.1.9.0: A framework for code and document generation for scientific software - Code SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Code.Imperative.GenerateGOOL

Synopsis

Documentation

data ClassType Source #

Constructors

Primary 
Auxiliary 

genModuleWithImports :: OOProg r => Name -> Description -> [Import] -> [GenState (Maybe (SMethod r))] -> [GenState (Maybe (SClass r))] -> GenState (SFile r) Source #

Defines a GOOL module. If the user chose CommentMod, the module will have Doxygen comments. If the user did not choose CommentMod but did choose CommentFunc, a module-level Doxygen comment is still created, though it only documents the file name, because without this Doxygen will not find the function-level comments in the file.

genModuleWithImportsProc :: ProcProg r => Name -> Description -> [Import] -> [GenState (Maybe (SMethod r))] -> GenState (SFile r) Source #

Defines a GOOL module. If the user chose CommentMod, the module will have Doxygen comments. If the user did not choose CommentMod but did choose CommentFunc, a module-level Doxygen comment is still created, though it only documents the file name, because without this Doxygen will not find the function-level comments in the file.

genModule :: OOProg r => Name -> Description -> [GenState (Maybe (SMethod r))] -> [GenState (Maybe (SClass r))] -> GenState (SFile r) Source #

Generates a module for when imports do not need to be explicitly stated.

genModuleProc :: ProcProg r => Name -> Description -> [GenState (Maybe (SMethod r))] -> GenState (SFile r) Source #

Generates a module for when imports do not need to be explicitly stated.

genDoxConfig :: AuxiliarySym r => GOOLState -> GenState (Maybe (r (Auxiliary r))) Source #

Generates a Doxygen configuration file if the user has comments enabled.

genReadMe :: AuxiliarySym r => ReadMeInfo -> GenState (Maybe (r (Auxiliary r))) Source #

Generates a README file.

primaryClass :: OOProg r => Name -> Maybe Name -> Description -> [CSStateVar r] -> GenState [SMethod r] -> GenState [SMethod r] -> GenState (SClass r) Source #

Generates a primary class.

auxClass :: OOProg r => Name -> Maybe Name -> Description -> [CSStateVar r] -> GenState [SMethod r] -> GenState [SMethod r] -> GenState (SClass r) Source #

Generates an auxiliary class (for when a module contains multiple classes).

fApp :: OOProg r => Name -> Name -> VSType r -> [SValue r] -> NamedArgs r -> GenState (SValue r) Source #

Function call generator. The first parameter (m) is the module where the function is defined. If m is not the current module, use GOOL's function for calling functions from external modules. If m is the current module and the function is in export map, use GOOL's basic function for function applications. If m is the current module and function is not exported, use GOOL's function for calling a method on self. This assumes all private methods are dynamic, which is true for this generator.

fAppProc :: SharedProg r => Name -> Name -> VSType r -> [SValue r] -> NamedArgs r -> GenState (SValue r) Source #

Function call generator. The first parameter (m) is the module where the function is defined. If m is not the current module, use GOOL's function for calling functions from external modules. If m is the current module and the function is in export map, use GOOL's basic function for function applications. If m is the current module and function is not exported, use GOOL's function for calling a method on self. This assumes all private methods are dynamic, which is true for this generator.

ctorCall :: OOProg r => Name -> VSType r -> [SValue r] -> NamedArgs r -> GenState (SValue r) Source #

Logic similar to fApp, but the self case is not required here (because constructor will never be private). Calls newObjMixedArgs.

fAppInOut :: OOProg r => Name -> Name -> [SValue r] -> [SVariable r] -> [SVariable r] -> GenState (MSStatement r) Source #

Logic similar to fApp, but for In/Out calls.

fAppInOutProc :: SharedProg r => Name -> Name -> [SValue r] -> [SVariable r] -> [SVariable r] -> GenState (MSStatement r) Source #

Logic similar to fApp, but for In/Out calls.