gen_avr8.pro.template_type module¶
- Module
- template_type.py
- Copyright
- Copyright (C) 2018 Vladimir Roncevic <elektron.ronca@gmail.com> gen_avr8 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_avr8 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- Info
- Defined class TemplateType with attribute(s) and method(s). Created API for checking project template type and template structure.
-
class
gen_avr8.pro.template_type.
TemplateType
[source]¶ Bases:
object
Defined class TemplateType with attribute(s) and method(s). Created API for checking project template type and template structure. It defines:
attributes: GEN_VERBOSE - console text indicator for process-phase.APP_TEMPLATE - application type of project.LIB_TEMPLATE - library type of project.TEMPLATE_TYPE - project template structures.methods: check_template_type - check project template type.setup_template_type - setup template type (app | lib).__str__ - dunder method for TemplateType.-
APP_TEMPLATE
= 'app'¶
-
GEN_VERBOSE
= 'GEN_AVR8::PRO::TEMPLATE_TYPE'¶
-
LIB_TEMPLATE
= 'lib'¶
-
TEMPLATE_TYPE
= {'app': 'project_app.yaml', 'lib': 'project_lib.yaml'}¶
-
classmethod
check_template_type
(template_type, verbose=False)[source]¶ Check project template type (App | Lib).
Parameters: - template_type (<str>) – project template type.
- verbose (<bool>) – enable/disable verbose option.
Returns: boolean status, True project type for ok | False.
Return type: <bool>
Exceptions: ATSTypeError | ATSBadCallError
-
classmethod
setup_template_type
(template_type, verbose=False)[source]¶ Setup template type (App | Lib).
Parameters: - template_type (<str>) – project template type.
- verbose (<bool>) – enable/disable verbose option.
Returns: project type (app | lib) | None.
Return type: <str> | <NoneType>
Exceptions: ATSTypeError | ATSBadCallError
-