Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
docutils.statemachine.ViewList Class Reference
Inheritance diagram for docutils.statemachine.ViewList:
Inheritance graph
[legend]

Public Member Functions

 __init__ (self, initlist=None, source=None, items=None, parent=None, parent_offset=None)
 
 __str__ (self)
 
 __repr__ (self)
 
 __lt__ (self, other)
 
 __le__ (self, other)
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 __gt__ (self, other)
 
 __ge__ (self, other)
 
 __contains__ (self, item)
 
 __len__ (self)
 
 __getitem__ (self, i)
 
 __setitem__ (self, i, item)
 
 __delitem__ (self, i)
 
 __add__ (self, other)
 
 __radd__ (self, other)
 
 __iadd__ (self, other)
 
 __mul__ (self, n)
 
 __imul__ (self, n)
 
 extend (self, other)
 
 append (self, item, source=None, offset=0)
 
 insert (self, i, item, source=None, offset=0)
 
 pop (self, i=-1)
 
 trim_start (self, n=1)
 
 trim_end (self, n=1)
 
 remove (self, item)
 
 count (self, item)
 
 index (self, item)
 
 reverse (self)
 
 sort (self, *args)
 
 info (self, i)
 
 source (self, i)
 
 offset (self, i)
 
 disconnect (self)
 
 xitems (self)
 
 pprint (self)
 

Public Attributes

 data
 
 items
 
 parent
 
 parent_offset
 

Detailed Description

List with extended functionality: slices of ViewList objects are child
lists, linked to their parents. Changes made to a child list also affect
the parent list.  A child list is effectively a "view" (in the SQL sense)
of the parent list.  Changes to parent lists, however, do *not* affect
active child lists.  If a parent list is changed, any active child lists
should be recreated.

The start and end of the slice can be trimmed using the `trim_start()` and
`trim_end()` methods, without affecting the parent list.  The link between
child and parent lists can be broken by calling `disconnect()` on the
child list.

Also, ViewList objects keep track of the source & offset of each item.
This information is accessible via the `source()`, `offset()`, and
`info()` methods.

Member Function Documentation

◆ disconnect()

docutils.statemachine.ViewList.disconnect (   self)
Break link between this list and parent list.

◆ info()

docutils.statemachine.ViewList.info (   self,
  i 
)
Return source & offset for index `i`.

◆ offset()

docutils.statemachine.ViewList.offset (   self,
  i 
)
Return offset for index `i`.

◆ pprint()

docutils.statemachine.ViewList.pprint (   self)
Print the list in `grep` format (`source:offset:value` lines)

◆ source()

docutils.statemachine.ViewList.source (   self,
  i 
)
Return source for index `i`.

◆ trim_end()

docutils.statemachine.ViewList.trim_end (   self,
  n = 1 
)
Remove items from the end of the list, without touching the parent.

◆ trim_start()

docutils.statemachine.ViewList.trim_start (   self,
  n = 1 
)
Remove items from the start of the list, without touching the parent.

◆ xitems()

docutils.statemachine.ViewList.xitems (   self)
Return iterator yielding (source, offset, value) tuples.

The documentation for this class was generated from the following file: