Package pyx12 :: Module map_if :: Class loop_if
[hide private]

Class loop_if

source code

object --+    
         |    
  x12_node --+
             |
            loop_if

Loop Interface

Instance Methods [hide private]
 
__init__(self, root, parent, my_index)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
debug_print(self) source code
 
__len__(self) source code
string
__repr__(self)
repr(x)
source code
 
get_max_repeat(self) source code
 
get_parent(self) source code
 
get_first_seg(self) source code
 
getnodebypath(self, path)
Returns: matching node, or None is no match
source code
 
get_child_count(self) source code
 
get_child_node_by_idx(self, idx) source code
integer
get_seg_count(self)
Returns: Number of child segments
source code
boolean
is_loop(self) source code
boolean
is_match(self, seg_data)
Returns: Is the segment a match to this loop?
source code
int
get_cur_count(self)
Returns: current count
source code
 
incr_cur_count(self) source code
 
reset_child_count(self)
Set cur_count of child nodes to zero
source code
 
reset_cur_count(self)
Set cur_count of node and child nodes to zero
source code
 
set_cur_count(self, ct) source code
 
get_counts_list(self, ct_list)
Build a list of (path, ct) of the current node and parents Gets the node counts to apply to another map
source code

Inherited from x12_node: get_path, is_composite, is_element, is_first_seg_in_loop, is_map_root, is_segment

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, root, parent, my_index)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

Requires: Must be entered with a libxml2 loop node current

__len__(self)
(Length operator)

source code 
Overrides: x12_node.__len__

__repr__(self)
(Representation operator)

source code 

repr(x)

Returns: string
Overrides: object.__repr__

getnodebypath(self, path)

source code 
Parameters:
  • path (string) - remaining path to match
Returns:
matching node, or None is no match
Overrides: x12_node.getnodebypath

get_child_count(self)

source code 
Overrides: x12_node.get_child_count

get_child_node_by_idx(self, idx)

source code 
Parameters:
  • idx - zero based
Overrides: x12_node.get_child_node_by_idx

get_seg_count(self)

source code 
Returns: integer
Number of child segments

is_loop(self)

source code 
Returns: boolean
Overrides: x12_node.is_loop

is_match(self, seg_data)

source code 
Parameters:
Returns: boolean
Is the segment a match to this loop?

get_cur_count(self)

source code 
Returns: int
current count

get_counts_list(self, ct_list)

source code 

Build a list of (path, ct) of the current node and parents Gets the node counts to apply to another map

Parameters:
  • ct_list (list[(string, int)]) - List to append to