Namespaces | Classes | Functions | Variables
xacro Namespace Reference

Namespaces

 cli
 
 color
 
 xmlutils
 

Classes

class  Macro
 
class  MacroNameSpace
 
class  NameSpace
 
class  PropertyNameSpace
 
class  QuickLexer
 
class  Table
 
class  XacroException
 

Functions

def abs_filename_spec (filename_spec)
 
def check_deprecated_tag (tag_name)
 
def deprecated_tag (_issued=[False])
 
def eval_all (node, macros, symbols)
 
def eval_default_arg (forward_variable, default, symbols, macro)
 
def eval_extension (s)
 
def eval_text (text, symbols)
 
def get_boolean_value (value, condition)
 
def get_include_files (filename_spec, symbols)
 
def grab_macro (elt, macros)
 
def grab_macros (elt, macros)
 
def grab_properties (elt, table)
 
def grab_property (elt, table)
 
def handle_dynamic_macro_call (node, macros, symbols)
 
def handle_macro_call (node, macros, symbols)
 
def import_xml_namespaces (parent, attributes)
 
def is_include (elt)
 
def is_valid_name (name)
 
def load_yaml (filename)
 
def main ()
 
def open_output (output_filename)
 
def parse (inp, filename=None)
 
def parse_macro_arg (s)
 
def print_location (filestack, err=None, file=sys.stderr)
 
def process_doc (doc, in_order=False, just_deps=False, just_includes=False, mappings=None, xacro_ns=True, kwargs)
 
def process_file (input_file_name, kwargs)
 
def process_include (elt, macros, symbols, func)
 
def process_includes (elt, macros=None, symbols=None)
 
def push_file (filename)
 
def remove_previous_comments (node)
 
def resolve_macro (fullname, macros)
 
def restore_filestack (oldstack)
 

Variables

 _basestr = basestring
 
 _empty_text_node = xml.dom.minidom.getDOMImplementation().createDocument(None, "dummy", None).createTextNode('\n\n')
 
list all_includes = []
 
bool allow_non_prefixed_tags = True
 
 backup_path = list(sys.path)
 
 cur_dir = os.getcwd()
 
list filestack = []
 
dictionary global_symbols = {'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round']}}
 
string include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""
 
 LEXER
 
 path
 
 re_macro_arg = re.compile(r)
 
dictionary substitution_args_context = {}
 
 this_dir = os.path.dirname(__file__)
 
 this_dir_cwd = os.getcwd()
 
int verbosity = 1
 

Function Documentation

def xacro.abs_filename_spec (   filename_spec)
Prepend the dirname of the currently processed file
if filename_spec is not yet absolute

Definition at line 80 of file src/xacro/__init__.py.

def xacro.check_deprecated_tag (   tag_name)
Check whether tagName starts with xacro prefix. If not, issue a warning.
:param tag_name:
:return: True if tagName is accepted as xacro tag
         False if tagName doesn't start with xacro prefix, but the prefix is required

Definition at line 157 of file src/xacro/__init__.py.

def xacro.deprecated_tag (   _issued = [False])

Definition at line 140 of file src/xacro/__init__.py.

def xacro.eval_all (   node,
  macros,
  symbols 
)
Recursively evaluate node, expanding macros, replacing properties, and evaluating expressions

Definition at line 801 of file src/xacro/__init__.py.

def xacro.eval_default_arg (   forward_variable,
  default,
  symbols,
  macro 
)

Definition at line 636 of file src/xacro/__init__.py.

def xacro.eval_extension (   s)

Definition at line 180 of file src/xacro/__init__.py.

def xacro.eval_text (   text,
  symbols 
)

Definition at line 604 of file src/xacro/__init__.py.

def xacro.get_boolean_value (   value,
  condition 
)
Return a boolean value that corresponds to the given Xacro condition value.
Values "true", "1" and "1.0" are supposed to be True.
Values "false", "0" and "0.0" are supposed to be False.
All other values raise an exception.

:param value: The value to be evaluated. The value has to already be evaluated by Xacro.
:param condition: The original condition text in the XML.
:return: The corresponding boolean value, or a Python expression that, converted to boolean, corresponds to it.
:raises ValueError: If the condition value is incorrect.

Definition at line 756 of file src/xacro/__init__.py.

def xacro.get_include_files (   filename_spec,
  symbols 
)

Definition at line 365 of file src/xacro/__init__.py.

def xacro.grab_macro (   elt,
  macros 
)

Definition at line 490 of file src/xacro/__init__.py.

def xacro.grab_macros (   elt,
  macros 
)

Definition at line 523 of file src/xacro/__init__.py.

def xacro.grab_properties (   elt,
  table 
)

Definition at line 582 of file src/xacro/__init__.py.

def xacro.grab_property (   elt,
  table 
)

Definition at line 536 of file src/xacro/__init__.py.

def xacro.handle_dynamic_macro_call (   node,
  macros,
  symbols 
)

Definition at line 648 of file src/xacro/__init__.py.

def xacro.handle_macro_call (   node,
  macros,
  symbols 
)

Definition at line 689 of file src/xacro/__init__.py.

def xacro.import_xml_namespaces (   parent,
  attributes 
)
import all namespace declarations into parent

Definition at line 389 of file src/xacro/__init__.py.

def xacro.is_include (   elt)

Definition at line 343 of file src/xacro/__init__.py.

def xacro.is_valid_name (   name)
Checks whether name is a valid property or macro identifier.
With python-based evaluation, we need to avoid name clashes with python keywords.

Definition at line 447 of file src/xacro/__init__.py.

def xacro.load_yaml (   filename)

Definition at line 92 of file src/xacro/__init__.py.

def xacro.main ( )

Definition at line 1029 of file src/xacro/__init__.py.

def xacro.open_output (   output_filename)

Definition at line 974 of file src/xacro/__init__.py.

def xacro.parse (   inp,
  filename = None 
)
Parse input or filename into a DOM tree.
If inp is None, open filename and load from there.
Otherwise, parse inp, either as string or file object.
If inp is already a DOM tree, this function is a noop.
:return:xml.dom.minidom.Document
:raise: xml.parsers.expat.ExpatError

Definition at line 901 of file src/xacro/__init__.py.

def xacro.parse_macro_arg (   s)
parse the first param spec from a macro parameter string s
accepting the following syntax: <param>[:=|=][^|]<default>
:param s: param spec string
:return: param, (forward, default), rest-of-string
         forward will be either param or None (depending on whether ^ was specified)
         default will be the default string or None
         If there is no default spec at all, the middle pair will be replaced by None

Definition at line 468 of file src/xacro/__init__.py.

def xacro.print_location (   filestack,
  err = None,
  file = sys.stderr 
)

Definition at line 993 of file src/xacro/__init__.py.

def xacro.process_doc (   doc,
  in_order = False,
  just_deps = False,
  just_includes = False,
  mappings = None,
  xacro_ns = True,
  kwargs 
)

Definition at line 933 of file src/xacro/__init__.py.

def xacro.process_file (   input_file_name,
  kwargs 
)
main processing pipeline

Definition at line 1008 of file src/xacro/__init__.py.

def xacro.process_include (   elt,
  macros,
  symbols,
  func 
)

Definition at line 403 of file src/xacro/__init__.py.

def xacro.process_includes (   elt,
  macros = None,
  symbols = None 
)

Definition at line 435 of file src/xacro/__init__.py.

def xacro.push_file (   filename)
Push a new filename to the filestack.
Instead of directly modifying filestack, a deep-copy is created and modified,
while the old filestack is returned.
This allows to store the filestack that was active when a macro or property is defined

Definition at line 62 of file src/xacro/__init__.py.

def xacro.remove_previous_comments (   node)
remove consecutive comments in front of the xacro-specific node

Definition at line 781 of file src/xacro/__init__.py.

def xacro.resolve_macro (   fullname,
  macros 
)

Definition at line 663 of file src/xacro/__init__.py.

def xacro.restore_filestack (   oldstack)

Definition at line 75 of file src/xacro/__init__.py.

Variable Documentation

xacro._basestr = basestring
private

Definition at line 51 of file src/xacro/__init__.py.

xacro._empty_text_node = xml.dom.minidom.getDOMImplementation().createDocument(None, "dummy", None).createTextNode('\n\n')
private

Definition at line 780 of file src/xacro/__init__.py.

list xacro.all_includes = []

Definition at line 338 of file src/xacro/__init__.py.

bool xacro.allow_non_prefixed_tags = True

Definition at line 154 of file src/xacro/__init__.py.

xacro.backup_path = list(sys.path)

Definition at line 45 of file xacro.py.

xacro.cur_dir = os.getcwd()

Definition at line 48 of file xacro.py.

list xacro.filestack = []

Definition at line 60 of file src/xacro/__init__.py.

dictionary xacro.global_symbols = {'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round']}}

Definition at line 114 of file src/xacro/__init__.py.

string xacro.include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""

Definition at line 340 of file src/xacro/__init__.py.

xacro.LEXER
Initial value:
1 = QuickLexer(DOLLAR_DOLLAR_BRACE=r"\$\$+\{",
2  EXPR=r"\$\{[^\}]*\}",
3  EXTENSION=r"\$\([^\)]*\)",
4  TEXT=r"([^\$]|\$[^{(]|\$$)+")

Definition at line 597 of file src/xacro/__init__.py.

xacro.path

Definition at line 53 of file xacro.py.

xacro.re_macro_arg = re.compile(r)

Definition at line 466 of file src/xacro/__init__.py.

dictionary xacro.substitution_args_context = {}

Definition at line 56 of file src/xacro/__init__.py.

xacro.this_dir = os.path.dirname(__file__)

Definition at line 46 of file xacro.py.

xacro.this_dir_cwd = os.getcwd()

Definition at line 50 of file xacro.py.

int xacro.verbosity = 1

Definition at line 138 of file src/xacro/__init__.py.



xacro
Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Mon Jun 10 2019 15:46:01