class documentation

class LoaderContext(object):

Constructor: LoaderContext(ns, filename, parent, params, ...)

View In Hierarchy

Container for storing current loader context (e.g. namespace, local parameter state, remapping state).

Method __init__ @param ns: namespace @type ns: str @param filename: name of file this is being loaded from @type filename: str @param resolve_dict: (optional) resolution dictionary for substitution args @type resolve_dict: dict @param include_resolve_dict: special resolution dictionary for <include> tags...
Method add_arg Add 'arg' to existing context. Args are only valid for their immediate context.
Method add_param Add a ~param to the context. ~params are evaluated by any node declarations that occur later in the same context.
Method add_remap Add a new remap setting to the context. if a remap already exists with the same from key, it will be removed
Method child child context shares the same namespace
Method include_child Create child namespace based on include inheritance rules @param ns: sub-namespace of child context, or None if the
Method remap_args @return: copy of the current remap arguments @rtype: [(str, str)]
Instance Variable arg_names Undocumented
Instance Variable env_args Undocumented
Instance Variable filename Undocumented
Instance Variable include_resolve_dict Undocumented
Instance Variable ns Undocumented
Instance Variable params Undocumented
Instance Variable parent Undocumented
Instance Variable pass_all_args Undocumented
Instance Variable resolve_dict Undocumented
Instance Variable _remap_args Undocumented
def __init__(self, ns, filename, parent=None, params=None, env_args=None, resolve_dict=None, include_resolve_dict=None, arg_names=None):

@param ns: namespace @type ns: str @param filename: name of file this is being loaded from @type filename: str @param resolve_dict: (optional) resolution dictionary for substitution args @type resolve_dict: dict @param include_resolve_dict: special resolution dictionary for <include> tags. Must be None if this is not an <include> context. @type include_resolve_dict: dict @param arg_names: name of args that have been declared in this context @type arg_names: [str]

def add_arg(self, name, default=None, value=None, doc=None):

Add 'arg' to existing context. Args are only valid for their immediate context.

def add_param(self, p):

Add a ~param to the context. ~params are evaluated by any node declarations that occur later in the same context.

@param p: parameter @type p: L{Param}

def add_remap(self, remap):

Add a new remap setting to the context. if a remap already exists with the same from key, it will be removed

@param remap: remap setting @type remap: (str, str)

def child(self, ns):

@param ns: sub-namespace of child context, or None if the
child context shares the same namespace

@type ns: str @return: A child xml context that inherits from this context @rtype: L{LoaderContext}

def include_child(self, ns, filename):

Create child namespace based on include inheritance rules @param ns: sub-namespace of child context, or None if the

child context shares the same namespace

@type ns: str @param filename: name of include file @type filename: str @return: A child xml context that inherits from this context @rtype: L{LoaderContext}jj

def remap_args(self):

@return: copy of the current remap arguments @rtype: [(str, str)]

arg_names =

Undocumented

env_args =

Undocumented

filename =

Undocumented

include_resolve_dict =

Undocumented

ns =

Undocumented

params =

Undocumented

parent =

Undocumented

pass_all_args: bool =

Undocumented

resolve_dict =

Undocumented

_remap_args: list =

Undocumented