- RadiantFileTypeRegistry()
- {
- addType("*", "*", filetype_t("All Files", "*.*"));
- }
- void addType(const char* moduleType, const char* moduleName, filetype_t type)
- {
- m_typelists[moduleType].push_back(filetype_copy_t(moduleName, type));
- }
- void getTypeList(const char* moduleType, IFileTypeList* typelist, bool want_load, bool want_import, bool want_save)
- {
- filetype_list_t& list_ref = m_typelists[moduleType];
- for(filetype_list_t::iterator i = list_ref.begin(); i != list_ref.end(); ++i)
- {
- if(want_load && !(*i).m_can_load) return;
- if(want_import && !(*i).m_can_import) return;
- if(want_save && !(*i).m_can_save) return;
- typelist->addType((*i).getModuleName(), (*i).getType());
- }
- }
+RadiantFileTypeRegistry(){
+ addType( "*", "*", filetype_t( "All Files", "*.*" ) );
+}
+void addType( const char* moduleType, const char* moduleName, filetype_t type ){
+ m_typelists[moduleType].push_back( filetype_copy_t( moduleName, type ) );
+}
+void getTypeList( const char* moduleType, IFileTypeList* typelist, bool want_load, bool want_import, bool want_save ){
+ filetype_list_t& list_ref = m_typelists[moduleType];
+ for ( filetype_list_t::iterator i = list_ref.begin(); i != list_ref.end(); ++i )
+ {
+ if ( want_load && !( *i ).m_can_load ) {
+ return;
+ }
+ if ( want_import && !( *i ).m_can_import ) {
+ return;
+ }
+ if ( want_save && !( *i ).m_can_save ) {
+ return;
+ }
+ typelist->addType( ( *i ).getModuleName(), ( *i ).getType() );
+ }
+}