示例#1
0
 def apply_parameters(cls, subtypes, names):
     newname = subtypes[1].cassname.decode("hex")
     field_names = [encoded_name.decode("hex") for encoded_name in names[2:]]
     assert len(field_names) == len(subtypes[2:])
     formatter_for(newname)(format_value_utype)
     return type(newname, (cls,), {'subtypes': subtypes[2:],
                                   'cassname': cls.cassname, 'typename': newname, 'fieldnames': field_names})
示例#2
0
 def apply_parameters(cls, subtypes, names):
     newname = subtypes[1].cassname.decode("hex")
     field_names = [encoded_name.decode("hex") for encoded_name in names[2:]]
     assert len(field_names) == len(subtypes[2:])
     formatter_for(newname)(format_value_utype)
     return type(newname, (cls,), {'subtypes': subtypes[2:],
                                   'cassname': cls.cassname, 'typename': newname, 'fieldnames': field_names})
示例#3
0
 def apply_parameters(cls, *subtypes):
     ksname = subtypes[0].cassname
     newname = subtypes[1].cassname.decode("hex")
     field_names = get_field_names(ksname, newname)
     assert len(field_names) == len(subtypes[2:])
     formatter_for(newname)(format_value_utype)
     return type(newname, (cls,), {'subtypes': subtypes[2:],
                                   'cassname': cls.cassname, 'typename': newname, 'fieldnames': field_names})