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

Public Member Functions

def __init__ (self, template, begin_mark="\, end_mark="\")
 
def __init__ (self, template, begin_mark="\, end_mark="\")
 
def del_nl_after_cmd (self)
 
def del_nl_after_cmd (self)
 
def generate (self, dict)
 
def generate (self, dict)
 
def get_script (self)
 
def get_script (self)
 
def lineno (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 __cmd (self, args)
 
def __elif_any_cmd (self, args)
 
def __elif_any_cmd (self, args)
 
def __elif_cmd (self, args)
 
def __elif_cmd (self, args)
 
def __elif_index_cmd (self, args)
 
def __elif_index_cmd (self, args)
 
def __else_cmd (self, args)
 
def __else_cmd (self, args)
 
def __endfor_cmd (self, args)
 
def __endfor_cmd (self, args)
 
def __endif_cmd (self, args)
 
def __endif_cmd (self, args)
 
def __for_cmd (self, args)
 
def __for_cmd (self, args)
 
def __if_any_cmd (self, args)
 
def __if_any_cmd (self, args)
 
def __if_cmd (self, args)
 
def __if_cmd (self, args)
 
def __if_index_cmd (self, args)
 
def __if_index_cmd (self, args)
 
def __indent (self)
 
def __indent (self)
 
def __parse (self)
 
def __parse (self)
 
def __parse_template (self, dict)
 
def __parse_template (self, dict)
 
def __pop_level (self)
 
def __pop_level (self)
 
def __print_error (self, e)
 
def __print_error (self, e)
 
def __proc_bracket (self)
 
def __proc_bracket (self)
 
def __proc_cmd (self)
 
def __proc_cmd (self)
 
def __proc_text (self)
 
def __proc_text (self)
 
def __push_level (self)
 
def __push_level (self)
 
def __write_cmd (self, cmd)
 
def __write_cmd (self, cmd)
 
def __write_cmd_noindex (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 174 of file coil/build/yat.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

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

Definition at line 184 of file coil/build/yat.py.

◆ __init__() [2/2]

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

Definition at line 184 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

Member Function Documentation

◆ __cmd() [1/2]

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

Definition at line 355 of file coil/build/yat.py.

◆ __cmd() [2/2]

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

Definition at line 355 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __elif_any_cmd() [1/2]

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

Definition at line 497 of file coil/build/yat.py.

◆ __elif_any_cmd() [2/2]

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

Definition at line 497 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __elif_cmd() [1/2]

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

Definition at line 429 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __elif_cmd() [2/2]

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

Definition at line 429 of file coil/build/yat.py.

◆ __elif_index_cmd() [1/2]

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

Definition at line 464 of file coil/build/yat.py.

◆ __elif_index_cmd() [2/2]

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

Definition at line 464 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __else_cmd() [1/2]

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

Definition at line 508 of file coil/build/yat.py.

◆ __else_cmd() [2/2]

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

Definition at line 508 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __endfor_cmd() [1/2]

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

Definition at line 392 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __endfor_cmd() [2/2]

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

Definition at line 392 of file coil/build/yat.py.

◆ __endif_cmd() [1/2]

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

Definition at line 517 of file coil/build/yat.py.

◆ __endif_cmd() [2/2]

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

Definition at line 517 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __for_cmd() [1/2]

def 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 365 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __for_cmd() [2/2]

def 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 365 of file coil/build/yat.py.

◆ __if_any_cmd() [1/2]

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

Definition at line 489 of file coil/build/yat.py.

◆ __if_any_cmd() [2/2]

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

Definition at line 489 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __if_cmd() [1/2]

def 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 413 of file coil/build/yat.py.

◆ __if_cmd() [2/2]

def 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 413 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __if_index_cmd() [1/2]

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

Definition at line 442 of file coil/build/yat.py.

◆ __if_index_cmd() [2/2]

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

Definition at line 442 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __indent() [1/2]

def yat.Template.__indent (   self)
private

Definition at line 282 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __indent() [2/2]

def yat.Template.__indent (   self)
private

Definition at line 282 of file coil/build/yat.py.

◆ __parse() [1/2]

def yat.Template.__parse (   self)
private

Definition at line 286 of file coil/build/yat.py.

◆ __parse() [2/2]

def yat.Template.__parse (   self)
private

Definition at line 286 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __parse_template() [1/2]

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

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

◆ __parse_template() [2/2]

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

Definition at line 274 of file coil/build/yat.py.

◆ __pop_level() [1/2]

def yat.Template.__pop_level (   self)
private

Definition at line 260 of file coil/build/yat.py.

◆ __pop_level() [2/2]

def yat.Template.__pop_level (   self)
private

Definition at line 260 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __print_error() [1/2]

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

Definition at line 527 of file coil/build/yat.py.

◆ __print_error() [2/2]

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

Definition at line 527 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __proc_bracket() [1/2]

def yat.Template.__proc_bracket (   self)
private

Definition at line 298 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __proc_bracket() [2/2]

def yat.Template.__proc_bracket (   self)
private

Definition at line 298 of file coil/build/yat.py.

◆ __proc_cmd() [1/2]

def yat.Template.__proc_cmd (   self)
private

Definition at line 305 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __proc_cmd() [2/2]

def yat.Template.__proc_cmd (   self)
private

Definition at line 305 of file coil/build/yat.py.

◆ __proc_text() [1/2]

def yat.Template.__proc_text (   self)
private

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

◆ __proc_text() [2/2]

def yat.Template.__proc_text (   self)
private

Definition at line 291 of file coil/build/yat.py.

◆ __push_level() [1/2]

def yat.Template.__push_level (   self)
private

Definition at line 257 of file coil/build/yat.py.

◆ __push_level() [2/2]

def yat.Template.__push_level (   self)
private

Definition at line 257 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __write_cmd() [1/2]

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

Definition at line 263 of file coil/build/yat.py.

◆ __write_cmd() [2/2]

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

Definition at line 263 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __write_cmd_noindex() [1/2]

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

Definition at line 269 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ __write_cmd_noindex() [2/2]

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

Definition at line 269 of file coil/build/yat.py.

◆ del_nl_after_cmd() [1/2]

def yat.Template.del_nl_after_cmd (   self)

Definition at line 542 of file coil/build/yat.py.

◆ del_nl_after_cmd() [2/2]

def yat.Template.del_nl_after_cmd (   self)

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

◆ generate() [1/2]

def yat.Template.generate (   self,
  dict 
)

Definition at line 246 of file coil/build/yat.py.

◆ generate() [2/2]

def yat.Template.generate (   self,
  dict 
)

Definition at line 246 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ get_script() [1/2]

def yat.Template.get_script (   self)

Definition at line 254 of file coil/build/yat.py.

◆ get_script() [2/2]

def yat.Template.get_script (   self)

Definition at line 254 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

◆ lineno() [1/2]

def yat.Template.lineno (   self)

Definition at line 558 of file coil/build/yat.py.

◆ lineno() [2/2]

def yat.Template.lineno (   self)

Definition at line 558 of file doil/utils/omniidl_be/tests/unitTest/yat.py.

Member Data Documentation

◆ __procs

yat.Template.__procs
private

Definition at line 185 of file coil/build/yat.py.

◆ begin_mark

yat.Template.begin_mark

Definition at line 223 of file coil/build/yat.py.

◆ cmd_cxt

yat.Template.cmd_cxt

Definition at line 239 of file coil/build/yat.py.

◆ indent

yat.Template.indent

Definition at line 235 of file coil/build/yat.py.

◆ index

yat.Template.index

Definition at line 238 of file coil/build/yat.py.

◆ level

yat.Template.level

Definition at line 237 of file coil/build/yat.py.

◆ re_args

yat.Template.re_args

Definition at line 226 of file coil/build/yat.py.

◆ re_number

yat.Template.re_number

Definition at line 227 of file coil/build/yat.py.

◆ re_parse

yat.Template.re_parse

Definition at line 224 of file coil/build/yat.py.

◆ script

yat.Template.script

Definition at line 234 of file coil/build/yat.py.

◆ script_level

yat.Template.script_level

Definition at line 236 of file coil/build/yat.py.

◆ template

yat.Template.template

Definition at line 188 of file coil/build/yat.py.

◆ token

yat.Template.token

Definition at line 230 of file coil/build/yat.py.

◆ token_len

yat.Template.token_len

Definition at line 231 of file coil/build/yat.py.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:48