Package user_functions :: Module data :: Class Uf_tables
[hide private]
[frames] | no frames]

Class Uf_tables

source code


The data singleton holding all of the description tables.

Instance Methods [hide private]
user_functions.objects.Table instance
add_table(self, label=None, caption=None, caption_short=None, spacing=True, longtable=False)
Add a new table to the object.
source code
user_functions.objects.Table instance
get_table(self, label)
Return the table matching the given label.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, *args, **kargs)
Replacement method for implementing the singleton design pattern.
source code
Class Variables [hide private]
  _instance = Uf_tables()
  _labels = ['table: min data type patterns', 'table: consistenc...
  _tables = {'table: Consistency testing data types': <user_func...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(self, *args, **kargs)
Static Method

source code 

Replacement method for implementing the singleton design pattern.

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

add_table(self, label=None, caption=None, caption_short=None, spacing=True, longtable=False)

source code 

Add a new table to the object.

Parameters:
  • label (str) - The unique label of the table. This is used to identify tables, and is also used in the table referencing in the LaTeX compilation of the user manual.
  • caption (str) - The caption for the table.
  • caption_short (str) - The optional short caption for the table, used in the LaTeX user manual list of tables section for example.
  • spacing (bool) - A flag which if True will cause empty rows to be placed between elements.
  • longtable (bool) - A special LaTeX flag which if True will cause the longtables package to be used to spread a table across multiple pages. This should only be used for tables that do not fit on a single page.
Returns: user_functions.objects.Table instance
The table object.

get_table(self, label)

source code 

Return the table matching the given label.

Parameters:
  • label (str) - The unique label of the table.
Returns: user_functions.objects.Table instance
The table data container.

Class Variable Details [hide private]

_labels

Value:
['table: min data type patterns',
 'table: consistency testing default values',
 'table: Consistency testing data types',
 'table: J(w) default values',
 'table: J(w) data types',
 'table: diff default values',
 'table: diff data type patterns',
 'table: mf default values',
...

_tables

Value:
{'table: Consistency testing data types': <user_functions.objects.Tabl\
e object at 0x41ae890>,
 'table: J(w) data types': <user_functions.objects.Table object at 0x4\
4470d0>,
 'table: J(w) default values': <user_functions.objects.Table object at\
 0x4447050>,
 'table: Molmol colours': <user_functions.objects.Table object at 0x3c\
926d0>,
...