libcss
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
select_generator.Text Class Reference

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
 

Detailed Description

Class for building strings for output files.

Constructor & Destructor Documentation

◆ __init__()

select_generator.Text.__init__ (   self)

Member Function Documentation

◆ append()

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.

◆ comment()

select_generator.Text.comment (   self)
Toggle C-style comment in the output text.

◆ escape_newline()

select_generator.Text.escape_newline (   self)
Toggle escape of newline character.

◆ indent()

select_generator.Text.indent (   self,
  value 
)
Increase or decrease indent by <value>.

Args:
    value <int>: positive or negative value to be added to
    indentation.

◆ result_line()

select_generator.Text.result_line (   self)
Add a result line for the tables in computed.h

◆ table_header()

select_generator.Text.table_header (   self)
Add a header line for the tables in computed.h

◆ table_line()

select_generator.Text.table_line (   self)
Add a sum line for the tables in computed.h

◆ to_string()

select_generator.Text.to_string (   self)
Output contents of file builder as a string.

Member Data Documentation

◆ _comment

select_generator.Text._comment
protected

◆ _esc_nl

select_generator.Text._esc_nl
protected

◆ _indent

select_generator.Text._indent
protected

◆ _lines

select_generator.Text._lines
protected

◆ bits_width

int select_generator.Text.bits_width = 16
static

◆ name_width

int select_generator.Text.name_width = 31
static

The documentation for this class was generated from the following file: