|
libcss
|
Public Member Functions | |
| __init__ (self) | |
| indent (self, value) | |
| comment (self) | |
| escape_newline (self) | |
| append (self, text=None, pre_formatted=False) | |
| table_line (self) | |
| table_header (self) | |
| result_line (self) | |
| to_string (self) | |
Static Public Attributes | |
| int | name_width = 31 |
| int | bits_width = 16 |
Protected Attributes | |
| _lines | |
| _comment | |
| _esc_nl | |
| _indent | |
Class for building strings for output files.
| select_generator.Text.__init__ | ( | self | ) |
| select_generator.Text.append | ( | self, | |
text = None, |
|||
pre_formatted = False |
|||
| ) |
Append text to file builder.
Args:
text:
<str> add contents, breaking lines and adding comment
markers or newline escapes as needed.
<list> recursively call this method for list items.
<falsey value> add a new line.
pre_formatted: just add text without preprocessing.
| select_generator.Text.comment | ( | self | ) |
Toggle C-style comment in the output text.
| select_generator.Text.escape_newline | ( | self | ) |
Toggle escape of newline character.
| select_generator.Text.indent | ( | self, | |
| value | |||
| ) |
Increase or decrease indent by <value>.
Args:
value <int>: positive or negative value to be added to
indentation.
| select_generator.Text.result_line | ( | self | ) |
Add a result line for the tables in computed.h
| select_generator.Text.table_header | ( | self | ) |
Add a header line for the tables in computed.h
| select_generator.Text.table_line | ( | self | ) |
Add a sum line for the tables in computed.h
| select_generator.Text.to_string | ( | self | ) |
Output contents of file builder as a string.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |