tiramisu/doc/option.txt

126 lines
2.2 KiB
Plaintext
Raw Normal View History

.. default-role:: literal
2013-08-29 11:48:34 +02:00
.. module:: tiramisu.option
2013-08-23 11:42:22 +02:00
The options types
===================
Description of Options
----------------------
All the constructors take a ``name`` and a ``doc`` argument as first
2013-09-14 14:44:33 +02:00
arguments to give to the option or option description a name and a description document.
Most constructors take a ``default`` argument that specifies the default
value of the option. If this argument is not supplied the default value
is assumed to be ``None``.
The `Option` base class
-------------------------
2013-09-14 14:44:33 +02:00
It's the abstract base class for almost all options (except the symlink).
.. _optioninit:
.. autoclass:: Option
:special-members:
:members:
All option types
------------------
2013-09-14 14:44:33 +02:00
BoolOption
~~~~~~~~~~
.. autoclass:: BoolOption
:private-members:
2013-09-14 14:44:33 +02:00
IntOption
~~~~~~~~~
.. autoclass:: IntOption
:private-members:
2013-09-14 14:44:33 +02:00
FloatOption
~~~~~~~~~~~
.. autoclass:: FloatOption
:private-members:
2013-09-14 14:44:33 +02:00
StrOption
~~~~~~~~~
.. autoclass:: StrOption
:private-members:
2013-09-14 14:44:33 +02:00
UnicodeOption
~~~~~~~~~~~~~
2013-09-14 14:44:33 +02:00
.. autoclass:: UnicodeOption
:private-members:
2013-09-14 14:44:33 +02:00
SymLinkOption
~~~~~~~~~~~~~
.. autoclass:: SymLinkOption
:private-members:
``SymLinkOption`` redirects to another configuration option in the
configuration, that is :
- retrieves the value of the target,
- can set the value of the target too
2013-09-14 14:44:33 +02:00
IPOption
~~~~~~~~
.. autoclass:: IPOption
2013-09-14 14:44:33 +02:00
:private-members:
PortOption
~~~~~~~~~~
.. autoclass:: PortOption
:private-members:
NetmaskOption
~~~~~~~~~~~~~
.. autoclass:: NetmaskOption
2013-09-14 14:44:33 +02:00
:private-members:
NetworkOption
~~~~~~~~~~~~~
.. autoclass:: NetworkOption
2013-09-14 14:44:33 +02:00
:private-members:
DomainnameOption
~~~~~~~~~~~~~~~~
.. autoclass:: DomainnameOption
2013-09-14 14:44:33 +02:00
:private-members:
2013-09-14 14:44:33 +02:00
ChoiceOption
~~~~~~~~~~~~
.. autoclass:: ChoiceOption
2013-09-14 14:44:33 +02:00
:private-members:
2013-05-21 18:42:56 +02:00
2013-08-29 11:48:34 +02:00
.. _optdescr:
The `OptionDescription` class
-------------------------------
.. autoclass:: OptionDescription
:special-members:
:members:
If you need to access to an option object, you can do it with the
OptionDescription object. Not only the value of the option by attribute access,
but the option object itself that lives behind the scene. It can always be
accessed internally. The option objects are in the `_children`
`OptionDescription`'s attribute.