MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / detach

Method detach

Engine/source/console/consoleLogger.cpp:160–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158//-----------------------------------------------------------------------------
159
160bool ConsoleLogger::detach()
161{
162
163 // Make sure this is valid before messing with it
164 if( !smInitialized )
165 {
166 if( !init() )
167 {
168 return false;
169 }
170 }
171
172 if( !mLogging )
173 return false;
174
175 // Close filestream
176 mStream.close();
177
178 // Remove this object from the list of active loggers
179 for( S32 i = 0; i < mActiveLoggers.size(); i++ )
180 {
181 if( mActiveLoggers[i] == this )
182 {
183 mActiveLoggers.erase( i );
184 mLogging = false;
185 return true;
186 }
187 }
188
189 return false; // If this happens, it's bad...
190}
191
192//-----------------------------------------------------------------------------
193

Callers 3

initMethod · 0.45
SDL_SYS_DetachThreadFunction · 0.45
consoleLogger.cppFile · 0.45

Calls 4

initFunction · 0.70
closeMethod · 0.65
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected