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
 
class  YamlDictWrapper
 
class  YamlListWrapper
 

Functions

def abs_filename_spec (filename_spec)
 
def check_attrs (tag, required, optional)
 
def check_deprecated_tag (tag_name)
 
def construct_angle_degrees (loader, node)
 
def construct_angle_radians (loader, node)
 
def create_global_symbols ()
 
def deprecated_tag (tag_name=None, _issued=[False])
 
def eval_extension (s)
 
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 import_xml_namespaces (parent, attributes)
 
def init_stacks (file)
 
def is_include (elt)
 
def is_valid_name (name)
 
def load_yaml (filename)
 
def parse_macro_arg (s)
 
def process_include (elt, macros, symbols, func)
 
def process_includes (elt, macros=None, symbols=None)
 
def safe_eval (expr, globals, locals=None)
 
def tokenize (s, sep=', skip_empty=True)
 

Variables

 _basestr = basestring
 
list all_includes = []
 
bool allow_non_prefixed_tags = True
 
 backup_path = list(sys.path)
 
 cur_dir = os.getcwd()
 
string default_value = '''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|'''
 
bool do_check_order = False
 
dictionary encoding = {'encoding': 'utf-8'}
 
 filestack = None
 
string include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""
 
 macrostack = None
 
 path
 
 re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + ')(?:\s+|$)(.*)')
 
dictionary substitution_args_context = {}
 
 this_dir = os.path.dirname(__file__)
 
 this_dir_cwd = os.getcwd()
 
 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 74 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 267 of file __init__.py.

◆ check_deprecated_tag()

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

◆ construct_angle_degrees()

def xacro.construct_angle_degrees (   loader,
  node 
)
utility function for converting degrees into radians from yaml

Definition at line 127 of file __init__.py.

◆ construct_angle_radians()

def xacro.construct_angle_radians (   loader,
  node 
)
utility function to construct radian values from yaml

Definition at line 118 of file __init__.py.

◆ create_global_symbols()

def xacro.create_global_symbols ( )

Definition at line 164 of file __init__.py.

◆ deprecated_tag()

def xacro.deprecated_tag (   tag_name = None,
  _issued = [False] 
)

Definition at line 287 of file __init__.py.

◆ eval_extension()

def xacro.eval_extension (   s)

Definition at line 327 of file __init__.py.

◆ get_include_files()

def xacro.get_include_files (   filename_spec,
  symbols 
)

Definition at line 532 of file __init__.py.

◆ grab_macro()

def xacro.grab_macro (   elt,
  macros 
)

Definition at line 667 of file __init__.py.

◆ grab_macros()

def xacro.grab_macros (   elt,
  macros 
)

Definition at line 700 of file __init__.py.

◆ grab_properties()

def xacro.grab_properties (   elt,
  table 
)

Definition at line 775 of file __init__.py.

◆ grab_property()

def xacro.grab_property (   elt,
  table 
)

Definition at line 713 of file __init__.py.

◆ import_xml_namespaces()

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

Definition at line 556 of file __init__.py.

◆ init_stacks()

def xacro.init_stacks (   file)

Definition at line 67 of file __init__.py.

◆ is_include()

def xacro.is_include (   elt)

Definition at line 510 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 620 of file __init__.py.

◆ load_yaml()

def xacro.load_yaml (   filename)

Definition at line 132 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 644 of file __init__.py.

◆ process_include()

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

Definition at line 570 of file __init__.py.

◆ process_includes()

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

Definition at line 608 of file __init__.py.

◆ safe_eval()

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

Definition at line 237 of file __init__.py.

◆ tokenize()

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

Definition at line 152 of file __init__.py.

Variable Documentation

◆ _basestr

xacro._basestr = basestring
private

Definition at line 51 of file __init__.py.

◆ all_includes

list xacro.all_includes = []

Definition at line 506 of file __init__.py.

◆ allow_non_prefixed_tags

bool xacro.allow_non_prefixed_tags = True

Definition at line 301 of file __init__.py.

◆ backup_path

xacro.backup_path = list(sys.path)

Definition at line 45 of file xacro.py.

◆ cur_dir

xacro.cur_dir = os.getcwd()

Definition at line 48 of file xacro.py.

◆ default_value

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

Definition at line 639 of file __init__.py.

◆ do_check_order

bool xacro.do_check_order = False

Definition at line 342 of file __init__.py.

◆ encoding

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

Definition at line 52 of file __init__.py.

◆ filestack

xacro.filestack = None

Definition at line 63 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 507 of file __init__.py.

◆ macrostack

xacro.macrostack = None

Definition at line 64 of file __init__.py.

◆ path

xacro.path

Definition at line 53 of file xacro.py.

◆ re_macro_arg

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

Definition at line 640 of file __init__.py.

◆ substitution_args_context

dictionary xacro.substitution_args_context = {}

Definition at line 59 of file __init__.py.

◆ this_dir

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

Definition at line 46 of file xacro.py.

◆ this_dir_cwd

xacro.this_dir_cwd = os.getcwd()

Definition at line 50 of file xacro.py.

◆ unicode

xacro.unicode = str

Definition at line 55 of file __init__.py.

◆ verbosity

int xacro.verbosity = 1

Definition at line 264 of file __init__.py.



xacro
Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Thu May 25 2023 02:45:08