comparison Applications/BasicApplicationContext.cpp @ 86:02c3a7a4938f wasm

removing of the Start() mechanism
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 May 2017 13:42:50 +0200
parents 8677d95753f8
children f244018a4e4b
comparison
equal deleted inserted replaced
85:bd48431ac285 86:02c3a7a4938f
135 135
136 void BasicApplicationContext::Start() 136 void BasicApplicationContext::Start()
137 { 137 {
138 oracle_.Start(); 138 oracle_.Start();
139 139
140 // TODO REMOVE THIS
140 for (Volumes::iterator it = volumes_.begin(); it != volumes_.end(); ++it) 141 for (Volumes::iterator it = volumes_.begin(); it != volumes_.end(); ++it)
141 { 142 {
142 assert(*it != NULL); 143 assert(*it != NULL);
143 (*it)->Start(); 144 (*it)->Start();
144 } 145 }
146 if (viewport_.HasUpdateContent()) 147 if (viewport_.HasUpdateContent())
147 { 148 {
148 stopped_ = false; 149 stopped_ = false;
149 updateThread_ = boost::thread(UpdateThread, this); 150 updateThread_ = boost::thread(UpdateThread, this);
150 } 151 }
151
152 viewport_.Start();
153 } 152 }
154 153
155 154
156 void BasicApplicationContext::Stop() 155 void BasicApplicationContext::Stop()
157 { 156 {
160 if (updateThread_.joinable()) 159 if (updateThread_.joinable())
161 { 160 {
162 updateThread_.join(); 161 updateThread_.join();
163 } 162 }
164 163
164 // TODO REMOVE THIS
165 for (Volumes::iterator it = volumes_.begin(); it != volumes_.end(); ++it) 165 for (Volumes::iterator it = volumes_.begin(); it != volumes_.end(); ++it)
166 { 166 {
167 assert(*it != NULL); 167 assert(*it != NULL);
168 (*it)->Stop(); 168 (*it)->Stop();
169 } 169 }