MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / Register

Function Register

user/argtype/iargtype.go:244–255  ·  view source on GitHub ↗
(p IArgType, name string, base, index, size uint32)

Source from the content-addressed store, hash-verified

242}
243
244func Register(p IArgType, name string, base, index, size uint32) {
245 // 注册有预设的基础类型
246 if p == nil {
247 panic("Register ArgType is nil...")
248 }
249 p.Init(name, base, index, size)
250 type_index := p.GetTypeIndex()
251 if at, dup := arg_types[type_index]; dup {
252 panic(fmt.Sprintf("duplicate register for ArgType name=%s index=%d", at.GetName(), at.GetTypeIndex()))
253 }
254 arg_types[type_index] = p
255}
256
257func RegisterPre(name string, type_index, parent_index uint32) IArgType {
258 // 注册有预设的扩展类型

Callers 1

initFunction · 0.70

Calls 3

InitMethod · 0.65
GetTypeIndexMethod · 0.65
GetNameMethod · 0.65

Tested by

no test coverage detected