Peano
Loading...
Searching...
No Matches
Output.py
Go to the documentation of this file.
1
# This file is part of the Peano project. For conditions of distribution and
2
# use, please see the copyright notice at www.peano-framework.org
3
from
.Makefile
import
Makefile
4
from
.Readme
import
Readme
5
6
7
class
Output
(object):
8
"""
9
Represents the total output generated from the Peano4 data model plus all
10
the operations on it. This is basically a big collection.
11
"""
12
def
__init__
(self):
13
self.
artefacts
= []
14
self.
readme
= Readme()
15
self.
makefile
=
Makefile
()
16
17
18
def
clear
(self):
19
"""
20
The clear eliminates all artefacts, but it does not erase the Makefile.
21
This is important as I don't want to loose all the makefile info. If
22
you want to clear the makefile, too, you have to invoke a clear on it.
23
"""
24
self.
artefacts
= []
25
self.
readme
= Readme()
26
self.
makefile
.clear_files()
27
28
29
def
add
(self,artefact,append=True):
30
if
append:
31
self.
artefacts
.append(artefact)
32
else
:
33
self.
artefacts
= [artefact] + self.
artefacts
34
35
36
def
generate
(self,overwrite,directory,subdirectories=[]):
37
"""
38
Iterates over all stored artefacts and, hence, finally generates all the
39
C files, makefiles, and so forth.
40
"""
41
self.
makefile
.
generate
(overwrite, directory, subdirectories)
42
for
artefact
in
self.
artefacts
:
43
artefact.generate(overwrite,directory)
44
45
self.
readme
.set_executable_name( self.
makefile
.executable_name() )
46
self.
readme
.add_entry( self.
makefile
.readme_entry )
47
self.
readme
.add_package_description( self.
makefile
.readme_package_descriptor )
48
49
self.
readme
.
generate
(directory)
peano4.output.Makefile.Makefile
Represents the created Makefile of a Peano 4 project.
Definition
Makefile.py:14
peano4.output.Output.Output
Represents the total output generated from the Peano4 data model plus all the operations on it.
Definition
Output.py:7
peano4.output.Output.Output.makefile
makefile
Definition
Output.py:15
peano4.output.Output.Output.clear
clear(self)
The clear eliminates all artefacts, but it does not erase the Makefile.
Definition
Output.py:18
peano4.output.Output.Output.artefacts
artefacts
Definition
Output.py:13
peano4.output.Output.Output.generate
generate(self, overwrite, directory, subdirectories=[])
Iterates over all stored artefacts and, hence, finally generates all the C files, makefiles,...
Definition
Output.py:36
peano4.output.Output.Output.add
add(self, artefact, append=True)
Definition
Output.py:29
peano4.output.Output.Output.__init__
__init__(self)
Definition
Output.py:12
peano4.output.Output.Output.readme
readme
Definition
Output.py:14
python
peano4
output
Output.py
Generated on Fri Apr 11 2025 10:17:41 for Peano by
1.10.0