]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/modelskin.h
my own uncrustify run
[xonotic/netradiant.git] / include / modelskin.h
index c01b5f307935713c708756be76e2855428529138..bb5922ee7704b89c48ee666a8c5d353dd9e1b1b2 100644 (file)
@@ -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_MODELSKIN_H)
+#if !defined( INCLUDED_MODELSKIN_H )
 #define INCLUDED_MODELSKIN_H
 
 #include "generic/constant.h"
@@ -28,11 +28,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 class SkinRemap
 {
 public:
-  const char* m_from;
-  const char* m_to;
-  SkinRemap(const char* from, const char* to) : m_from(from), m_to(to)
-  {
-  }
+const char* m_from;
+const char* m_to;
+SkinRemap( const char* from, const char* to ) : m_from( from ), m_to( to ){
+}
 };
 
 typedef Callback1<SkinRemap> SkinRemapCallback;
@@ -41,36 +40,36 @@ class ModuleObserver;
 class ModelSkin
 {
 public:
-  STRING_CONSTANT(Name, "ModelSkin");
-  /// \brief Attach an \p observer whose realise() and unrealise() methods will be called when the skin is loaded or unloaded.
-  virtual void attach(ModuleObserver& observer) = 0;
-  /// \brief Detach an \p observer previously-attached by calling \c attach.
-  virtual void detach(ModuleObserver& observer) = 0;
-  /// \brief Returns true if this skin is currently loaded.
-  virtual bool realised() const = 0;
-  /// \brief Returns the shader identifier that \p name remaps to, or "" if not found or not realised.
-  virtual const char* getRemap(const char* name) const = 0;
-  /// \brief Calls \p callback for each remap pair. Has no effect if not realised.
-  virtual void forEachRemap(const SkinRemapCallback& callback) const = 0;
+STRING_CONSTANT( Name, "ModelSkin" );
+/// \brief Attach an \p observer whose realise() and unrealise() methods will be called when the skin is loaded or unloaded.
+virtual void attach( ModuleObserver& observer ) = 0;
+/// \brief Detach an \p observer previously-attached by calling \c attach.
+virtual void detach( ModuleObserver& observer ) = 0;
+/// \brief Returns true if this skin is currently loaded.
+virtual bool realised() const = 0;
+/// \brief Returns the shader identifier that \p name remaps to, or "" if not found or not realised.
+virtual const char* getRemap( const char* name ) const = 0;
+/// \brief Calls \p callback for each remap pair. Has no effect if not realised.
+virtual void forEachRemap( const SkinRemapCallback& callback ) const = 0;
 };
 
 class SkinnedModel
 {
 public:
-  STRING_CONSTANT(Name, "SkinnedModel");
-  /// \brief Instructs the skinned model to update its skin.
-  virtual void skinChanged() = 0;
+STRING_CONSTANT( Name, "SkinnedModel" );
+/// \brief Instructs the skinned model to update its skin.
+virtual void skinChanged() = 0;
 };
 
 class ModelSkinCache
 {
 public:
-  INTEGER_CONSTANT(Version, 1);
-  STRING_CONSTANT(Name, "modelskin");
-  /// \brief Increments the reference count of and returns a reference to the skin uniquely identified by 'name'.
-  virtual ModelSkin& capture(const char* name) = 0;
-  /// \brief Decrements the reference-count of the skin uniquely identified by 'name'.
-  virtual void release(const char* name) = 0;
+INTEGER_CONSTANT( Version, 1 );
+STRING_CONSTANT( Name, "modelskin" );
+/// \brief Increments the reference count of and returns a reference to the skin uniquely identified by 'name'.
+virtual ModelSkin& capture( const char* name ) = 0;
+/// \brief Decrements the reference-count of the skin uniquely identified by 'name'.
+virtual void release( const char* name ) = 0;
 };
 
 
@@ -84,9 +83,8 @@ template<typename Type>
 class GlobalModuleRef;
 typedef GlobalModuleRef<ModelSkinCache> GlobalModelSkinCacheModuleRef;
 
-inline ModelSkinCache& GlobalModelSkinCache()
-{
-  return GlobalModelSkinCacheModule::getTable();
+inline ModelSkinCache& GlobalModelSkinCache(){
+       return GlobalModelSkinCacheModule::getTable();
 }
 
 #endif