Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
doil.yat.Template Class Reference

Public Member Functions

def __init__ (self, template, begin_mark="\[", end_mark="\]")
 
def del_nl_after_cmd (self)
 
def generate (self, dict)
 
def get_script (self)
 
def lineno (self)
 

Public Attributes

 begin_mark
 
 cmd_cxt
 
 indent
 
 index
 
 level
 
 re_args
 
 re_number
 
 re_parse
 
 script
 
 script_level
 
 template
 
 token
 
 token_len
 

Private Member Functions

def __cmd (self, args)
 
def __elif_any_cmd (self, args)
 
def __elif_cmd (self, args)
 
def __elif_index_cmd (self, args)
 
def __else_cmd (self, args)
 
def __endfor_cmd (self, args)
 
def __endif_cmd (self, args)
 
def __for_cmd (self, args)
 
def __for_inv_cmd (self, args)
 
def __if_any_cmd (self, args)
 
def __if_cmd (self, args)
 
def __if_index_cmd (self, args)
 
def __indent (self)
 
def __parse (self)
 
def __parse_template (self, dict)
 
def __pop_level (self)
 
def __print_error (self, e)
 
def __proc_bracket (self)
 
def __proc_cmd (self)
 
def __proc_text (self)
 
def __push_level (self)
 
def __write_cmd (self, cmd)
 
def __write_cmd_noindex (self, cmd)
 

Private Attributes

 __procs
 

Detailed Description

usage:
  tempalte_text = read template text from file
  dictionary    = create dictionaly by using yaml
  t = Template(tempalte_text)
  generated_text = t.generate(dictionary)

Definition at line 179 of file doil/utils/omniidl_be/doil/yat.py.

Constructor & Destructor Documentation

def doil.yat.Template.__init__ (   self,
  template,
  begin_mark = "\[",
  end_mark = "\]" 
)

Definition at line 189 of file doil/utils/omniidl_be/doil/yat.py.

Member Function Documentation

def doil.yat.Template.__cmd (   self,
  args 
)
private

Definition at line 363 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__elif_any_cmd (   self,
  args 
)
private

Definition at line 542 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__elif_cmd (   self,
  args 
)
private

Definition at line 469 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__elif_index_cmd (   self,
  args 
)
private

Definition at line 509 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__else_cmd (   self,
  args 
)
private

Definition at line 553 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__endfor_cmd (   self,
  args 
)
private

Definition at line 427 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__endif_cmd (   self,
  args 
)
private

Definition at line 562 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__for_cmd (   self,
  args 
)
private
The following [for] directive
  [for tmp_key in directive]
is converted into the following python command.
  for i in len(directive):
      self.dicts.append({tmp_key: ditective[i])
and, endfor directive terminate as the following,
      self.dicts.pop()

Definition at line 373 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__for_inv_cmd (   self,
  args 
)
private
The following [for] directive
  [for tmp_key in directive]
is converted into the following python command.
  for i in len(directive):
      self.dicts.append({tmp_key: ditective[i])
and, endfor directive terminate as the following,
      self.dicts.pop()

Definition at line 400 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__if_any_cmd (   self,
  args 
)
private

Definition at line 534 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__if_cmd (   self,
  args 
)
private
The following [if] directive
  [if directive is string]
is converted into the following python command.
  if self.__get_string() == "string":

Definition at line 448 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__if_index_cmd (   self,
  args 
)
private

Definition at line 487 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__indent (   self)
private

Definition at line 287 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__parse (   self)
private

Definition at line 291 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__parse_template (   self,
  dict 
)
private

Definition at line 279 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__pop_level (   self)
private

Definition at line 265 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__print_error (   self,
  e 
)
private

Definition at line 575 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__proc_bracket (   self)
private

Definition at line 303 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__proc_cmd (   self)
private

Definition at line 310 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__proc_text (   self)
private

Definition at line 296 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__push_level (   self)
private

Definition at line 262 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__write_cmd (   self,
  cmd 
)
private

Definition at line 268 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.__write_cmd_noindex (   self,
  cmd 
)
private

Definition at line 274 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.del_nl_after_cmd (   self)

Definition at line 594 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.generate (   self,
  dict 
)

Definition at line 251 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.get_script (   self)

Definition at line 259 of file doil/utils/omniidl_be/doil/yat.py.

def doil.yat.Template.lineno (   self)

Definition at line 610 of file doil/utils/omniidl_be/doil/yat.py.

Member Data Documentation

doil.yat.Template.__procs
private

Definition at line 190 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.begin_mark

Definition at line 228 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.cmd_cxt

Definition at line 244 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.indent

Definition at line 240 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.index

Definition at line 243 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.level

Definition at line 242 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.re_args

Definition at line 231 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.re_number

Definition at line 232 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.re_parse

Definition at line 229 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.script

Definition at line 239 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.script_level

Definition at line 241 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.template

Definition at line 193 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.token

Definition at line 235 of file doil/utils/omniidl_be/doil/yat.py.

doil.yat.Template.token_len

Definition at line 236 of file doil/utils/omniidl_be/doil/yat.py.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:02