Lines Matching refs:instance

61   auto instance = started_modules_.find(module);  in Get()  local
63 instance != started_modules_.end(), in Get()
65 return instance->second; in Get()
78 void ModuleRegistry::set_registry_and_handler(Module* instance, Thread* thread) const { in set_registry_and_handler() argument
79 instance->registry_ = this; in set_registry_and_handler()
80 instance->handler_ = new Handler(thread); in set_registry_and_handler()
90 Module* instance = module->ctor_(); in Start() local
91 set_registry_and_handler(instance, thread); in Start()
93 log::info("Starting dependencies of {}", instance->ToString()); in Start()
94 instance->ListDependencies(&instance->dependencies_); in Start()
95 Start(&instance->dependencies_, thread); in Start()
97 log::info("Finished starting dependencies and calling Start() of {}", instance->ToString()); in Start()
99 last_instance_ = "starting " + instance->ToString(); in Start()
100 instance->Start(); in Start()
102 started_modules_[module] = instance; in Start()
103 log::info("Started {}", instance->ToString()); in Start()
104 return instance; in Start()
110 auto instance = started_modules_.find(*it); in StopAll() local
112 instance != started_modules_.end(), "assert failed: instance != started_modules_.end()"); in StopAll()
113 last_instance_ = "stopping " + instance->second->ToString(); in StopAll()
116 log::info("Stopping Handler of Module {}", instance->second->ToString()); in StopAll()
117 instance->second->handler_->Clear(); in StopAll()
118 instance->second->handler_->WaitUntilStopped(kModuleStopTimeout); in StopAll()
119 log::info("Stopping Module {}", instance->second->ToString()); in StopAll()
120 instance->second->Stop(); in StopAll()
123 auto instance = started_modules_.find(*it); in StopAll() local
125 instance != started_modules_.end(), "assert failed: instance != started_modules_.end()"); in StopAll()
126 delete instance->second->handler_; in StopAll()
127 delete instance->second; in StopAll()
128 started_modules_.erase(instance); in StopAll()