Public Member Functions | Public Attributes | List of all members
pymavlink.generator.mavtemplate.MAVTemplate Class Reference
Inheritance diagram for pymavlink.generator.mavtemplate.MAVTemplate:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, start_var_token="${", end_var_token="}", start_rep_token="${{", end_rep_token="}}", trim_leading_lf=True, checkmissing=True)
 
def find_end (self, text, start_token, end_token, ignore_end_token=None)
 
def find_rep_end (self, text)
 
def find_var_end (self, text)
 
def substitute (self, text, subvars={}, trim_leading_lf=None, checkmissing=None)
 
def write (self, file, text, subvars={}, trim_leading_lf=True)
 

Public Attributes

 checkmissing
 
 end_rep_token
 
 end_var_token
 
 start_rep_token
 
 start_var_token
 
 trim_leading_lf
 

Detailed Description

simple templating system

Definition at line 13 of file mavtemplate.py.

Constructor & Destructor Documentation

def pymavlink.generator.mavtemplate.MAVTemplate.__init__ (   self,
  start_var_token = "${",
  end_var_token = "}",
  start_rep_token = "${{",
  end_rep_token = "}}",
  trim_leading_lf = True,
  checkmissing = True 
)

Definition at line 21 of file mavtemplate.py.

Member Function Documentation

def pymavlink.generator.mavtemplate.MAVTemplate.find_end (   self,
  text,
  start_token,
  end_token,
  ignore_end_token = None 
)
find the of a token.
Returns the offset in the string immediately after the matching end_token

Definition at line 29 of file mavtemplate.py.

def pymavlink.generator.mavtemplate.MAVTemplate.find_rep_end (   self,
  text 
)
find the of a repitition

Definition at line 59 of file mavtemplate.py.

def pymavlink.generator.mavtemplate.MAVTemplate.find_var_end (   self,
  text 
)
find the of a variable

Definition at line 55 of file mavtemplate.py.

def pymavlink.generator.mavtemplate.MAVTemplate.substitute (   self,
  text,
  subvars = {},
  trim_leading_lf = None,
  checkmissing = None 
)
substitute variables in a string

Definition at line 64 of file mavtemplate.py.

def pymavlink.generator.mavtemplate.MAVTemplate.write (   self,
  file,
  text,
  subvars = {},
  trim_leading_lf = True 
)
write to a file with variable substitution

Definition at line 131 of file mavtemplate.py.

Member Data Documentation

pymavlink.generator.mavtemplate.MAVTemplate.checkmissing

Definition at line 27 of file mavtemplate.py.

pymavlink.generator.mavtemplate.MAVTemplate.end_rep_token

Definition at line 25 of file mavtemplate.py.

pymavlink.generator.mavtemplate.MAVTemplate.end_var_token

Definition at line 23 of file mavtemplate.py.

pymavlink.generator.mavtemplate.MAVTemplate.start_rep_token

Definition at line 24 of file mavtemplate.py.

pymavlink.generator.mavtemplate.MAVTemplate.start_var_token

Definition at line 22 of file mavtemplate.py.

pymavlink.generator.mavtemplate.MAVTemplate.trim_leading_lf

Definition at line 26 of file mavtemplate.py.


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


mavlink
Author(s): Lorenz Meier
autogenerated on Sun Jul 7 2019 03:22:08