mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
增加了获取子module个数的方法
This commit is contained in:
@@ -98,6 +98,14 @@ func (slf *BaseModule) GetModuleById(moduleId uint32) IModule {
|
||||
return ret
|
||||
}
|
||||
|
||||
func (slf *BaseModule) GetModuleCount() int {
|
||||
locker := slf.GetRoot().getBaseModule().getLocker()
|
||||
locker.Lock()
|
||||
defer locker.Unlock()
|
||||
|
||||
return len(slf.mapModule)
|
||||
}
|
||||
|
||||
func (slf *BaseModule) genModuleId() uint32 {
|
||||
slf.CurrMaxModuleId++
|
||||
moduleId := slf.CurrMaxModuleId
|
||||
|
||||
Reference in New Issue
Block a user