Namespaces | Classes | Functions | Variables
xacro Namespace Reference

Namespaces

 cli
 
 color
 
 xmlutils
 

Classes

class  ConstructUnits
 
class  Macro
 
class  NameSpace
 
class  QuickLexer
 
class  Table
 
class  XacroException
 
class  YamlDictWrapper
 
class  YamlListWrapper
 

Functions

def abs_filename_spec (filename_spec)
 
def check_attrs (tag, required, optional)
 
def create_global_symbols ()
 
def eval_extension (s)
 
def get_include_files (filename_spec, symbols)
 
def grab_macro (elt, macros)
 
def grab_property (elt, table)
 
def import_xml_namespaces (parent, attributes)
 
def init_stacks (file)
 
def is_valid_name (name)
 
def load_yaml (filename)
 
def parse_macro_arg (s)
 
def process_include (elt, macros, symbols, func)
 
def safe_eval (expr, globals, locals=None)
 
def tokenize (s, sep=',;', skip_empty=True)
 

Variables

 _basestr = basestring
 
list all_includes = []
 
string default_value = r'''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|'''
 
dictionary encoding = {'encoding': 'utf-8'}
 
 filestack = None
 
string include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""
 
 macrostack = None
 
 re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + r')(?:\s+|$)(.*)')
 
dictionary substitution_args_context = {}
 
 unicode = str
 
int verbosity = 1
 

Function Documentation

◆ abs_filename_spec()

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 76 of file __init__.py.

◆ check_attrs()

def xacro.check_attrs (   tag,
  required,
  optional 
)
Helper routine to fetch required and optional attributes
and complain about any additional attributes.
:param tag (xml.dom.Element): DOM element node
:param required [str]: list of required attributes
:param optional [str]: list of optional attributes

Definition at line 276 of file __init__.py.

◆ create_global_symbols()

def xacro.create_global_symbols ( )

Definition at line 173 of file __init__.py.

◆ eval_extension()

def xacro.eval_extension (   s)

Definition at line 303 of file __init__.py.

◆ get_include_files()

def xacro.get_include_files (   filename_spec,
  symbols 
)

Definition at line 476 of file __init__.py.

◆ grab_macro()

def xacro.grab_macro (   elt,
  macros 
)

Definition at line 606 of file __init__.py.

◆ grab_property()

def xacro.grab_property (   elt,
  table 
)

Definition at line 638 of file __init__.py.

◆ import_xml_namespaces()

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

Definition at line 500 of file __init__.py.

◆ init_stacks()

def xacro.init_stacks (   file)

Definition at line 69 of file __init__.py.

◆ is_valid_name()

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 559 of file __init__.py.

◆ load_yaml()

def xacro.load_yaml (   filename)

Definition at line 141 of file __init__.py.

◆ parse_macro_arg()

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 583 of file __init__.py.

◆ process_include()

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

Definition at line 514 of file __init__.py.

◆ safe_eval()

def xacro.safe_eval (   expr,
  globals,
  locals = None 
)

Definition at line 246 of file __init__.py.

◆ tokenize()

def xacro.tokenize (   s,
  sep = ',; ',
  skip_empty = True 
)

Definition at line 161 of file __init__.py.

Variable Documentation

◆ _basestr

xacro._basestr = basestring
private

Definition at line 53 of file __init__.py.

◆ all_includes

list xacro.all_includes = []

Definition at line 472 of file __init__.py.

◆ default_value

string xacro.default_value = r'''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|'''

Definition at line 578 of file __init__.py.

◆ encoding

dictionary xacro.encoding = {'encoding': 'utf-8'}

Definition at line 54 of file __init__.py.

◆ filestack

xacro.filestack = None

Definition at line 65 of file __init__.py.

◆ include_no_matches_msg

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

Definition at line 473 of file __init__.py.

◆ macrostack

xacro.macrostack = None

Definition at line 66 of file __init__.py.

◆ re_macro_arg

xacro.re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + r')(?:\s+|$)(.*)')

Definition at line 579 of file __init__.py.

◆ substitution_args_context

dictionary xacro.substitution_args_context = {}

Definition at line 61 of file __init__.py.

◆ unicode

xacro.unicode = str

Definition at line 57 of file __init__.py.

◆ verbosity

int xacro.verbosity = 1

Definition at line 273 of file __init__.py.



xacro
Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Sat Jul 20 2024 02:50:07