void Level::Draw()
{
	TestLevel(1);
	for(unsigned int i=0; i < objects.size(); ++i)
    {
        objects.at(i)->DoDraw();
    }	
}
Beispiel #2
0
	void SysLogger::Write( LogLevelMask const& level, char const* const log, u32_t const& length ) {

		if( !TestLevel( level) ) {
			 return ;
		}

		char head_buffer[4] = {0};
		char log_char = GetLogLevelChar( level );
		sprintf( head_buffer, "[%c]", log_char );

		int total_len = 3 + length ;
		WAWO_ASSERT( total_len <= 10240 );
		char _log[10240]; //total bufferd

		strncpy( _log, head_buffer, 3 );
		strncpy( _log + 3, log, length );
		_log[total_len] = '\0';

		switch( level ) {
			case Logger_Abstract::LOG_LEVEL_DEBUG:
				{
					SysLogger::Syslog( LOG_DEBUG,  _log, total_len );
				}
				break;
			case Logger_Abstract::LOG_LEVEL_INFO:
				{
					SysLogger::Syslog( LOG_INFO, _log, total_len );
				}
				break;
			case Logger_Abstract::LOG_LEVEL_NOTICE:
				{
					SysLogger::Syslog( LOG_NOTICE,  _log, total_len );
				}
				break;
			case Logger_Abstract::LOG_LEVEL_WARN:
				{
					SysLogger::Syslog( LOG_WARNING,  _log, total_len ) ;
				}
				break;
			case Logger_Abstract::LOG_LEVEL_FATAL:
				{
					SysLogger::Syslog( LOG_ERR,  _log, total_len );
				}
				break;
			case Logger_Abstract::LOG_LEVEL_CORE:
				{
					SysLogger::Syslog( LOG_CRIT,  _log, total_len );
				}
				break;
			default:
				{
					char const* unknown_log_str = "unknown log level found";
					SysLogger::Syslog( LOG_DEBUG, unknown_log_str, strlen(unknown_log_str) );
					SysLogger::Syslog( LOG_DEBUG, _log, total_len );
				}
				break;
			}
		}
void Level::DrawWall()
{
	TestLevel(1);
}