MCPcopy
hub / github.com/davyxu/tabtoy / IndexType

Method IndexType

v2/printer/cpp.go:144–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142}
143
144func (self cppIndexField) IndexType() string {
145
146 switch self.Index.Type {
147 case model.FieldType_Int32:
148 return "int"
149 case model.FieldType_UInt32:
150 return "unsigned int"
151 case model.FieldType_Int64:
152 return "long long"
153 case model.FieldType_UInt64:
154 return "unsigned long long"
155 case model.FieldType_String:
156 return "std::string"
157 case model.FieldType_Float:
158 return "float"
159 case model.FieldType_Bool:
160 return "bool"
161 case model.FieldType_Enum:
162
163 return self.Index.Complex.Name
164 default:
165 log.Errorf("%s can not be index ", self.Index.String())
166 }
167
168 return "unknown"
169}
170
171type cppField struct {
172 *model.FieldDescriptor

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected