• Home
  • Raw
  • Download

Lines Matching full:pointer

47 // A field identifies a field in a struct, accessible from a pointer.
60 // zeroField is a noop when calling pointer.offset.
66 // The pointer type is for the table-driven decoder.
67 // The implementation here uses a reflect.Value of pointer type to
68 // create a generic pointer. In pointer_unsafe.go we use unsafe
70 type pointer struct { struct
74 // toPointer converts an interface of pointer type to a pointer
76 func toPointer(i *Message) pointer {
77 return pointer{v: reflect.ValueOf(*i)}
80 // toAddrPointer converts an interface to a pointer that points to
82 func toAddrPointer(i *interface{}, isptr, deref bool) pointer {
89 return pointer{v: u}
92 // valToPointer converts v to a pointer. v must be of pointer type.
93 func valToPointer(v reflect.Value) pointer {
94 return pointer{v: v}
97 // offset converts from a pointer to a structure to a pointer to
99 func (p pointer) offset(f field) pointer { argument
100 return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
103 func (p pointer) isNil() bool { argument
120 func (p pointer) toInt64() *int64 { argument
123 func (p pointer) toInt64Ptr() **int64 { argument
126 func (p pointer) toInt64Slice() *[]int64 { argument
132 func (p pointer) toInt32() *int32 { argument
139 func (p pointer) toInt32Ptr() **int32 {
142 func (p pointer) toInt32Slice() *[]int32 {
146 func (p pointer) getInt32Ptr() *int32 { argument
154 func (p pointer) setInt32Ptr(v int32) { argument
164 func (p pointer) getInt32Slice() []int32 { argument
182 func (p pointer) setInt32Slice(v []int32) { argument
197 func (p pointer) appendInt32Slice(v int32) { argument
201 func (p pointer) toUint64() *uint64 { argument
204 func (p pointer) toUint64Ptr() **uint64 { argument
207 func (p pointer) toUint64Slice() *[]uint64 { argument
210 func (p pointer) toUint32() *uint32 { argument
213 func (p pointer) toUint32Ptr() **uint32 { argument
216 func (p pointer) toUint32Slice() *[]uint32 { argument
219 func (p pointer) toBool() *bool { argument
222 func (p pointer) toBoolPtr() **bool { argument
225 func (p pointer) toBoolSlice() *[]bool { argument
228 func (p pointer) toFloat64() *float64 { argument
231 func (p pointer) toFloat64Ptr() **float64 { argument
234 func (p pointer) toFloat64Slice() *[]float64 { argument
237 func (p pointer) toFloat32() *float32 { argument
240 func (p pointer) toFloat32Ptr() **float32 { argument
243 func (p pointer) toFloat32Slice() *[]float32 { argument
246 func (p pointer) toString() *string { argument
249 func (p pointer) toStringPtr() **string { argument
252 func (p pointer) toStringSlice() *[]string { argument
255 func (p pointer) toBytes() *[]byte { argument
258 func (p pointer) toBytesSlice() *[][]byte { argument
261 func (p pointer) toExtensions() *XXX_InternalExtensions { argument
264 func (p pointer) toOldExtensions() *map[int32]Extension { argument
267 func (p pointer) getPointer() pointer { argument
268 return pointer{v: p.v.Elem()}
270 func (p pointer) setPointer(q pointer) { argument
273 func (p pointer) appendPointer(q pointer) { argument
277 // getPointerSlice copies []*T from p as a new []pointer.
279 func (p pointer) getPointerSlice() []pointer { argument
284 s := make([]pointer, n)
286 s[i] = pointer{v: p.v.Elem().Index(i)}
291 // setPointerSlice copies []pointer into p as a new []*T.
293 func (p pointer) setPointerSlice(v []pointer) { argument
305 // getInterfacePointer returns a pointer that points to the
307 func (p pointer) getInterfacePointer() pointer { argument
309 return pointer{v: p.v.Elem()}
311 …return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct …
314 func (p pointer) asPointerTo(t reflect.Type) reflect.Value { argument