[svn] * Merge Temp dev SVN with Assembla.

* Changes include:
   - Implementation of w12x's Outdoor PvP and Game Event Systems.
   - Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
   - All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
   - Improved Config cleanup.
   - And many more changes.

--HG--
branch : trunk
This commit is contained in:
Seline
2008-10-14 11:57:03 -05:00
parent 222cbfd464
commit 2265aef916
463 changed files with 10750 additions and 7723 deletions

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_FACTORY_HOLDER
#define MANGOS_FACTORY_HOLDER
#ifndef TRINITY_FACTORY_HOLDER
#define TRINITY_FACTORY_HOLDER
#include "Platform/Define.h"
#include "Utilities/TypeList.h"
@@ -27,11 +29,11 @@
/** FactoryHolder holds a factory object of a specific type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL FactoryHolder
class TRINITY_DLL_DECL FactoryHolder
{
public:
typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolderRegistry;
typedef MaNGOS::Singleton<FactoryHolderRegistry > FactoryHolderRepository;
typedef Trinity::Singleton<FactoryHolderRegistry > FactoryHolderRepository;
FactoryHolder(Key k) : i_key(k) {}
virtual ~FactoryHolder() {}

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_OBJECTREGISTRY_H
#define MANGOS_OBJECTREGISTRY_H
#ifndef TRINITY_OBJECTREGISTRY_H
#define TRINITY_OBJECTREGISTRY_H
#include "Platform/Define.h"
#include "Utilities/HashMap.h"
@@ -29,7 +31,7 @@
/** ObjectRegistry holds all registry item of the same type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL ObjectRegistry
class TRINITY_DLL_DECL ObjectRegistry
{
public:
typedef std::map<Key, T *> RegistryMapType;
@@ -93,7 +95,7 @@ class MANGOS_DLL_DECL ObjectRegistry
private:
RegistryMapType i_registeredObjects;
friend class MaNGOS::OperatorNew<ObjectRegistry<T, Key> >;
friend class Trinity::OperatorNew<ObjectRegistry<T, Key> >;
// protected for friend use since it should be a singleton
ObjectRegistry() {}

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,20 +10,20 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_GRID_H
#define MANGOS_GRID_H
#ifndef TRINITY_GRID_H
#define TRINITY_GRID_H
/*
@class Grid
Grid is a logical segment of the game world represented inside MaNGOS.
Grid is a logical segment of the game world represented inside TrinIty.
Grid is bind at compile time to a particular type of object which
we call it the object of interested. There are many types of loader,
specially, dynamic loader, static loader, or on-demand loader. There's
@@ -43,9 +45,9 @@ template
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES,
class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>
class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
>
class MANGOS_DLL_DECL Grid
class TRINITY_DLL_DECL Grid
{
// allows the GridLoader to access its internals
template<class A, class T, class O> friend class GridLoader;

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_GRIDLOADER_H
#define MANGOS_GRIDLOADER_H
#ifndef TRINITY_GRIDLOADER_H
#define TRINITY_GRIDLOADER_H
/**
@class GridLoader
@@ -40,7 +42,7 @@ class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
>
class MANGOS_DLL_DECL GridLoader
class TRINITY_DLL_DECL GridLoader
{
public:

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _GRIDREFMANAGER

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _GRIDREFERENCE_H
@@ -25,7 +27,7 @@ template<class OBJECT>
class GridRefManager;
template<class OBJECT>
class MANGOS_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
class TRINITY_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
{
protected:
void targetObjectBuildLink()

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_NGRID_H
#define MANGOS_NGRID_H
#ifndef TRINITY_NGRID_H
#define TRINITY_NGRID_H
/** NGrid is nothing more than a wrapper of the Grid with an NxN cells
*/
@@ -58,9 +60,9 @@ unsigned int N,
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES,
class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>
class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
>
class MANGOS_DLL_DECL NGrid
class TRINITY_DLL_DECL NGrid
{
public:

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPECONTAINER_H
#define MANGOS_TYPECONTAINER_H
#ifndef TRINITY_TYPECONTAINER_H
#define TRINITY_TYPECONTAINER_H
/*
* Here, you'll find a series of containers that allow you to hold multiple
@@ -95,27 +97,27 @@ template<class H, class T> struct ContainerList<TypeList<H, T> >
*/
template<class OBJECT_TYPES>
class MANGOS_DLL_DECL TypeMapContainer
class TRINITY_DLL_DECL TypeMapContainer
{
public:
template<class SPECIFIC_TYPE> size_t Count() const { return MaNGOS::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
template<class SPECIFIC_TYPE> size_t Count() const { return Trinity::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return MaNGOS::Find(i_elements, hdl,fake); }
template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return Trinity::Find(i_elements, hdl,fake); }
/// find a specific type of object in the container
template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return MaNGOS::Find(i_elements, hdl,fake); }
template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return Trinity::Find(i_elements, hdl,fake); }
/// inserts a specific object into the container
template<class SPECIFIC_TYPE> bool insert(OBJECT_HANDLE hdl, SPECIFIC_TYPE *obj)
{
SPECIFIC_TYPE* t = MaNGOS::Insert(i_elements, obj, hdl);
SPECIFIC_TYPE* t = Trinity::Insert(i_elements, obj, hdl);
return (t != NULL);
}
/// Removes the object from the container, and returns the removed object
template<class SPECIFIC_TYPE> bool remove(SPECIFIC_TYPE* obj, OBJECT_HANDLE hdl)
{
SPECIFIC_TYPE* t = MaNGOS::Remove(i_elements, obj, hdl);
SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj, hdl);
return (t != NULL);
}

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TYPECONTAINER_FUNCTIONS_H
@@ -29,7 +31,7 @@
#include "Utilities/TypeList.h"
#include <map>
namespace MaNGOS
namespace Trinity
{
/* ContainerMapList Helpers */
// count functions

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TYPECONTAINER_FUNCTIONS_PTR_H
@@ -29,7 +31,7 @@
#include "Utilities/TypeList.h"
#include <map>
namespace MaNGOS
namespace Trinity
{
/* ContainerMapList Helpers */
// count functions

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPECONTAINERVISITOR_H
#define MANGOS_TYPECONTAINERVISITOR_H
#ifndef TRINITY_TYPECONTAINERVISITOR_H
#define TRINITY_TYPECONTAINERVISITOR_H
/*
* @class TypeContainerVisitor is implemented as a visitor pattern. It is
@@ -95,7 +97,7 @@ template<class VISITOR, class OBJECT_TYPES> void VisitorHelper(VISITOR &v, TypeM
}
template<class VISITOR, class TYPE_CONTAINER>
class MANGOS_DLL_DECL TypeContainerVisitor
class TRINITY_DLL_DECL TypeContainerVisitor
{
public:
TypeContainerVisitor(VISITOR &v) : i_visitor(v) {}

View File

@@ -4,7 +4,7 @@
#
# This program 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 3 of the License, or
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -64,3 +64,4 @@ EXTRA_DIST = \
Utilities/LinkedList.h \
Utilities/TypeList.h

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SOCKETDEFINES_H
#define MANGOS_SOCKETDEFINES_H
#ifndef TRINITY_SOCKETDEFINES_H
#define TRINITY_SOCKETDEFINES_H
#ifdef WIN32

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_COMPILERDEFS_H
#define MANGOS_COMPILERDEFS_H
#ifndef TRINITY_COMPILERDEFS_H
#define TRINITY_COMPILERDEFS_H
#define PLATFORM_WINDOWS 0
#define PLATFORM_UNIX 1

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_DEFINE_H
#define MANGOS_DEFINE_H
#ifndef TRINITY_DEFINE_H
#define TRINITY_DEFINE_H
#include "Platform/CompilerDefs.h"
#include <sys/types.h>
@@ -87,102 +89,102 @@ It may well fail, in which case the definitions will need to be set by
editing at the points marked **** EDIT HERE IF NECESSARY **** below.
*/
#define MANGOS_LITTLEENDIAN 0
#define MANGOS_BIGENDIAN 1
#define TRINITY_LITTLEENDIAN 0
#define TRINITY_BIGENDIAN 1
#if !defined(MANGOS_ENDIAN)
#if !defined(TRINITY_ENDIAN)
# if defined(LITTLE_ENDIAN) || defined(BIG_ENDIAN)
# if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
# if defined(BYTE_ORDER)
# if (BYTE_ORDER == LITTLE_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (BYTE_ORDER == BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# endif
# elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif !defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# elif defined(_LITTLE_ENDIAN) || defined(_BIG_ENDIAN)
# if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
# if defined(_BYTE_ORDER)
# if (_BYTE_ORDER == _LITTLE_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (_BYTE_ORDER == _BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# endif
# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLE_ENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLE_ENDIAN
# elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# elif 0 /* **** EDIT HERE IF NECESSARY **** */
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif 0 /* **** EDIT HERE IF NECESSARY **** */
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# elif (('1234' >> 24) == '1')
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (('4321' >> 24) == '1')
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# else
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# endif
#endif
/* End of Endian detection code from sha2.c: */
#if PLATFORM == PLATFORM_WINDOWS
#define MANGOS_EXPORT __declspec(dllexport)
#define MANGOS_LIBRARY_HANDLE HMODULE
#define MANGOS_LOAD_LIBRARY(a) LoadLibrary(a)
#define MANGOS_CLOSE_LIBRARY FreeLibrary
#define MANGOS_GET_PROC_ADDR GetProcAddress
#define MANGOS_IMPORT __cdecl
#define MANGOS_SCRIPT_EXT ".dll"
#define MANGOS_SCRIPT_NAME "TrinityScript"
#define TRINITY_EXPORT __declspec(dllexport)
#define TRINITY_LIBRARY_HANDLE HMODULE
#define TRINITY_LOAD_LIBRARY(a) LoadLibrary(a)
#define TRINITY_CLOSE_LIBRARY FreeLibrary
#define TRINITY_GET_PROC_ADDR GetProcAddress
#define TRINITY_IMPORT __cdecl
#define TRINITY_SCRIPT_EXT ".dll"
#define TRINITY_SCRIPT_NAME "TrinityScript"
#else
#define MANGOS_LIBRARY_HANDLE void*
#define MANGOS_EXPORT export
#define MANGOS_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW)
#define MANGOS_CLOSE_LIBRARY dlclose
#define MANGOS_GET_PROC_ADDR dlsym
#define TRINITY_LIBRARY_HANDLE void*
#define TRINITY_EXPORT export
#define TRINITY_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW)
#define TRINITY_CLOSE_LIBRARY dlclose
#define TRINITY_GET_PROC_ADDR dlsym
#if defined(__APPLE_CC__) && defined(BIG_ENDIAN)
#define MANGOS_IMPORT __attribute__ ((longcall))
#define TRINITY_IMPORT __attribute__ ((longcall))
#else
#define MANGOS_IMPORT __attribute__ ((cdecl))
#define TRINITY_IMPORT __attribute__ ((cdecl))
#endif
#define MANGOS_SCRIPT_EXT ".so"
#define MANGOS_SCRIPT_NAME "libtrinityscript"
#define TRINITY_SCRIPT_EXT ".so"
#define TRINITY_SCRIPT_NAME "libtrinityscript"
#endif
#ifdef WIN32
#ifdef MANGOS_WIN32_DLL_IMPORT
#ifdef TRINITY_WIN32_DLL_IMPORT
#define MANGOS_DLL_DECL __declspec(dllimport)
#define TRINITY_DLL_DECL __declspec(dllimport)
#else
#ifdef MANGOS_WIND_DLL_EXPORT
#define MANGOS_DLL_DECL __declspec(dllexport)
#ifdef TRINITY_WIND_DLL_EXPORT
#define TRINITY_DLL_DECL __declspec(dllexport)
#else
#define MANGOS_DLL_DECL
#define TRINITY_DLL_DECL
#endif
#endif
#else
#define MANGOS_DLL_DECL
#define TRINITY_DLL_DECL
#endif
#ifndef DEBUG
#define MANGOS_INLINE inline
#define TRINITY_INLINE inline
#else
#ifndef MANGOS_DEBUG
#define MANGOS_DEBUG
#ifndef TRINITY_DEBUG
#define TRINITY_DEBUG
#endif
#define MANGOS_INLINE
#define TRINITY_INLINE
#endif
#if COMPILER == COMPILER_MICROSOFT
@@ -209,12 +211,12 @@ typedef uint32 DWORD;
typedef uint64 OBJECT_HANDLE;
#if PLATFORM == PLATFORM_WINDOWS
# define MANGOS_DLL_SPEC __declspec(dllexport)
# define TRINITY_DLL_SPEC __declspec(dllexport)
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
# endif
#else
# define MANGOS_DLL_SPEC
# define TRINITY_DLL_SPEC
# define DECLSPEC_NORETURN
#endif

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,27 +10,27 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_CREATIONPOLICY_H
#define MANGOS_CREATIONPOLICY_H
#ifndef TRINITY_CREATIONPOLICY_H
#define TRINITY_CREATIONPOLICY_H
#include <stdlib.h>
#include "Platform/Define.h"
namespace MaNGOS
namespace Trinity
{
/**
* OperatorNew policy creates an object on the heap using new.
*/
template <class T>
class MANGOS_DLL_DECL OperatorNew
class TRINITY_DLL_DECL OperatorNew
{
public:
static T* Create(void) { return (new T); }
@@ -40,7 +42,7 @@ namespace MaNGOS
* the first time call Create.
*/
template <class T>
class MANGOS_DLL_DECL LocalStaticCreation
class TRINITY_DLL_DECL LocalStaticCreation
{
union MaxAlign
{
@@ -69,7 +71,7 @@ namespace MaNGOS
* CreateUsingMalloc by pass the memory manger.
*/
template<class T>
class MANGOS_DLL_DECL CreateUsingMalloc
class TRINITY_DLL_DECL CreateUsingMalloc
{
public:
static T* Create()
@@ -90,7 +92,7 @@ namespace MaNGOS
* CreateOnCallBack creates the object base on the call back.
*/
template<class T, class CALL_BACK>
class MANGOS_DLL_DECL CreateOnCallBack
class TRINITY_DLL_DECL CreateOnCallBack
{
public:
static T* Create()

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,25 +10,25 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <cstdlib>
#include "ObjectLifeTime.h"
namespace MaNGOS
namespace Trinity
{
extern "C" void external_wrapper(void *p)
{
std::atexit( (void (*)())p );
}
void MANGOS_DLL_SPEC at_exit( void (*func)() )
void TRINITY_DLL_SPEC at_exit( void (*func)() )
{
external_wrapper((void*)func);
}

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,28 +10,28 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_OBJECTLIFETIME_H
#define MANGOS_OBJECTLIFETIME_H
#ifndef TRINITY_OBJECTLIFETIME_H
#define TRINITY_OBJECTLIFETIME_H
#include <stdexcept>
#include "Platform/Define.h"
typedef void (* Destroyer)(void);
namespace MaNGOS
namespace Trinity
{
void MANGOS_DLL_SPEC at_exit( void (*func)() );
void TRINITY_DLL_SPEC at_exit( void (*func)() );
template <class T>
class MANGOS_DLL_DECL ObjectLifeTime
class TRINITY_DLL_DECL ObjectLifeTime
{
public:
inline static void ScheduleCall(void (*destroyer)() )

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SINGLETON_H
#define MANGOS_SINGLETON_H
#ifndef TRINITY_SINGLETON_H
#define TRINITY_SINGLETON_H
/**
* @brief class Singleton
@@ -27,16 +29,16 @@
#include "ThreadingModel.h"
#include "ObjectLifeTime.h"
namespace MaNGOS
namespace Trinity
{
template
<
typename T,
class ThreadingModel = MaNGOS::SingleThreaded<T>,
class CreatePolicy = MaNGOS::OperatorNew<T>,
class LifeTimePolicy = MaNGOS::ObjectLifeTime<T>
class ThreadingModel = Trinity::SingleThreaded<T>,
class CreatePolicy = Trinity::OperatorNew<T>,
class LifeTimePolicy = Trinity::ObjectLifeTime<T>
>
class MANGOS_DLL_DECL Singleton
class TRINITY_DLL_DECL Singleton
{
public:
static T& Instance();

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SINGLETONIMPL_H
#define MANGOS_SINGLETONIMPL_H
#ifndef TRINITY_SINGLETONIMPL_H
#define TRINITY_SINGLETONIMPL_H
#include "Singleton.h"
@@ -32,7 +34,7 @@ class CreatePolicy,
class LifeTimePolicy
>
T&
MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()
Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()
{
if( !si_instance )
{
@@ -61,7 +63,7 @@ class CreatePolicy,
class LifeTimePolicy
>
void
MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()
Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()
{
CreatePolicy::Destroy(si_instance);
si_instance = NULL;
@@ -69,22 +71,22 @@ MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingl
}
#define INSTANTIATE_SINGLETON_1(TYPE) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_2(TYPE, THREADINGMODEL) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_3(TYPE, THREADINGMODEL, CREATIONPOLICY ) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeType<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeType<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_4(TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false
#endif

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_THREADINGMODEL_H
#define MANGOS_THREADINGMODEL_H
#ifndef TRINITY_THREADINGMODEL_H
#define TRINITY_THREADINGMODEL_H
/**
* @class ThreadingModel<T>
@@ -26,11 +28,11 @@
#include "Platform/Define.h"
namespace MaNGOS
namespace Trinity
{
inline void Guard(void *) {}
template<typename MUTEX> class MANGOS_DLL_DECL GeneralLock
template<typename MUTEX> class TRINITY_DLL_DECL GeneralLock
{
public:
GeneralLock(MUTEX &m) : i_mutex(m)
@@ -49,7 +51,7 @@ namespace MaNGOS
};
template <class T>
class MANGOS_DLL_DECL SingleThreaded
class TRINITY_DLL_DECL SingleThreaded
{
public:
@@ -67,7 +69,7 @@ namespace MaNGOS
// object level lockable
template<class T, class MUTEX>
class MANGOS_DLL_DECL ObjectLevelLockable
class TRINITY_DLL_DECL ObjectLevelLockable
{
public:
ObjectLevelLockable() : i_mtx() {}
@@ -96,7 +98,7 @@ namespace MaNGOS
};
template<class T, class MUTEX>
class MANGOS_DLL_DECL ClassLevelLockable
class TRINITY_DLL_DECL ClassLevelLockable
{
public:
class Lock;
@@ -120,8 +122,8 @@ namespace MaNGOS
}
template<class T, class MUTEX> MUTEX MaNGOS::ClassLevelLockable<T, MUTEX>::si_mtx;
template<class T, class MUTEX> MUTEX Trinity::ClassLevelLockable<T, MUTEX>::si_mtx;
#define INSTANTIATE_CLASS_MUTEX(CTYPE,MUTEX) \
template class MANGOS_DLL_DECL MaNGOS::ClassLevelLockable<CTYPE, MUTEX >
template class TRINITY_DLL_DECL Trinity::ClassLevelLockable<CTYPE, MUTEX >
#endif

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_BYTECONVERTER_H
#define MANGOS_BYTECONVERTER_H
#ifndef TRINITY_BYTECONVERTER_H
#define TRINITY_BYTECONVERTER_H
/** ByteConverter reverse your byte order. This is use
for cross platform where they have different endians.
@@ -44,7 +46,7 @@ namespace ByteConverter
}
}
#if MANGOS_ENDIAN == MANGOS_BIGENDIAN
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
template<typename T> inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); }
#else
template<typename T> inline void EndianConvert(T&) { }

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,20 +10,20 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_CALLBACK_H
#define MANGOS_CALLBACK_H
#ifndef TRINITY_CALLBACK_H
#define TRINITY_CALLBACK_H
/// ------------ BASE CLASSES ------------
namespace MaNGOS
namespace Trinity
{
template < class Class, typename ParamType1 = void, typename ParamType2 = void, typename ParamType3 = void, typename ParamType4 = void >
class _Callback
@@ -193,7 +195,7 @@ namespace MaNGOS
/// --------- GENERIC CALLBACKS ----------
namespace MaNGOS
namespace Trinity
{
class ICallback
{
@@ -269,7 +271,7 @@ namespace MaNGOS
class QueryResult;
namespace MaNGOS
namespace Trinity
{
class IQueryCallback
{

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCE_H
#define MANGOS_REFERENCE_H
#ifndef TRINITY_REFERENCE_H
#define TRINITY_REFERENCE_H
/**
* Referencer<T>
@@ -38,9 +40,9 @@
template
<
typename T,
class THREADING_MODEL = MaNGOS::SingleThreaded<T>
class THREADING_MODEL = Trinity::SingleThreaded<T>
>
class MANGOS_DLL_DECL Referencer
class TRINITY_DLL_DECL Referencer
{
typedef typename THREADING_MODEL::Lock Lock;
typedef ReferenceHolder<T, THREADING_MODEL> ReferenceeHolder;

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCEHOLDER_H
#define MANGOS_REFERENCEHOLDER_H
#ifndef TRINITY_REFERENCEHOLDER_H
#define TRINITY_REFERENCEHOLDER_H
/** ReferenceHolder holds the actualy referenced obejct as well the refence
count. The ReferenecHolder implements as a policy base object and

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCEIMPL_H
#define MANGOS_REFERENCEIMPL_H
#ifndef TRINITY_REFERENCEIMPL_H
#define TRINITY_REFERENCEIMPL_H
#include "Reference.h"

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "EventProcessor.h"

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EVENTPROCESSOR_H

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_HASHMAP_H
#define MANGOS_HASHMAP_H
#ifndef TRINITY_HASHMAP_H
#define TRINITY_HASHMAP_H
#include "Platform/CompilerDefs.h"
#include "Platform/Define.h"

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LINKEDLIST

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _REFMANAGER_H

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,12 +10,12 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _REFERENCE_H

View File

@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8,16 +10,16 @@
*
* This program 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPELIST_H
#define MANGOS_TYPELIST_H
#ifndef TRINITY_TYPELIST_H
#define TRINITY_TYPELIST_H
/*
@struct TypeList