1.1.2.4. gnr.core.gnrclasses

Last page update: November 23, 2011

Classes:

Complete reference:

1.1.2.4.2. gnr.core.gnrclasses - The complete reference list

class gnr.core.gnrclasses.GnrClassCatalog

TODO

addClass(cls, key, aliases=None, altcls=None, align='L', empty=None)

Add a python class to the list of objects known by the Catalog.

Parameters:
  • cls – the class itself by reference
  • key – a string, is a short name of the class, as found in textual values to parse or write
  • aliases – other keys to parse using this class.
  • altcls – other classes to write in the same way. All values will be parsed with the main class.
  • align – TODO. Default value is L
  • empty – the class or value to be used for empty parsed values (example '' for strings).
addParser(cls, funct)

Given a class to convert, specifies the function to use for the actual conversion from text:

Parameters:
  • cls – the class to be converted
  • funct – is a function by reference or lambda, will receive a text and return an instance
addSerializer(mode, cls, funct)

Given a mode and a class to convert, specifies the function to use for the actual conversion:

Parameters:
  • mode – TODO
  • cls – the class to be converted
  • funct – is a function by reference or lambda, will receive an instance and return an appropriate value for the conversion mode
asText(o, quoted=False, translate_cb=None)

Add???

Parameters:
  • o – TODO
  • quoted – TODO. Default value is False
  • translate_cb – TODO.
Returns:

TODO

asTextAndType(o, translate_cb=None)

Add???

Parameters:
  • o – TODO
  • translate_cb – TODO.
Returns:

TODO

asTypedText(o, quoted=False, translate_cb=None)

Add???

Parameters:
  • o – TODO
  • quoted – TODO. Default value is False
  • translate_cb – TODO.
Returns:

TODO

fromJson(data)

Add???

Parameters:data – TODO
Returns:TODO
fromText(txt, clsname, **kwargs)

Add???

Parameters:
  • txt – TODO
  • clsname – TODO
Returns:

TODO

fromTypedText(txt, **kwargs)

Add???

Parameters:txt – TODO
Returns:TODO
getAlign(key)

Add???

Parameters:key – TODO
Returns:TODO
getClass(name)

Add???

Parameters:name – TODO
Returns:TODO
getClassKey(o)

Add???

Parameters:o – TODO
Returns:TODO
getEmpty(key)

Add???

Parameters:key – TODO
Returns:TODO
getType(o)

Add???

Parameters:o – TODO
Returns:TODO
parse_date(txt, workdate=None)

Add???

Parameters:
  • txt – TODO
  • workdate – the workdate
parse_datetime(txt, workdate=None)

Add???

Parameters:
  • txt – TODO
  • workdate – the workdate
parse_float(txt)

Add???

Parameters:txt – TODO
Returns:TODO
parse_time(txt)

Add???

Parameters:txt – TODO
Returns:TODO
quoted(s)

Add???

Parameters:s – TODO
Returns:TODO
standardClasses()

TODO

toJson(data)

Add???

Parameters:data – TODO
Returns:TODO