X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=include%2Fiscriplib.h;h=8f64503355b4ded1267a926dfd20a2dc4f3f42ab;hb=8824506c282ea0240788eaea708532129e6db907;hp=98d85c271a66dd00057307681ef6ba75783ec795;hpb=12b372f89ce109a4db9d510884fbe7d05af79870;p=xonotic%2Fnetradiant.git diff --git a/include/iscriplib.h b/include/iscriplib.h index 98d85c27..8f645033 100644 --- a/include/iscriplib.h +++ b/include/iscriplib.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_ISCRIPLIB_H) +#if !defined( INCLUDED_ISCRIPLIB_H ) #define INCLUDED_ISCRIPLIB_H /// \file iscriplib.h @@ -28,17 +28,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "generic/constant.h" -#define MAXTOKEN 1024 +#define MAXTOKEN 1024 class Tokeniser { public: - virtual void release() = 0; - virtual void nextLine() = 0; - virtual const char* getToken() = 0; - virtual void ungetToken() = 0; - virtual std::size_t getLine() const = 0; - virtual std::size_t getColumn() const = 0; +virtual void release() = 0; +virtual void nextLine() = 0; +virtual const char* getToken() = 0; +virtual void ungetToken() = 0; +virtual std::size_t getLine() const = 0; +virtual std::size_t getColumn() const = 0; }; class TextInputStream; @@ -46,25 +46,25 @@ class TextInputStream; class TokenWriter { public: - virtual void release() = 0; - virtual void nextLine() = 0; - virtual void writeToken(const char* token) = 0; - virtual void writeString(const char* string) = 0; - virtual void writeInteger(int i) = 0; - virtual void writeUnsigned(std::size_t i) = 0; - virtual void writeFloat(double f) = 0; +virtual void release() = 0; +virtual void nextLine() = 0; +virtual void writeToken( const char* token ) = 0; +virtual void writeString( const char* string ) = 0; +virtual void writeInteger( int i ) = 0; +virtual void writeUnsigned( std::size_t i ) = 0; +virtual void writeFloat( double f ) = 0; }; class TextOutputStream; struct _QERScripLibTable { - INTEGER_CONSTANT(Version, 1); - STRING_CONSTANT(Name, "scriptlib"); + INTEGER_CONSTANT( Version, 1 ); + STRING_CONSTANT( Name, "scriptlib" ); - Tokeniser& (* m_pfnNewScriptTokeniser)(TextInputStream& istream); - Tokeniser& (* m_pfnNewSimpleTokeniser)(TextInputStream& istream); - TokenWriter& (* m_pfnNewSimpleTokenWriter)(TextOutputStream& ostream); + Tokeniser& ( *m_pfnNewScriptTokeniser )( TextInputStream & istream ); + Tokeniser& ( *m_pfnNewSimpleTokeniser )( TextInputStream & istream ); + TokenWriter& ( *m_pfnNewSimpleTokenWriter )( TextOutputStream & ostream ); }; #include "modulesystem.h" @@ -77,9 +77,8 @@ template class GlobalModuleRef; typedef GlobalModuleRef<_QERScripLibTable> GlobalScripLibModuleRef; -inline _QERScripLibTable& GlobalScriptLibrary() -{ - return GlobalScripLibModule::getTable(); +inline _QERScripLibTable& GlobalScriptLibrary(){ + return GlobalScripLibModule::getTable(); } #endif