camp.generators package
Subpackages
Submodules
Abstract base behavior for all generators.
- class camp.generators.base.AbstractWriter(admset, adm, out_path, **kwargs)
Bases:
object
Interface for any generator Writer class.
- Variables:
admset – The
AdmSet
to use.adm – The specific ADM to generate for.
out_path – The output parent path to be used.
- file_path() str
Get the path to the file to be generated. This should be derived from
out_path
.- Returns:
The full path for the file.
- write(outfile: TextIO)
Main function for the program. orchestrates calling all helper functions to generate the file text.
- Parameters:
outfile – The file object to write to.
- class camp.generators.base.CHelperMixin
Bases:
object
A mixin class for AbstractWriter to provide C language helpers.
This module creates the c file for the implementation version of the ADM.
- class camp.generators.create_impl_c.Writer(admset, adm, out_path, scrape: bool)
Bases:
AbstractWriter
,CHelperMixin
The common header file writer.
- file_path() str
Get the path to the file to be generated. This should be derived from
out_path
.- Returns:
The full path for the file.
- write(outfile: TextIO)
Main function for the program. orchestrates calling all helper functions to generate the file text.
- Parameters:
outfile – The file object to write to.
This module creates the h file for the implementation version of the ADM.
- class camp.generators.create_impl_h.Writer(admset, adm, out_path, scrape: bool)
Bases:
AbstractWriter
,CHelperMixin
The common header file writer.
- file_path() str
Get the path to the file to be generated. This should be derived from
out_path
.- Returns:
The full path for the file.
- write(outfile: TextIO)
Main function for the program. orchestrates calling all helper functions to generate the file text.
- Parameters:
outfile – The file object to write to.
This module creates the sqlc file for the implementation version of the ADM.
- class camp.generators.create_sql.Writer(admset, adm, out_path, scrape: bool, dialect: pgsql)
Bases:
AbstractWriter
,CHelperMixin
The common header file writer.
- file_path() str
Get the path to the file to be generated. This should be derived from
out_path
.- Returns:
The full path for the file.
- write(outfile: TextIO)
Main function for the program. orchestrates calling all helper functions to generate the file text.
- Parameters:
outfile – The file object to write to.