]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/ieclass.h
Merge branch 'q3map2help' into 'master'
[xonotic/netradiant.git] / include / ieclass.h
index 89b86ca974cc68e3471e8777ffd53d530bebe4e1..a50b74a8b2c23a1c35862805baf03dafc54cd581 100644 (file)
@@ -1,34 +1,34 @@
 /*
-Copyright (C) 1999-2006 Id Software, Inc. and contributors.
-For a list of contributors, see the accompanying CONTRIBUTORS file.
+   Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+   For a list of contributors, see the accompanying CONTRIBUTORS file.
 
-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
+ */
 
 /// \file ieclass.h
 /// \brief Entity Class definition loader API.
 
 
-#if !defined(INCLUDED_IECLASS_H)
+#if !defined( INCLUDED_IECLASS_H )
 #define INCLUDED_IECLASS_H
 
 #include "generic/constant.h"
 
-#define        MAX_FLAGS       16
+#define MAX_FLAGS   16
 
 // eclass show flags
 
@@ -45,19 +45,18 @@ class ListAttributeType;
 class EntityClassCollector
 {
 public:
-  virtual void insert(EntityClass* eclass) = 0;
-  virtual void insert(const char* name, const ListAttributeType& list)
-  {
-  }
+virtual void insert( EntityClass* eclass ) = 0;
+virtual void insert( const char* name, const ListAttributeType& list ){
+}
 };
 
 struct EntityClassScanner
 {
-  INTEGER_CONSTANT(Version, 1);
-  STRING_CONSTANT(Name, "eclass");
+       INTEGER_CONSTANT( Version, 1 );
+       STRING_CONSTANT( Name, "eclass" );
 
-  void (*scanFile)(EntityClassCollector& collector, const char* filename);
-  const char* (*getExtension)();
+       void ( *scanFile )( EntityClassCollector& collector, const char* filename );
+       const char* ( *getExtension )( );
 };
 
 #include "modulesystem.h"
@@ -82,7 +81,7 @@ typedef ModulesRef<EntityClassScanner> EClassModulesRef;
 class EntityClassVisitor
 {
 public:
-  virtual void visit(EntityClass* eclass) = 0;
+virtual void visit( EntityClass* eclass ) = 0;
 };
 
 class ModuleObserver;
@@ -90,16 +89,16 @@ class ModuleObserver;
 
 struct EntityClassManager
 {
-  INTEGER_CONSTANT(Version, 1);
-  STRING_CONSTANT(Name, "eclassmanager");
-
-  EntityClass* (*findOrInsert)(const char* name, bool has_brushes);
-  const ListAttributeType* (*findListType)(const char* name);
-  void (*forEach)(EntityClassVisitor& visitor);
-  void (*attach)(ModuleObserver& observer);
-  void (*detach)(ModuleObserver& observer);
-  void (*realise)();
-  void (*unrealise)();
+       INTEGER_CONSTANT( Version, 1 );
+       STRING_CONSTANT( Name, "eclassmanager" );
+
+       EntityClass* ( *findOrInsert )( const char* name, bool has_brushes );
+       const ListAttributeType* ( *findListType )(const char* name);
+       void ( *forEach )( EntityClassVisitor& visitor );
+       void ( *attach )( ModuleObserver& observer );
+       void ( *detach )( ModuleObserver& observer );
+       void ( *realise )();
+       void ( *unrealise )();
 };
 
 template<typename Type>
@@ -110,9 +109,8 @@ template<typename Type>
 class GlobalModuleRef;
 typedef GlobalModuleRef<EntityClassManager> GlobalEntityClassManagerModuleRef;
 
-inline EntityClassManager& GlobalEntityClassManager()
-{
-  return GlobalEntityClassManagerModule::getTable();
+inline EntityClassManager& GlobalEntityClassManager(){
+       return GlobalEntityClassManagerModule::getTable();
 }
 
 #endif