Lines Matching refs:var
23 def PbEnum2PyValue(var): argument
32 return getattr(var.scalar_value, var.scalar_type)
35 def PbMask2PyValue(var): argument
44 return getattr(var.scalar_value, var.scalar_type)
47 def PbScalar2PyValue(var): argument
56 return getattr(var.scalar_value, var.scalar_type)
59 def PbString2PyString(var): argument
68 return var.string_value.message
71 def PbVector2PyList(var): argument
81 for curr_value in var.vector_value:
92 def PbArray2PyList(var): argument
102 for curr_value in var.vector_value:
113 def PbStruct2PyDict(var): argument
123 for attr in var.struct_value:
143 def PbPredefined2PyValue(var): argument
152 return var.predefined_type
155 def Convert(var): argument
164 if var.type == CompSpecMsg.TYPE_PREDEFINED:
165 return PbPredefined2PyValue(var)
166 elif var.type == CompSpecMsg.TYPE_SCALAR:
167 return PbScalar2PyValue(var)
168 elif var.type == CompSpecMsg.TYPE_VECTOR:
169 return PbVector2PyList(var)
170 elif var.type == CompSpecMsg.TYPE_STRUCT:
171 return PbStruct2PyDict(var)
172 elif var.type == CompSpecMsg.TYPE_ENUM:
173 return PbEnum2PyValue(var)
174 elif var.type == CompSpecMsg.TYPE_STRING:
175 return PbString2PyString(var)
176 elif var.type == CompSpecMsg.TYPE_MASK:
177 return PbMask2PyValue(var)
179 logging.error("Got unsupported callback arg type %s" % var.type)