# Class k.d.BaseConverter(object):

Part of kiwi.datatypes View In Hierarchy

Known subclasses: kiwi.datatypes._BaseDateTimeConverter, kiwi.datatypes._BoolConverter, kiwi.datatypes._EnumConverter, kiwi.datatypes._FloatConverter, kiwi.datatypes._IntConverter, kiwi.datatypes._ObjectConverter, kiwi.datatypes._StringConverter, kiwi.datatypes._UnicodeConverter, kiwi.ui.proxywidget._PixbufConverter

Abstract converter used by all datatypes

Class Variables | type |
| name | The name of the datatype.
| align | The alignment of the datatype. Normally right for numbers and dates, left for others. Default is left.

Method | get_compare_function | This can be overriden by a subclass to provide a custom comparison
Method | as_string | Convert the value to a string using the specificed format.
Method | from_string | Convert a value from a string.
Method | get_mask | Returns the mask of the entry or None if not specified.

def get_compare_function(self):
overridden in kiwi.datatypes._BaseDateTimeConverter
This can be overriden by a subclass to provide a custom comparison function.

Returns | cmp

def as_string(self, value, format):
overridden in kiwi.datatypes._BaseDateTimeConverter, kiwi.datatypes._BoolConverter, kiwi.datatypes._EnumConverter, kiwi.datatypes._FloatConverter, kiwi.datatypes._IntConverter, kiwi.datatypes._StringConverter, kiwi.datatypes._UnicodeConverter, kiwi.ui.proxywidget._PixbufConverter
Convert the value to a string using the specificed format.

Parameters | value |
| format |
Returns |

def from_string(self, value):
overridden in kiwi.datatypes._BaseDateTimeConverter, kiwi.datatypes._BoolConverter, kiwi.datatypes._EnumConverter, kiwi.datatypes._FloatConverter, kiwi.datatypes._IntConverter, kiwi.datatypes._StringConverter, kiwi.datatypes._UnicodeConverter, kiwi.ui.proxywidget._PixbufConverter
Convert a value from a string.

Parameters | value |
Returns |

def get_mask(self):
overridden in kiwi.datatypes._BaseDateTimeConverter
Returns the mask of the entry or None if not specified.

Returns | the mask or None.