Back to index

python-cliapp  1.20120630
Public Member Functions | Public Attributes | Static Public Attributes | Properties
cliapp.settings.ChoiceSetting Class Reference
Inheritance diagram for cliapp.settings.ChoiceSetting:
Inheritance graph
[legend]
Collaboration diagram for cliapp.settings.ChoiceSetting:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def default_metavar
def get_value
def set_value
def call_get_value
def call_set_value
def has_value
def parse_value
def format

Public Attributes

 choices
 names
 help
 metavar
 group

Static Public Attributes

string type = 'choice'
string action = 'store'
int nargs = 1

Properties

 value = property(call_get_value, call_set_value)

Detailed Description

Definition at line 106 of file settings.py.


Constructor & Destructor Documentation

def cliapp.settings.ChoiceSetting.__init__ (   self,
  names,
  choices,
  help,
  metavar = None,
  group = None 
)

Reimplemented from cliapp.settings.Setting.

Definition at line 110 of file settings.py.

00110 
00111     def __init__(self, names, choices, help, metavar=None, group=None):
00112         Setting.__init__(self, names, choices[0], help, metavar=metavar,
00113                          group=group)
00114         self.choices = choices


Member Function Documentation

def cliapp.settings.Setting.call_get_value (   self) [inherited]

Definition at line 50 of file settings.py.

00050 
00051     def call_get_value(self):
00052         return self.get_value()
        

Here is the call graph for this function:

def cliapp.settings.Setting.call_set_value (   self,
  value 
) [inherited]

Definition at line 53 of file settings.py.

00053 
00054     def call_set_value(self, value):
00055         self.set_value(value)

Here is the call graph for this function:

Reimplemented from cliapp.settings.Setting.

Definition at line 115 of file settings.py.

00115 
00116     def default_metavar(self):
00117         return self.names[0].upper()

def cliapp.settings.Setting.format (   self) [inherited]

Reimplemented in cliapp.settings.StringListSetting.

Definition at line 64 of file settings.py.

00064 
00065     def format(self): # pragma: no cover
00066         return str(self.value)
00067 

def cliapp.settings.Setting.get_value (   self) [inherited]

Reimplemented in cliapp.settings.IntegerSetting, cliapp.settings.ByteSizeSetting, cliapp.settings.BooleanSetting, and cliapp.settings.StringListSetting.

Definition at line 44 of file settings.py.

00044 
00045     def get_value(self):
00046         return self._string_value
        

Here is the caller graph for this function:

def cliapp.settings.Setting.has_value (   self) [inherited]

Reimplemented in cliapp.settings.StringListSetting.

Definition at line 58 of file settings.py.

00058 
00059     def has_value(self):
00060         return self.value is not None

def cliapp.settings.Setting.parse_value (   self,
  string 
) [inherited]

Reimplemented in cliapp.settings.StringListSetting.

Definition at line 61 of file settings.py.

00061 
00062     def parse_value(self, string):
00063         self.value = string

def cliapp.settings.Setting.set_value (   self,
  value 
) [inherited]

Reimplemented in cliapp.settings.IntegerSetting, cliapp.settings.ByteSizeSetting, cliapp.settings.BooleanSetting, and cliapp.settings.StringListSetting.

Definition at line 47 of file settings.py.

00047 
00048     def set_value(self, value):
00049         self._string_value = value
        

Here is the caller graph for this function:


Member Data Documentation

string cliapp.settings.Setting.action = 'store' [static, inherited]

Reimplemented in cliapp.settings.BooleanSetting, and cliapp.settings.StringListSetting.

Definition at line 29 of file settings.py.

Reimplemented from cliapp.settings.Setting.

Definition at line 113 of file settings.py.

Definition at line 39 of file settings.py.

Definition at line 37 of file settings.py.

Definition at line 38 of file settings.py.

Definition at line 35 of file settings.py.

int cliapp.settings.Setting.nargs = 1 [static, inherited]

Reimplemented in cliapp.settings.BooleanSetting.

Definition at line 31 of file settings.py.

string cliapp.settings.ChoiceSetting.type = 'choice' [static]

Reimplemented from cliapp.settings.Setting.

Definition at line 108 of file settings.py.


Property Documentation

Reimplemented in cliapp.settings.StringListSetting.

Definition at line 56 of file settings.py.


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