mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
增加了获取子module个数的方法
This commit is contained in:
@@ -98,6 +98,14 @@ func (slf *BaseModule) GetModuleById(moduleId uint32) IModule {
|
|||||||
return ret
|
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 {
|
func (slf *BaseModule) genModuleId() uint32 {
|
||||||
slf.CurrMaxModuleId++
|
slf.CurrMaxModuleId++
|
||||||
moduleId := slf.CurrMaxModuleId
|
moduleId := slf.CurrMaxModuleId
|
||||||
|
|||||||
Reference in New Issue
Block a user