X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=include%2Fifiletypes.h;h=25d2cac920fffaffd612ccdcdb124b113f3a98b4;hb=8fccad0436210127c9278d0b3646901729964a0e;hp=0d061d2bbfb0b75ef399cf30ae5c0a9564cff7a9;hpb=61c537beac8ac40367b16a2eec937712b04ad63e;p=xonotic%2Fnetradiant.git diff --git a/include/ifiletypes.h b/include/ifiletypes.h index 0d061d2b..25d2cac9 100644 --- a/include/ifiletypes.h +++ b/include/ifiletypes.h @@ -1,25 +1,25 @@ /* -Copyright (C) 2001-2006, William Joseph. -All Rights Reserved. + Copyright (C) 2001-2006, William Joseph. + All Rights Reserved. -This file is part of GtkRadiant. + This file is part of GtkRadiant. -GtkRadiant is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + GtkRadiant is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -GtkRadiant is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + GtkRadiant is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with GtkRadiant; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ -#if !defined(INCLUDED_IFILETYPES_H) +#if !defined( INCLUDED_IFILETYPES_H ) #define INCLUDED_IFILETYPES_H #include "generic/constant.h" @@ -27,36 +27,34 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class filetype_t { public: - filetype_t() - : name(""), pattern("") - { - } - filetype_t(const char* _name, const char* _pattern, bool _can_load = true, bool _can_import = true, bool _can_save = true) - : name(_name), pattern(_pattern), can_load(_can_load), can_import(_can_import), can_save(_can_save) - { - } - const char* name; - const char* pattern; - bool can_load; - bool can_import; - bool can_save; +filetype_t() + : name( "" ), pattern( "" ){ +} +filetype_t( const char* _name, const char* _pattern, bool _can_load = true, bool _can_import = true, bool _can_save = true ) + : name( _name ), pattern( _pattern ), can_load( _can_load ), can_import( _can_import ), can_save( _can_save ){ +} +const char* name; +const char* pattern; +bool can_load; +bool can_import; +bool can_save; }; class IFileTypeList { public: - virtual void addType(const char* moduleName, filetype_t type) = 0; +virtual void addType( const char* moduleName, filetype_t type ) = 0; }; class IFileTypeRegistry { public: - INTEGER_CONSTANT(Version, 1); - STRING_CONSTANT(Name, "filetypes"); +INTEGER_CONSTANT( Version, 1 ); +STRING_CONSTANT( Name, "filetypes" ); - virtual void addType(const char* moduleType, const char* moduleName, filetype_t type) = 0; - virtual void getTypeList(const char* moduleType, IFileTypeList* typelist, bool want_load = false, bool want_import = false, bool want_save = false) = 0; +virtual void addType( const char* moduleType, const char* moduleName, filetype_t type ) = 0; +virtual void getTypeList( const char* moduleType, IFileTypeList* typelist, bool want_load = false, bool want_import = false, bool want_save = false ) = 0; }; #include "modulesystem.h" @@ -69,9 +67,8 @@ template class GlobalModuleRef; typedef GlobalModuleRef GlobalFiletypesModuleRef; -inline IFileTypeRegistry& GlobalFiletypes() -{ - return GlobalFiletypesModule::getTable(); +inline IFileTypeRegistry& GlobalFiletypes(){ + return GlobalFiletypesModule::getTable(); }