An implementation of ClassCoding. The subclass must override the method get_template() to return a list of pairs. The first element of each pair is an arbitrary string used to identify the field; the second element is the name of the field.
The programmer may change the name of the field afterwards; for example value may be re-named initial_value, and the data would still be restored correctly.
Alternatively, any of the pairs may be a string field name, in which the label is the field name itself. This does not permit the field name to change without rendering the encoded string invalid.
# This will save the three fields {increment_size}, {value} and {is_range_flag}. method get_template() return [ ["Increment Size", "increment_size"], ["Value", "value"], ["Is Range Flag", "is_range_flag"]] end
Class summary |
Methods inherited from lang::ClassCoding |
post_decode() pre_encode() |
Methods defined in this class |
decode_obj(e) encode_obj(e) get_template() load_map() load_template() |
Method detail |