phystricks
Public Member Functions | Public Attributes | List of all members
phystricks.src.Separator.SeparatorList Class Reference

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. More...

Inheritance diagram for phystricks.src.Separator.SeparatorList:
Inheritance graph
[legend]
Collaboration diagram for phystricks.src.Separator.SeparatorList:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self)
 
def title_list (self)
 
def new_separator (self, title, number=None)
 
def code (self, not_to_be_used=[])
 
def fusion (self, title_list, new_title)
 
def __getitem__ (self, i)
 

Public Attributes

 separator_list
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Represent a dictionary of :class:`Separator`

Constructor & Destructor Documentation

def phystricks.src.Separator.SeparatorList.__init__ (   self)

Member Function Documentation

def phystricks.src.Separator.SeparatorList.__getitem__ (   self,
  i 
)
One can call a separator by its title or its number.
def phystricks.src.Separator.SeparatorList.code (   self,
  not_to_be_used = [] 
)
def phystricks.src.Separator.SeparatorList.fusion (   self,
  title_list,
  new_title 
)
Remove of the list the separators whose names are in the `title_list`
and add a new separator with the fusion code at the place
where the *first* one was.

INPUT :

- ``title_list`` - a list of `str` that are name of separators
           supposed to be part of `self.separator_list`

- ``new_title`` - the title of the new separator that will be
            created.

Schematically,

"ONE": "first code"
"TWO": "second code"
"THREE": "third code"
"FOUR": "fourth code"

If one fusion the second and third with the name "NEW", we get

"ONE": "first code"
"NEW" : "second code third code"
"FOUR": "fourth code"

NOTE:

It respect the order. So if the `title_list` comes in the order `["THREE","TWO"]`, it first orders
the list to `["TWO","THREE"]`
def phystricks.src.Separator.SeparatorList.new_separator (   self,
  title,
  number = None 
)
def phystricks.src.Separator.SeparatorList.title_list (   self)

Member Data Documentation

phystricks.src.Separator.SeparatorList.separator_list

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