Back to index

python-cliapp  1.20120630
Public Member Functions | Public Attributes | Static Public Attributes | Properties | Private Attributes
cliapp.settings.Setting Class Reference
Inheritance diagram for cliapp.settings.Setting:
Inheritance 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

 names
 help
 metavar
 group

Static Public Attributes

string action = 'store'
string type = 'string'
int nargs = 1
 choices = None

Properties

 value = property(call_get_value, call_set_value)

Private Attributes

 _string_value

Detailed Description

Definition at line 27 of file settings.py.


Constructor & Destructor Documentation

def cliapp.settings.Setting.__init__ (   self,
  names,
  default,
  help,
  metavar = None,
  group = None 
)

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

Definition at line 34 of file settings.py.

00034 
00035     def __init__(self, names, default, help, metavar=None, group=None):
00036         self.names = names
00037         self.set_value(default)
00038         self.help = help
00039         self.metavar = metavar or self.default_metavar()
00040         self.group = group


Member Function Documentation

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 
)

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 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 

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:

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 
)

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 
)

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]

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

Definition at line 29 of file settings.py.

Reimplemented in cliapp.settings.ChoiceSetting.

Definition at line 32 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.

Reimplemented in cliapp.settings.BooleanSetting.

Definition at line 31 of file settings.py.

string cliapp.settings.Setting.type = 'string' [static]

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: