-RadiantModuleServer() : m_error( false ){
-}
-
-void setError( bool error ){
- m_error = error;
-}
-bool getError() const {
- return m_error;
-}
-
-TextOutputStream& getOutputStream(){
- return globalOutputStream();
-}
-TextOutputStream& getErrorStream(){
- return globalErrorStream();
-}
-DebugMessageHandler& getDebugMessageHandler(){
- return globalDebugMessageHandler();
-}
-
-void registerModule( const char* type, int version, const char* name, Module& module ){
- if ( !m_modules.insert( Modules_::value_type( ModuleKey( ModuleType( type, version ), name ), &module ) ).second ) {
- globalErrorStream() << "module already registered: type=" << makeQuoted( type ) << " name=" << makeQuoted( name ) << "\n";
- }
- else
- {
- globalOutputStream() << "Module Registered: type=" << makeQuoted( type ) << " version=" << makeQuoted( version ) << " name=" << makeQuoted( name ) << "\n";
- }
-}
-
-Module* findModule( const char* type, int version, const char* name ) const {
- Modules_::const_iterator i = m_modules.find( ModuleKey( ModuleType( type, version ), name ) );
- if ( i != m_modules.end() ) {
- return ( *i ).second;
- }
- return 0;
-}
-
-void foreachModule( const char* type, int version, const Visitor& visitor ){
- for ( Modules_::const_iterator i = m_modules.begin(); i != m_modules.end(); ++i )
- {
- if ( string_equal( ( *i ).first.first.first.c_str(), type ) ) {
- visitor.visit( ( *i ).first.second.c_str(), *( *i ).second );
- }
- }
-}
+ RadiantModuleServer() : m_error(false)
+ {
+ }
+
+ void setError(bool error)
+ {
+ m_error = error;
+ }
+
+ bool getError() const
+ {
+ return m_error;
+ }
+
+ TextOutputStream &getOutputStream()
+ {
+ return globalOutputStream();
+ }
+
+ TextOutputStream &getErrorStream()
+ {
+ return globalErrorStream();
+ }
+
+ DebugMessageHandler &getDebugMessageHandler()
+ {
+ return globalDebugMessageHandler();
+ }
+
+ void registerModule(const char *type, int version, const char *name, Module &module)
+ {
+ if (!m_modules.insert(Modules_::value_type(ModuleKey(ModuleType(type, version), name), &module)).second) {
+ globalErrorStream() << "module already registered: type=" << makeQuoted(type) << " name="
+ << makeQuoted(name) << "\n";
+ } else {
+ globalOutputStream() << "Module Registered: type=" << makeQuoted(type) << " version=" << makeQuoted(version)
+ << " name=" << makeQuoted(name) << "\n";
+ }
+ }
+
+ Module *findModule(const char *type, int version, const char *name) const
+ {
+ Modules_::const_iterator i = m_modules.find(ModuleKey(ModuleType(type, version), name));
+ if (i != m_modules.end()) {
+ return (*i).second;
+ }
+ return 0;
+ }
+
+ void foreachModule(const char *type, int version, const Visitor &visitor)
+ {
+ for (Modules_::const_iterator i = m_modules.begin(); i != m_modules.end(); ++i) {
+ if (string_equal((*i).first.first.first.c_str(), type)) {
+ visitor.visit((*i).first.second.c_str(), *(*i).second);
+ }
+ }
+ }