Changeset 44 for trunk/src/framework
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Location:
- trunk/src/framework
- Files:
-
- 33 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/framework/Dynamic/FactoryHolder.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_FACTORY_HOLDER20 #define MANGOS_FACTORY_HOLDER21 #ifndef TRINITY_FACTORY_HOLDER 22 #define TRINITY_FACTORY_HOLDER 21 23 22 24 #include "Platform/Define.h" … … 28 30 */ 29 31 template<class T, class Key = std::string> 30 class MANGOS_DLL_DECL FactoryHolder32 class TRINITY_DLL_DECL FactoryHolder 31 33 { 32 34 public: 33 35 typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolderRegistry; 34 typedef MaNGOS::Singleton<FactoryHolderRegistry > FactoryHolderRepository;36 typedef Trinity::Singleton<FactoryHolderRegistry > FactoryHolderRepository; 35 37 36 38 FactoryHolder(Key k) : i_key(k) {} -
trunk/src/framework/Dynamic/ObjectRegistry.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_OBJECTREGISTRY_H20 #define MANGOS_OBJECTREGISTRY_H21 #ifndef TRINITY_OBJECTREGISTRY_H 22 #define TRINITY_OBJECTREGISTRY_H 21 23 22 24 #include "Platform/Define.h" … … 30 32 */ 31 33 template<class T, class Key = std::string> 32 class MANGOS_DLL_DECL ObjectRegistry34 class TRINITY_DLL_DECL ObjectRegistry 33 35 { 34 36 public: … … 94 96 private: 95 97 RegistryMapType i_registeredObjects; 96 friend class MaNGOS::OperatorNew<ObjectRegistry<T, Key> >;98 friend class Trinity::OperatorNew<ObjectRegistry<T, Key> >; 97 99 98 100 // protected for friend use since it should be a singleton -
trunk/src/framework/GameSystem/Grid.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_GRID_H20 #define MANGOS_GRID_H21 #ifndef TRINITY_GRID_H 22 #define TRINITY_GRID_H 21 23 22 24 /* 23 25 @class Grid 24 Grid is a logical segment of the game world represented inside MaNGOS.26 Grid is a logical segment of the game world represented inside TrinIty. 25 27 Grid is bind at compile time to a particular type of object which 26 28 we call it the object of interested. There are many types of loader, … … 44 46 class WORLD_OBJECT_TYPES, 45 47 class GRID_OBJECT_TYPES, 46 class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>48 class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT> 47 49 > 48 class MANGOS_DLL_DECL Grid50 class TRINITY_DLL_DECL Grid 49 51 { 50 52 // allows the GridLoader to access its internals -
trunk/src/framework/GameSystem/GridLoader.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_GRIDLOADER_H20 #define MANGOS_GRIDLOADER_H21 #ifndef TRINITY_GRIDLOADER_H 22 #define TRINITY_GRIDLOADER_H 21 23 22 24 /** … … 41 43 class GRID_OBJECT_TYPES 42 44 > 43 class MANGOS_DLL_DECL GridLoader45 class TRINITY_DLL_DECL GridLoader 44 46 { 45 47 public: -
trunk/src/framework/GameSystem/GridRefManager.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/GameSystem/GridReference.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 … … 26 28 27 29 template<class OBJECT> 28 class MANGOS_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>30 class TRINITY_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT> 29 31 { 30 32 protected: -
trunk/src/framework/GameSystem/NGrid.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_NGRID_H20 #define MANGOS_NGRID_H21 #ifndef TRINITY_NGRID_H 22 #define TRINITY_NGRID_H 21 23 22 24 /** NGrid is nothing more than a wrapper of the Grid with an NxN cells … … 59 61 class WORLD_OBJECT_TYPES, 60 62 class GRID_OBJECT_TYPES, 61 class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>63 class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT> 62 64 > 63 class MANGOS_DLL_DECL NGrid65 class TRINITY_DLL_DECL NGrid 64 66 { 65 67 public: -
trunk/src/framework/GameSystem/TypeContainer.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_TYPECONTAINER_H20 #define MANGOS_TYPECONTAINER_H21 #ifndef TRINITY_TYPECONTAINER_H 22 #define TRINITY_TYPECONTAINER_H 21 23 22 24 /* … … 96 98 97 99 template<class OBJECT_TYPES> 98 class MANGOS_DLL_DECL TypeMapContainer100 class TRINITY_DLL_DECL TypeMapContainer 99 101 { 100 102 public: 101 template<class SPECIFIC_TYPE> size_t Count() const { return MaNGOS::Count(i_elements, (SPECIFIC_TYPE*)NULL); }103 template<class SPECIFIC_TYPE> size_t Count() const { return Trinity::Count(i_elements, (SPECIFIC_TYPE*)NULL); } 102 104 103 template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return MaNGOS::Find(i_elements, hdl,fake); }105 template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return Trinity::Find(i_elements, hdl,fake); } 104 106 105 107 /// find a specific type of object in the container 106 template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return MaNGOS::Find(i_elements, hdl,fake); }108 template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return Trinity::Find(i_elements, hdl,fake); } 107 109 108 110 /// inserts a specific object into the container 109 111 template<class SPECIFIC_TYPE> bool insert(OBJECT_HANDLE hdl, SPECIFIC_TYPE *obj) 110 112 { 111 SPECIFIC_TYPE* t = MaNGOS::Insert(i_elements, obj, hdl);113 SPECIFIC_TYPE* t = Trinity::Insert(i_elements, obj, hdl); 112 114 return (t != NULL); 113 115 } … … 116 118 template<class SPECIFIC_TYPE> bool remove(SPECIFIC_TYPE* obj, OBJECT_HANDLE hdl) 117 119 { 118 SPECIFIC_TYPE* t = MaNGOS::Remove(i_elements, obj, hdl);120 SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj, hdl); 119 121 return (t != NULL); 120 122 } -
trunk/src/framework/GameSystem/TypeContainerFunctions.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 … … 30 32 #include <map> 31 33 32 namespace MaNGOS34 namespace Trinity 33 35 { 34 36 /* ContainerMapList Helpers */ -
trunk/src/framework/GameSystem/TypeContainerFunctionsPtr.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 … … 30 32 #include <map> 31 33 32 namespace MaNGOS34 namespace Trinity 33 35 { 34 36 /* ContainerMapList Helpers */ -
trunk/src/framework/GameSystem/TypeContainerVisitor.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_TYPECONTAINERVISITOR_H20 #define MANGOS_TYPECONTAINERVISITOR_H21 #ifndef TRINITY_TYPECONTAINERVISITOR_H 22 #define TRINITY_TYPECONTAINERVISITOR_H 21 23 22 24 /* … … 96 98 97 99 template<class VISITOR, class TYPE_CONTAINER> 98 class MANGOS_DLL_DECL TypeContainerVisitor100 class TRINITY_DLL_DECL TypeContainerVisitor 99 101 { 100 102 public: -
trunk/src/framework/Makefile.am
r23 r44 5 5 # This program is free software; you can redistribute it and/or modify 6 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 3of the License, or7 # the Free Software Foundation; either version 2 of the License, or 8 8 # (at your option) any later version. 9 9 # … … 65 65 Utilities/TypeList.h 66 66 67 -
trunk/src/framework/Network/SocketDefines.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_SOCKETDEFINES_H20 #define MANGOS_SOCKETDEFINES_H21 #ifndef TRINITY_SOCKETDEFINES_H 22 #define TRINITY_SOCKETDEFINES_H 21 23 22 24 #ifdef WIN32 -
trunk/src/framework/Platform/CompilerDefs.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_COMPILERDEFS_H20 #define MANGOS_COMPILERDEFS_H21 #ifndef TRINITY_COMPILERDEFS_H 22 #define TRINITY_COMPILERDEFS_H 21 23 22 24 #define PLATFORM_WINDOWS 0 -
trunk/src/framework/Platform/Define.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_DEFINE_H20 #define MANGOS_DEFINE_H21 #ifndef TRINITY_DEFINE_H 22 #define TRINITY_DEFINE_H 21 23 22 24 #include "Platform/CompilerDefs.h" … … 88 90 */ 89 91 90 #define MANGOS_LITTLEENDIAN 091 #define MANGOS_BIGENDIAN 192 93 #if !defined( MANGOS_ENDIAN)92 #define TRINITY_LITTLEENDIAN 0 93 #define TRINITY_BIGENDIAN 1 94 95 #if !defined(TRINITY_ENDIAN) 94 96 # if defined(LITTLE_ENDIAN) || defined(BIG_ENDIAN) 95 97 # if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) 96 98 # if defined(BYTE_ORDER) 97 99 # if (BYTE_ORDER == LITTLE_ENDIAN) 98 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN100 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 99 101 # elif (BYTE_ORDER == BIG_ENDIAN) 100 # define MANGOS_ENDIAN MANGOS_BIGENDIAN102 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 101 103 # endif 102 104 # endif 103 105 # elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) 104 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN106 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 105 107 # elif !defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) 106 # define MANGOS_ENDIAN MANGOS_BIGENDIAN108 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 107 109 # endif 108 110 # elif defined(_LITTLE_ENDIAN) || defined(_BIG_ENDIAN) … … 110 112 # if defined(_BYTE_ORDER) 111 113 # if (_BYTE_ORDER == _LITTLE_ENDIAN) 112 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN114 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 113 115 # elif (_BYTE_ORDER == _BIG_ENDIAN) 114 # define MANGOS_ENDIAN MANGOS_BIGENDIAN116 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 115 117 # endif 116 118 # endif 117 119 # elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) 118 # define MANGOS_ENDIAN MANGOS_LITTLE_ENDIAN120 # define TRINITY_ENDIAN TRINITY_LITTLE_ENDIAN 119 121 # elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) 120 # define MANGOS_ENDIAN MANGOS_BIGENDIAN122 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 121 123 # endif 122 124 # elif 0 /* **** EDIT HERE IF NECESSARY **** */ 123 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN125 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 124 126 # elif 0 /* **** EDIT HERE IF NECESSARY **** */ 125 # define MANGOS_ENDIAN MANGOS_BIGENDIAN127 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 126 128 # elif (('1234' >> 24) == '1') 127 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN129 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 128 130 # elif (('4321' >> 24) == '1') 129 # define MANGOS_ENDIAN MANGOS_BIGENDIAN130 # else 131 # define MANGOS_ENDIAN MANGOS_LITTLEENDIAN131 # define TRINITY_ENDIAN TRINITY_BIGENDIAN 132 # else 133 # define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 132 134 # endif 133 135 #endif … … 136 138 137 139 #if PLATFORM == PLATFORM_WINDOWS 138 #define MANGOS_EXPORT __declspec(dllexport)139 #define MANGOS_LIBRARY_HANDLE HMODULE140 #define MANGOS_LOAD_LIBRARY(a) LoadLibrary(a)141 #define MANGOS_CLOSE_LIBRARY FreeLibrary142 #define MANGOS_GET_PROC_ADDR GetProcAddress143 #define MANGOS_IMPORT __cdecl144 #define MANGOS_SCRIPT_EXT ".dll"145 #define MANGOS_SCRIPT_NAME "TrinityScript"146 #else 147 #define MANGOS_LIBRARY_HANDLE void*148 #define MANGOS_EXPORT export149 #define MANGOS_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW)150 #define MANGOS_CLOSE_LIBRARY dlclose151 #define MANGOS_GET_PROC_ADDR dlsym140 #define TRINITY_EXPORT __declspec(dllexport) 141 #define TRINITY_LIBRARY_HANDLE HMODULE 142 #define TRINITY_LOAD_LIBRARY(a) LoadLibrary(a) 143 #define TRINITY_CLOSE_LIBRARY FreeLibrary 144 #define TRINITY_GET_PROC_ADDR GetProcAddress 145 #define TRINITY_IMPORT __cdecl 146 #define TRINITY_SCRIPT_EXT ".dll" 147 #define TRINITY_SCRIPT_NAME "TrinityScript" 148 #else 149 #define TRINITY_LIBRARY_HANDLE void* 150 #define TRINITY_EXPORT export 151 #define TRINITY_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW) 152 #define TRINITY_CLOSE_LIBRARY dlclose 153 #define TRINITY_GET_PROC_ADDR dlsym 152 154 153 155 #if defined(__APPLE_CC__) && defined(BIG_ENDIAN) 154 #define MANGOS_IMPORT __attribute__ ((longcall))155 #else 156 #define MANGOS_IMPORT __attribute__ ((cdecl))157 #endif 158 159 #define MANGOS_SCRIPT_EXT ".so"160 #define MANGOS_SCRIPT_NAME "libtrinityscript"156 #define TRINITY_IMPORT __attribute__ ((longcall)) 157 #else 158 #define TRINITY_IMPORT __attribute__ ((cdecl)) 159 #endif 160 161 #define TRINITY_SCRIPT_EXT ".so" 162 #define TRINITY_SCRIPT_NAME "libtrinityscript" 161 163 #endif 162 164 163 165 #ifdef WIN32 164 #ifdef MANGOS_WIN32_DLL_IMPORT165 166 #define MANGOS_DLL_DECL __declspec(dllimport)167 #else 168 #ifdef MANGOS_WIND_DLL_EXPORT169 #define MANGOS_DLL_DECL __declspec(dllexport)170 #else 171 #define MANGOS_DLL_DECL172 #endif 173 #endif 174 175 #else 176 #define MANGOS_DLL_DECL166 #ifdef TRINITY_WIN32_DLL_IMPORT 167 168 #define TRINITY_DLL_DECL __declspec(dllimport) 169 #else 170 #ifdef TRINITY_WIND_DLL_EXPORT 171 #define TRINITY_DLL_DECL __declspec(dllexport) 172 #else 173 #define TRINITY_DLL_DECL 174 #endif 175 #endif 176 177 #else 178 #define TRINITY_DLL_DECL 177 179 #endif 178 180 179 181 #ifndef DEBUG 180 #define MANGOS_INLINE inline181 #else 182 #ifndef MANGOS_DEBUG183 #define MANGOS_DEBUG184 #endif 185 #define MANGOS_INLINE182 #define TRINITY_INLINE inline 183 #else 184 #ifndef TRINITY_DEBUG 185 #define TRINITY_DEBUG 186 #endif 187 #define TRINITY_INLINE 186 188 #endif 187 189 … … 210 212 211 213 #if PLATFORM == PLATFORM_WINDOWS 212 # define MANGOS_DLL_SPEC __declspec(dllexport)214 # define TRINITY_DLL_SPEC __declspec(dllexport) 213 215 # ifndef DECLSPEC_NORETURN 214 216 # define DECLSPEC_NORETURN __declspec(noreturn) 215 217 # endif 216 218 #else 217 # define MANGOS_DLL_SPEC219 # define TRINITY_DLL_SPEC 218 220 # define DECLSPEC_NORETURN 219 221 #endif -
trunk/src/framework/Policies/CreationPolicy.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_CREATIONPOLICY_H20 #define MANGOS_CREATIONPOLICY_H21 #ifndef TRINITY_CREATIONPOLICY_H 22 #define TRINITY_CREATIONPOLICY_H 21 23 22 24 #include <stdlib.h> 23 25 #include "Platform/Define.h" 24 26 25 namespace MaNGOS27 namespace Trinity 26 28 { 27 29 /** … … 29 31 */ 30 32 template <class T> 31 class MANGOS_DLL_DECL OperatorNew33 class TRINITY_DLL_DECL OperatorNew 32 34 { 33 35 public: … … 41 43 */ 42 44 template <class T> 43 class MANGOS_DLL_DECL LocalStaticCreation45 class TRINITY_DLL_DECL LocalStaticCreation 44 46 { 45 47 union MaxAlign … … 70 72 */ 71 73 template<class T> 72 class MANGOS_DLL_DECL CreateUsingMalloc74 class TRINITY_DLL_DECL CreateUsingMalloc 73 75 { 74 76 public: … … 91 93 */ 92 94 template<class T, class CALL_BACK> 93 class MANGOS_DLL_DECL CreateOnCallBack95 class TRINITY_DLL_DECL CreateOnCallBack 94 96 { 95 97 public: -
trunk/src/framework/Policies/ObjectLifeTime.cpp
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 … … 20 22 #include "ObjectLifeTime.h" 21 23 22 namespace MaNGOS24 namespace Trinity 23 25 { 24 26 extern "C" void external_wrapper(void *p) … … 27 29 } 28 30 29 void MANGOS_DLL_SPEC at_exit( void (*func)() )31 void TRINITY_DLL_SPEC at_exit( void (*func)() ) 30 32 { 31 33 external_wrapper((void*)func); -
trunk/src/framework/Policies/ObjectLifeTime.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_OBJECTLIFETIME_H20 #define MANGOS_OBJECTLIFETIME_H21 #ifndef TRINITY_OBJECTLIFETIME_H 22 #define TRINITY_OBJECTLIFETIME_H 21 23 22 24 #include <stdexcept> … … 25 27 typedef void (* Destroyer)(void); 26 28 27 namespace MaNGOS29 namespace Trinity 28 30 { 29 void MANGOS_DLL_SPEC at_exit( void (*func)() );31 void TRINITY_DLL_SPEC at_exit( void (*func)() ); 30 32 31 33 template <class T> 32 class MANGOS_DLL_DECL ObjectLifeTime34 class TRINITY_DLL_DECL ObjectLifeTime 33 35 { 34 36 public: -
trunk/src/framework/Policies/Singleton.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_SINGLETON_H20 #define MANGOS_SINGLETON_H21 #ifndef TRINITY_SINGLETON_H 22 #define TRINITY_SINGLETON_H 21 23 22 24 /** … … 28 30 #include "ObjectLifeTime.h" 29 31 30 namespace MaNGOS32 namespace Trinity 31 33 { 32 34 template 33 35 < 34 36 typename T, 35 class ThreadingModel = MaNGOS::SingleThreaded<T>,36 class CreatePolicy = MaNGOS::OperatorNew<T>,37 class LifeTimePolicy = MaNGOS::ObjectLifeTime<T>37 class ThreadingModel = Trinity::SingleThreaded<T>, 38 class CreatePolicy = Trinity::OperatorNew<T>, 39 class LifeTimePolicy = Trinity::ObjectLifeTime<T> 38 40 > 39 class MANGOS_DLL_DECL Singleton41 class TRINITY_DLL_DECL Singleton 40 42 { 41 43 public: -
trunk/src/framework/Policies/SingletonImp.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_SINGLETONIMPL_H20 #define MANGOS_SINGLETONIMPL_H21 #ifndef TRINITY_SINGLETONIMPL_H 22 #define TRINITY_SINGLETONIMPL_H 21 23 22 24 #include "Singleton.h" … … 33 35 > 34 36 T& 35 MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()37 Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance() 36 38 { 37 39 if( !si_instance ) … … 62 64 > 63 65 void 64 MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()66 Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton() 65 67 { 66 68 CreatePolicy::Destroy(si_instance); … … 70 72 71 73 #define INSTANTIATE_SINGLETON_1(TYPE) \ 72 template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \73 template<> TYPE* MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \74 template<> bool MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false74 template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \ 75 template<> TYPE* Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \ 76 template<> bool Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false 75 77 76 78 #define INSTANTIATE_SINGLETON_2(TYPE, THREADINGMODEL) \ 77 template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \78 template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \79 template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false79 template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \ 80 template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \ 81 template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false 80 82 81 83 #define INSTANTIATE_SINGLETON_3(TYPE, THREADINGMODEL, CREATIONPOLICY ) \ 82 template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >; \83 template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \84 template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeType<TYPE> >::si_destroyed = false84 template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >; \ 85 template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \ 86 template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeType<TYPE> >::si_destroyed = false 85 87 86 88 #define INSTANTIATE_SINGLETON_4(TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME) \ 87 template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \88 template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \89 template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false89 template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \ 90 template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \ 91 template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false 90 92 #endif -
trunk/src/framework/Policies/ThreadingModel.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_THREADINGMODEL_H20 #define MANGOS_THREADINGMODEL_H21 #ifndef TRINITY_THREADINGMODEL_H 22 #define TRINITY_THREADINGMODEL_H 21 23 22 24 /** … … 27 29 #include "Platform/Define.h" 28 30 29 namespace MaNGOS31 namespace Trinity 30 32 { 31 33 inline void Guard(void *) {} 32 34 33 template<typename MUTEX> class MANGOS_DLL_DECL GeneralLock35 template<typename MUTEX> class TRINITY_DLL_DECL GeneralLock 34 36 { 35 37 public: … … 50 52 51 53 template <class T> 52 class MANGOS_DLL_DECL SingleThreaded54 class TRINITY_DLL_DECL SingleThreaded 53 55 { 54 56 public: … … 68 70 // object level lockable 69 71 template<class T, class MUTEX> 70 class MANGOS_DLL_DECL ObjectLevelLockable72 class TRINITY_DLL_DECL ObjectLevelLockable 71 73 { 72 74 public: … … 97 99 98 100 template<class T, class MUTEX> 99 class MANGOS_DLL_DECL ClassLevelLockable101 class TRINITY_DLL_DECL ClassLevelLockable 100 102 { 101 103 public: … … 121 123 } 122 124 123 template<class T, class MUTEX> MUTEX MaNGOS::ClassLevelLockable<T, MUTEX>::si_mtx;125 template<class T, class MUTEX> MUTEX Trinity::ClassLevelLockable<T, MUTEX>::si_mtx; 124 126 125 127 #define INSTANTIATE_CLASS_MUTEX(CTYPE,MUTEX) \ 126 template class MANGOS_DLL_DECL MaNGOS::ClassLevelLockable<CTYPE, MUTEX >128 template class TRINITY_DLL_DECL Trinity::ClassLevelLockable<CTYPE, MUTEX > 127 129 #endif -
trunk/src/framework/Utilities/ByteConverter.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_BYTECONVERTER_H20 #define MANGOS_BYTECONVERTER_H21 #ifndef TRINITY_BYTECONVERTER_H 22 #define TRINITY_BYTECONVERTER_H 21 23 22 24 /** ByteConverter reverse your byte order. This is use … … 45 47 } 46 48 47 #if MANGOS_ENDIAN == MANGOS_BIGENDIAN49 #if TRINITY_ENDIAN == TRINITY_BIGENDIAN 48 50 template<typename T> inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); } 49 51 #else -
trunk/src/framework/Utilities/Callback.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_CALLBACK_H20 #define MANGOS_CALLBACK_H21 #ifndef TRINITY_CALLBACK_H 22 #define TRINITY_CALLBACK_H 21 23 22 24 /// ------------ BASE CLASSES ------------ 23 25 24 namespace MaNGOS26 namespace Trinity 25 27 { 26 28 template < class Class, typename ParamType1 = void, typename ParamType2 = void, typename ParamType3 = void, typename ParamType4 = void > … … 194 196 /// --------- GENERIC CALLBACKS ---------- 195 197 196 namespace MaNGOS198 namespace Trinity 197 199 { 198 200 class ICallback … … 270 272 class QueryResult; 271 273 272 namespace MaNGOS274 namespace Trinity 273 275 { 274 276 class IQueryCallback -
trunk/src/framework/Utilities/CountedReference/Reference.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_REFERENCE_H20 #define MANGOS_REFERENCE_H21 #ifndef TRINITY_REFERENCE_H 22 #define TRINITY_REFERENCE_H 21 23 22 24 /** … … 39 41 < 40 42 typename T, 41 class THREADING_MODEL = MaNGOS::SingleThreaded<T>43 class THREADING_MODEL = Trinity::SingleThreaded<T> 42 44 > 43 class MANGOS_DLL_DECL Referencer45 class TRINITY_DLL_DECL Referencer 44 46 { 45 47 typedef typename THREADING_MODEL::Lock Lock; -
trunk/src/framework/Utilities/CountedReference/ReferenceHolder.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_REFERENCEHOLDER_H20 #define MANGOS_REFERENCEHOLDER_H21 #ifndef TRINITY_REFERENCEHOLDER_H 22 #define TRINITY_REFERENCEHOLDER_H 21 23 22 24 /** ReferenceHolder holds the actualy referenced obejct as well the refence -
trunk/src/framework/Utilities/CountedReference/ReferenceImpl.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_REFERENCEIMPL_H20 #define MANGOS_REFERENCEIMPL_H21 #ifndef TRINITY_REFERENCEIMPL_H 22 #define TRINITY_REFERENCEIMPL_H 21 23 22 24 #include "Reference.h" -
trunk/src/framework/Utilities/EventProcessor.cpp
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/Utilities/EventProcessor.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/Utilities/HashMap.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_HASHMAP_H20 #define MANGOS_HASHMAP_H21 #ifndef TRINITY_HASHMAP_H 22 #define TRINITY_HASHMAP_H 21 23 22 24 #include "Platform/CompilerDefs.h" -
trunk/src/framework/Utilities/LinkedList.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/Utilities/LinkedReference/RefManager.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/Utilities/LinkedReference/Reference.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 -
trunk/src/framework/Utilities/TypeList.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_TYPELIST_H20 #define MANGOS_TYPELIST_H21 #ifndef TRINITY_TYPELIST_H 22 #define TRINITY_TYPELIST_H 21 23 22 24 /*