camp.generators.lib package
Submodules
- camp.generators.lib.campch.AdmEntity
Either an ADM itself or an AMM object defined within one.
alias of
Union[StructType,AdmModule,AdmObjMixin]
- camp.generators.lib.campch.update_jinja_env(env: Environment, admset, sym_prefix: str)
Set state of a jinja environment for ADM implementation source generation.
- camp.generators.lib.campch.yang_to_c(identifier)
Translates a valid YANG identifier to a valid C99 symbol name.
- camp.generators.lib.campch.yang_to_sql(identifier)
Translates a valid YANG identifier to a valid SQL symbol name.
- class camp.generators.lib.campch_roundtrip.C_Scraper(filename: Optional[str])
Bases:
ScraperC-file scraper class is a child of the Scraper class
- CALLBACK_FUNCTIONS_STOP = re.compile('/\\*\\s+STOP CALLBACK FUNCTIONS HERE\\s+\\*/')
End of callback block
- CUSTOM_FUNCTIONS_START = re.compile('/\\*\\s+START CUSTOM FUNCTIONS HERE\\s+\\*/')
Top of local functions
- CUSTOM_FUNCTIONS_STOP = re.compile('/\\*\\s+STOP CUSTOM FUNCTIONS HERE\\s+\\*/')
Bottom of local functions
- CUSTOM_POSTINIT_START = re.compile('/\\*\\s+START CUSTOM POST-INIT HERE\\s+\\*/')
Top of post-init
- CUSTOM_POSTINIT_STOP = re.compile('/\\*\\s+STOP CUSTOM POST-INIT HERE\\s+\\*/')
Bottom of post-init
- CUSTOM_PREINIT_START = re.compile('/\\*\\s+START CUSTOM PRE-INIT HERE\\s+\\*/')
Top of pre-init
- CUSTOM_PREINIT_STOP = re.compile('/\\*\\s+STOP CUSTOM PRE-INIT HERE\\s+\\*/')
Bottom of pre-init
- funcs_unused() Set[str]
Get a set of function names which were scraped but not written.
- write_custom_body(function: str) str
- class camp.generators.lib.campch_roundtrip.H_Scraper(filename: Optional[str])
Bases:
ScraperH-file scraper class is a child of the Scraper class.
- class camp.generators.lib.campch_roundtrip.Scraper(filename: Optional[str])
Bases:
objectClass to handle scraping files, and writing custom tags and code to newly-generated files.
- CUSTOM_INCLUDES_START = re.compile('/\\*\\s+START CUSTOM INCLUDES HERE\\s+\\*/')
Top of includes
- CUSTOM_INCLUDES_STOP = re.compile('/\\*\\s+STOP CUSTOM INCLUDES HERE\\s+\\*/')
Bottom of includes
- GENSRC_START = re.compile('/\\*\\s+START GENERATED SOURCE HERE\\s+\\*/')
Top of generated lines
- GENSRC_STOP = re.compile('/\\*\\s+STOP GENERATED SOURCE HERE\\s+\\*/')
Bottom of generated lines