(p IArgType, name string, base, index, size uint32)
| 242 | } |
| 243 | |
| 244 | func 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 | |
| 257 | func RegisterPre(name string, type_index, parent_index uint32) IArgType { |
| 258 | // 注册有预设的扩展类型 |
no test coverage detected