]> jfr.im git - irc/gameservirc.git/commitdiff
Revisited GameServ 2.0 and got it compiling in VS 2010!
authorkainazzzo <redacted>
Wed, 3 Aug 2011 20:13:40 +0000 (20:13 +0000)
committerkainazzzo <redacted>
Wed, 3 Aug 2011 20:13:40 +0000 (20:13 +0000)
Also added UIntRange and IntRange instead of making that class a template. I felt that it was much more concise to have a separate class for each.

git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@547 bc333340-6410-0410-a689-9d09f3c113fa

59 files changed:
gameserv-2.0/GameServ.sln
gameserv-2.0/libgameservcore/include/GameServ/Types.h
gameserv-2.0/libgameservcore/libgameservcore.vcxproj [new file with mode: 0644]
gameserv-2.0/libgameservcore/src/Types.cpp
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/DataAccess.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FileDAOFactory.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FileItemDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FileLevelDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FileMasterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FileMonsterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FilePlayerDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/IDAOFactory.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/IItemDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/ILevelDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/IMasterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/IMonsterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/IPlayerDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLDAOFactory.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLItemDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLLevelDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLMasterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLMonsterDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/MySQL/MySQLPlayerDAO.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/FightGL.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/ForestGL.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/GameObject.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/ItemGO.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/LevelGO.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/Helpers/InventoryManager.h
gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/PlayerGL.h
gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj [new file with mode: 0644]
gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj.filters [new file with mode: 0644]
gameserv-2.0/libgameservgldl/src/DataLayer/DataAccess.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FileDAOFactory.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FileItemDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FileLevelDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FileMasterDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FileMonsterDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/File/FilePlayerDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLDAOFactory.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLItemDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLLevelDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLMasterDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLMonsterDAO.cpp
gameserv-2.0/libgameservgldl/src/DataLayer/MySQL/MySQLPlayerDAO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/FightGL.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/ForestGL.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/ArmorGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/GameObject.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/ItemGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/LevelGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/PlayerGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/PotionGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/Helpers/InventoryManager.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/PlayerGL.cpp
gameserv-2.0/testdriver/main.cpp
gameserv-2.0/testdriver/testdriver.vcxproj [new file with mode: 0644]

index f4513774159af90ac01828a6b05e92781c303ab4..93772517b702642f4428feb3dceefcab9bcbd8fa 100644 (file)
@@ -1,18 +1,11 @@
 \r
-Microsoft Visual Studio Solution File, Format Version 10.00\r
-# Visual C++ Express 2008\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgameservgldl", "libgameservgldl\libgameservgldl.vcproj", "{3CED9BD5-BEAA-4C36-A735-AFF2B3F2CF42}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {279AA91C-8638-45E5-AAA3-988F74764A97} = {279AA91C-8638-45E5-AAA3-988F74764A97}\r
-       EndProjectSection\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgameservgldl", "libgameservgldl\libgameservgldl.vcxproj", "{3CED9BD5-BEAA-4C36-A735-AFF2B3F2CF42}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgameservcore", "libgameservcore\libgameservcore.vcproj", "{279AA91C-8638-45E5-AAA3-988F74764A97}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgameservcore", "libgameservcore\libgameservcore.vcxproj", "{279AA91C-8638-45E5-AAA3-988F74764A97}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdriver", "testdriver\testdriver.vcproj", "{9DAAD910-02AF-431F-88F2-08434ECB5102}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {279AA91C-8638-45E5-AAA3-988F74764A97} = {279AA91C-8638-45E5-AAA3-988F74764A97}\r
-               {3CED9BD5-BEAA-4C36-A735-AFF2B3F2CF42} = {3CED9BD5-BEAA-4C36-A735-AFF2B3F2CF42}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdriver", "testdriver\testdriver.vcxproj", "{9DAAD910-02AF-431F-88F2-08434ECB5102}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
index 821d066197c4d304edefd5031483cfebc9bf8efd..9e6636fb56f8dcb35d0e09953e4df9c970a1caeb 100644 (file)
@@ -1,32 +1,12 @@
 #ifndef __GS__TYPES_H__\r
 #define __GS__TYPES_H__\r
 \r
+#include <ctime>\r
 #include <string>\r
 using std::string;\r
 #include <GameServ/GameServException.h>\r
 using GameServ::Exceptions::GameServException;\r
 \r
-#include <ctime>\r
-#include <boost/random/linear_congruential.hpp>\r
-#include <boost/random/uniform_int.hpp>\r
-#include <boost/random/uniform_real.hpp>\r
-#include <boost/random/variate_generator.hpp>\r
-// Sun CC doesn't handle boost::iterator_adaptor yet\r
-#if !defined(__SUNPRO_CC) || (__SUNPRO_CC > 0x530)\r
-#include <boost/generator_iterator.hpp>\r
-#endif\r
-\r
-#ifdef BOOST_NO_STDC_NAMESPACE\r
-namespace std {\r
-  using ::time;\r
-}\r
-#endif\r
-\r
-// This is a typedef for a random number generator.\r
-// Try boost::mt19937 or boost::ecuyer1988 instead of boost::minstd_rand\r
-typedef boost::minstd_rand base_generator_type;\r
-\r
-\r
 namespace GameServ \r
 {              \r
        namespace Types\r
@@ -122,83 +102,74 @@ namespace GameServ
                        static const modifierinfo mModifierInfoTable[];\r
                }; // Modifiers class\r
 \r
-               template <class T>\r
-               class Range\r
+               class IntRange\r
                {\r
                public:\r
 \r
-                       Range()\r
-                       {\r
-                       }\r
+                       IntRange();\r
 \r
-                       Range(const T &high, const T &low)\r
-                       {\r
-                               mHigh = high;\r
-                               mLow = low;\r
-                               mLastRandom = T(0);\r
-                       }\r
+                       IntRange(const int &high, const int &low);\r
 \r
-                       ~Range()\r
-                       {\r
-                       }\r
+                       ~IntRange();\r
 \r
-                       //! Generate a random number within the range\r
-                       T Random()\r
-                       {\r
-                               static base_generator_type generator(static_cast<T>(std::time(0)));\r
-                               if (mLow == mHigh)\r
-                               {\r
-                                       return mLow;\r
-                               }\r
-                               else\r
-                               {\r
-                                       boost::uniform_int<> uni_dist(mLow, mHigh);\r
-                                       boost::variate_generator<base_generator_type&, boost::uniform_int<> > uni(generator, uni_dist);\r
-                                       mLastRandom = uni();\r
-                                       return mLastRandom;\r
-                               }\r
-                       }\r
+                       //! Generate a random number within the IntRange\r
+                       int Random();\r
 \r
                        //! Property get - High\r
-                       T High(void) const\r
-                       {\r
-                               return mHigh;\r
-                       }\r
+                       int High(void) const;\r
                        \r
                        //! Property set - High\r
-                       void High(const T &value)\r
-                       {\r
-                               if (value >= mLow)\r
-                               {\r
-                                       mHigh = value;\r
-                               }\r
-                       }\r
+                       void High(const int &value);\r
 \r
                        //! Property get - Low\r
-                       T Low(void) const\r
-                       {\r
-                               return mLow;\r
-                       }\r
+                       int Low(void) const;\r
+                       \r
 \r
                        //! Property set - Low\r
-                       void Low(const T &value)\r
-                       {\r
-                               if (value <= mHigh)\r
-                               {\r
-                                       mLow = value;\r
-                               }\r
-                       }\r
+                       void Low(const int &value);\r
 \r
                        //! Property get - Last random number to be generated\r
-                       T LastRandom(void) const\r
-                       {\r
-                               return mLastRandom;\r
-                       }\r
+                       int LastRandom(void) const;\r
+                       \r
+                       \r
+               private:\r
+                       int mHigh;\r
+                       int mLow;\r
+                       int mLastRandom;\r
+               };\r
+\r
+               class UIntRange\r
+               {\r
+               public:\r
+\r
+                       UIntRange();\r
+\r
+                       UIntRange(const unsigned int &high, const unsigned int &low);\r
+\r
+                       ~UIntRange();\r
+\r
+                       //! Generate a random number within the IntRange\r
+                       unsigned int Random();\r
+\r
+                       //! Property get - High\r
+                       unsigned int High(void) const;\r
+\r
+                       //! Property set - High\r
+                       void High(const unsigned int &value);\r
+\r
+                       //! Property get - Low\r
+                       unsigned int Low(void) const;\r
+\r
+                       //! Property set - Low\r
+                       void Low(const unsigned int &value);\r
+\r
+                       //! Property get - Last random number to be generated\r
+                       unsigned int LastRandom(void) const;\r
                        \r
                private:\r
-                       T mHigh;\r
-                       T mLow;\r
-                       T mLastRandom;\r
+                       unsigned int mHigh;\r
+                       unsigned int mLow;\r
+                       unsigned int mLastRandom;\r
                };\r
        } \r
 }\r
diff --git a/gameserv-2.0/libgameservcore/libgameservcore.vcxproj b/gameserv-2.0/libgameservcore/libgameservcore.vcxproj
new file mode 100644 (file)
index 0000000..5a26ec4
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{279AA91C-8638-45E5-AAA3-988F74764A97}</ProjectGuid>\r
+    <RootNamespace>libgameservcore</RootNamespace>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\boost_1_47_0;$(IncludePath)</IncludePath>\r
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\boost_1_47_0\stage\lib;$(LibraryPath)</LibraryPath>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <Optimization>Disabled</Optimization>\r
+      <AdditionalIncludeDirectories>$(ProjectDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MinimalRebuild>true</MinimalRebuild>\r
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+    </ClCompile>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+    </ClCompile>\r
+    <Link>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+      <DataExecutionPrevention>\r
+      </DataExecutionPrevention>\r
+      <TargetMachine>MachineX86</TargetMachine>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="src\GameServException.cpp" />\r
+    <ClCompile Include="src\Types.cpp" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="include\GameServ\GameServException.h" />\r
+    <ClInclude Include="include\GameServ\Types.h" />\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
index bf1fe96b5fac4d5027c976f47329e71ed7db1958..7d61541dfff10080d2afe058da2ce8d2b7ec2768 100644 (file)
@@ -1,14 +1,13 @@
 #include <GameServ/Types.h>\r
 using GameServ::Types::ItemTypes;\r
 using GameServ::Types::Modifiers;\r
-using GameServ::Types::Range;\r
+using GameServ::Types::IntRange;\r
+using GameServ::Types::UIntRange;\r
 using GameServ::Types::ObjectTypes;\r
 using GameServ::Types::Exceptions::TypeException;\r
 \r
 #include <string>\r
 using std::string;\r
-\r
-\r
 using std::exception;\r
 \r
 #include <boost/format.hpp>\r
@@ -16,6 +15,21 @@ using std::exception;
 using boost::format;\r
 using boost::str;\r
 \r
+#include <boost/random/mersenne_twister.hpp>\r
+#include <boost/random/uniform_int_distribution.hpp>\r
+\r
+#ifdef BOOST_NO_STDC_NAMESPACE\r
+namespace std {\r
+  using ::time;\r
+}\r
+#endif\r
+\r
+// This is a typedef for a random number generator.\r
+// Try boost::mt19937 or boost::ecuyer1988 instead of boost::minstd_rand\r
+typedef boost::random::mt19937 base_generator_type;\r
+\r
+\r
+\r
 \r
 TypeException::TypeException(const string &ErrorMsg, const char *pFilename, int SourceLine)\r
 : GameServException(ErrorMsg, pFilename, SourceLine)\r
@@ -128,3 +142,127 @@ Modifiers::Modifier Modifiers::Parse(const string &modifier)
 \r
        throw TypeException(str(format("No modifier enumeration found for %1%") % modifier), __FILE__, __LINE__);\r
 }\r
+\r
+IntRange::IntRange() \r
+{\r
+}\r
+\r
+IntRange::~IntRange()\r
+{\r
+}\r
+\r
+IntRange::IntRange(const int &high, const int &low)\r
+{\r
+                               mHigh = high;\r
+                               mLow = low;\r
+                               mLastRandom = 0;\r
+}\r
+\r
+int IntRange::Random() \r
+{\r
+       static base_generator_type generator(static_cast<int>(std::time(0)));\r
+       if (mLow == mHigh)\r
+       {\r
+               return mLow;\r
+       }\r
+       else\r
+       {\r
+               boost::random::uniform_int_distribution<> dist(mLow, mHigh);\r
+               mLastRandom = dist(generator);\r
+               return mLastRandom;\r
+       }\r
+}\r
+\r
+int IntRange::High(void) const\r
+{\r
+       return mHigh;\r
+}\r
+\r
+void IntRange::High(const int &value)\r
+{\r
+       if (value >= mLow)\r
+       {\r
+               mHigh = value;\r
+       }\r
+}\r
+\r
+int IntRange::Low(void) const\r
+{\r
+       return mLow;\r
+}\r
+\r
+void IntRange::Low(const int &value)\r
+{\r
+       if (value <= mHigh)\r
+       {\r
+               mLow = value;\r
+       }\r
+}\r
+\r
+int IntRange::LastRandom(void) const\r
+{\r
+       return mLastRandom;\r
+}\r
+\r
+/**/\r
+\r
+UIntRange::UIntRange() \r
+{\r
+}\r
+\r
+UIntRange::~UIntRange()\r
+{\r
+}\r
+\r
+UIntRange::UIntRange(const unsigned int &high, const unsigned int &low)\r
+{\r
+                               mHigh = high;\r
+                               mLow = low;\r
+                               mLastRandom = 0;\r
+}\r
+\r
+unsigned int UIntRange::Random() \r
+{\r
+       static base_generator_type generator(static_cast<unsigned int>(std::time(0)));\r
+       if (mLow == mHigh)\r
+       {\r
+               return mLow;\r
+       }\r
+       else\r
+       {\r
+               boost::random::uniform_int_distribution<> dist(mLow, mHigh);\r
+               mLastRandom = dist(generator);\r
+               return mLastRandom;\r
+       }\r
+}\r
+\r
+unsigned int UIntRange::High(void) const\r
+{\r
+       return mHigh;\r
+}\r
+\r
+void UIntRange::High(const unsigned int &value)\r
+{\r
+       if (value >= mLow)\r
+       {\r
+               mHigh = value;\r
+       }\r
+}\r
+\r
+unsigned int UIntRange::Low(void) const\r
+{\r
+       return mLow;\r
+}\r
+\r
+void UIntRange::Low(const unsigned int &value)\r
+{\r
+       if (value <= mHigh)\r
+       {\r
+               mLow = value;\r
+       }\r
+}\r
+\r
+unsigned int UIntRange::LastRandom(void) const\r
+{\r
+       return mLastRandom;\r
+}\r
index 8c11f0fbf31acb60d3a1be7796e64d0e4f5021bb..a54629d9b39d84d9f145b30c6a6fef8699fec638 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::DataLayer::IDAOFactory;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace DataLayer\r
 {\r
@@ -35,7 +35,7 @@ namespace GameServ { namespace DataLayer
                        data access objects.  Ids and resources in one DataAccessObject of one provider can mean completely\r
                        different things in another provider.\r
                */\r
-               static shared_ptr<IDAOFactory> GetDataAccessFactory(const string &Provider);\r
+               static boost::shared_ptr<IDAOFactory> GetDataAccessFactory(const string &Provider);\r
 \r
 \r
        };\r
index 495177ac47f98f2ee75309e58eb4b7d9d69d4b7d..ac42caff41a6b9ab8cbf04f3c9d6d03a0205bc13 100644 (file)
@@ -18,7 +18,7 @@ using GameServ::DataLayer::DataAccessObjects::ILevelDAO;
 \r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace DataLayer { namespace File\r
 {\r
@@ -34,11 +34,11 @@ namespace GameServ { namespace DataLayer { namespace File
 \r
                // Overrides //////////////////////////////////////////////////////////\r
                \r
-               virtual shared_ptr<IPlayerDAO> GetPlayerDAO(void) const;\r
-               virtual shared_ptr<IItemDAO> GetItemDAO(void) const;\r
-               virtual shared_ptr<IMonsterDAO> GetMonsterDAO(void) const;\r
-               virtual shared_ptr<IMasterDAO> GetMasterDAO(void) const;\r
-               virtual shared_ptr<ILevelDAO> GetLevelDAO(void) const;\r
+               virtual boost::shared_ptr<IPlayerDAO> GetPlayerDAO(void) const;\r
+               virtual boost::shared_ptr<IItemDAO> GetItemDAO(void) const;\r
+               virtual boost::shared_ptr<IMonsterDAO> GetMonsterDAO(void) const;\r
+               virtual boost::shared_ptr<IMasterDAO> GetMasterDAO(void) const;\r
+               virtual boost::shared_ptr<ILevelDAO> GetLevelDAO(void) const;\r
 \r
        private:\r
 \r
index 85d8e09e25624a1c8499f05852cc1dfb884cd688..6177ee082556a0af795a19f7692049088e28aaa6 100644 (file)
@@ -8,8 +8,8 @@ using GameServ::GameLayer::GameObjects::ItemGO;
 #include <GameServ/DataLayer/IItemDAO.h>\r
 using GameServ::DataLayer::DataAccessObjects::IItemDAO;\r
 \r
-#include <boost/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -36,14 +36,14 @@ namespace GameServ {  namespace DataLayer { namespace File
                virtual ~FileItemDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<ItemGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<ItemGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
 \r
                void LoadItemCache(void);\r
 \r
-               void Insert(shared_ptr<ItemGO> spItem);\r
-               void Update(shared_ptr<ItemGO> spItem);\r
+               void Insert(boost::shared_ptr<ItemGO> spItem);\r
+               void Update(boost::shared_ptr<ItemGO> spItem);\r
 \r
        private:\r
                //! Data file\r
@@ -52,8 +52,8 @@ namespace GameServ {  namespace DataLayer { namespace File
                // Helper Methods /////////////////////////////////////////////////////\r
 \r
                //! Creates the ItemGO found at iterator position\r
-               shared_ptr<ItemGO> CreateItemFromLine(const string &line) const;\r
-               shared_ptr<ItemGO> CreatePotionFromLine(const string &line) const;\r
+               boost::shared_ptr<ItemGO> CreateItemFromLine(const string &line) const;\r
+               boost::shared_ptr<ItemGO> CreatePotionFromLine(const string &line) const;\r
 \r
                //! Get the Item database file path\r
                string GetItemFilePath(void) const;\r
@@ -61,7 +61,7 @@ namespace GameServ {  namespace DataLayer { namespace File
                void Initialize(const string &filename);\r
 \r
 \r
-               map<string, shared_ptr<ItemGO> > spItemCache;\r
+               map<string, boost::shared_ptr<ItemGO> > spItemCache;\r
        };\r
 } } } // GameServ.DataLayer.DataAccessObjects.File\r
 \r
index 47be872dd7a2a686d0dac3fc3971fab2715e77b5..5e5ebe05e112fea0512d7ed7da7890b35e71a00b 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::LevelGO;
 using GameServ::DataLayer::DataAccessObjects::ILevelDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -34,12 +34,12 @@ namespace GameServ {  namespace DataLayer { namespace File
                virtual ~FileLevelDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<LevelGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<LevelGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
 \r
-               virtual void Insert(shared_ptr<LevelGO> spLevel);\r
-               virtual void Update(shared_ptr<LevelGO> spLevel);\r
+               virtual void Insert(boost::shared_ptr<LevelGO> spLevel);\r
+               virtual void Update(boost::shared_ptr<LevelGO> spLevel);\r
 \r
                void LoadLevelCache(void);\r
 \r
@@ -50,14 +50,14 @@ namespace GameServ {  namespace DataLayer { namespace File
                // Helper Methods /////////////////////////////////////////////////////\r
 \r
                //! Creates the LevelGO found at iterator position\r
-               shared_ptr<LevelGO> CreateLevelFromLine(const string &line) const;\r
+               boost::shared_ptr<LevelGO> CreateLevelFromLine(const string &line) const;\r
 \r
                //! Get the Level database file path\r
                string GetLevelFilePath(void) const;\r
 \r
                void Initialize(const string &filename);\r
 \r
-               map<string, shared_ptr<LevelGO> > spLevelCache;\r
+               map<string, boost::shared_ptr<LevelGO> > spLevelCache;\r
        };\r
 } } } // GameServ.DataLayer.DataAccessObjects.File\r
 \r
index 95c7ccc28d61b2d21fd92b595a68c33365280338..3a4ae7b12e526ab997707d988312b9ba897cfd76 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::MasterGO;
 using GameServ::DataLayer::DataAccessObjects::IMasterDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -34,11 +34,11 @@ namespace GameServ {  namespace DataLayer { namespace File
                virtual ~FileMasterDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<MasterGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<MasterGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
-               void Update(shared_ptr<MasterGO> spMaster);\r
-               void Insert(shared_ptr<MasterGO> spMaster);\r
+               void Update(boost::shared_ptr<MasterGO> spMaster);\r
+               void Insert(boost::shared_ptr<MasterGO> spMaster);\r
 \r
                void LoadMasterCache(void);\r
 \r
@@ -49,14 +49,14 @@ namespace GameServ {  namespace DataLayer { namespace File
                // Helper Methods /////////////////////////////////////////////////////\r
 \r
                //! Creates the MasterGO found at iterator position\r
-               shared_ptr<MasterGO> CreateMasterFromLine(const string &line) const;\r
+               boost::shared_ptr<MasterGO> CreateMasterFromLine(const string &line) const;\r
 \r
                //! Get the Master database file path\r
                string GetMasterFilePath(void) const;\r
 \r
                void Initialize(const string &filename);\r
 \r
-               map<string, shared_ptr<MasterGO> > spMasterCache;\r
+               map<string, boost::shared_ptr<MasterGO> > spMasterCache;\r
        };\r
 } } } // GameServ.DataLayer.DataAccessObjects.File\r
 \r
index 5b2377711b07d23ae15fe8a096619511041a24f4..e08067daf5750c9cae1132f85abdf0c6562e1031 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::MonsterGO;
 using GameServ::DataLayer::DataAccessObjects::IMonsterDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -34,7 +34,7 @@ namespace GameServ {  namespace DataLayer { namespace File
                virtual ~FileMonsterDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<MonsterGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<MonsterGO> GetById(const string &Id) const;\r
 \r
                virtual vector<string> GetMonsterIdsByLevelId(const string &LevelId) const;\r
 \r
@@ -43,8 +43,8 @@ namespace GameServ {  namespace DataLayer { namespace File
                void LoadMonsterCache(void);\r
 \r
                \r
-               void Update(shared_ptr<MonsterGO> spMonster);\r
-               void Insert(shared_ptr<MonsterGO> spMonster);\r
+               void Update(boost::shared_ptr<MonsterGO> spMonster);\r
+               void Insert(boost::shared_ptr<MonsterGO> spMonster);\r
 \r
        private:\r
                //! Data file\r
@@ -53,14 +53,14 @@ namespace GameServ {  namespace DataLayer { namespace File
                // Helper Methods /////////////////////////////////////////////////////\r
 \r
                //! Creates the MonsterGO found at iterator position\r
-               shared_ptr<MonsterGO> CreateMonsterFromLine(const string &line) const;\r
+               boost::shared_ptr<MonsterGO> CreateMonsterFromLine(const string &line) const;\r
 \r
                //! Get the Monster database file path\r
                string GetMonsterFilePath(void) const;\r
 \r
                void Initialize(const string &filename);\r
 \r
-               map<string, shared_ptr<MonsterGO> > spMonsterCache;\r
+               map<string, boost::shared_ptr<MonsterGO> > spMonsterCache;\r
        };\r
 } } } // GameServ.DataLayer.DataAccessObjects.File\r
 \r
index f81729d045e89cc7ba59b038102b8cd4e5325d66..94acca20ea7c672101a5256eaadd2d29959bc92d 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::PlayerGO;
 using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -34,17 +34,17 @@ namespace GameServ {  namespace DataLayer { namespace File
                virtual ~FilePlayerDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<PlayerGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<PlayerGO> GetById(const string &Id) const;\r
 \r
                virtual list<string> GetIdsByName(const string &Name) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
 \r
-               virtual void Insert(shared_ptr<PlayerGO> spPlayer);\r
-               virtual void Update(shared_ptr<PlayerGO> spPlayer);\r
+               virtual void Insert(boost::shared_ptr<PlayerGO> spPlayer);\r
+               virtual void Update(boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
-               virtual void SetFlags(shared_ptr<PlayerGO> spPlayer, const int &flags) const;\r
-               virtual int GetFlags(shared_ptr<PlayerGO> spPlayer) const;\r
+               virtual void SetFlags(boost::shared_ptr<PlayerGO> spPlayer, const int &flags) const;\r
+               virtual int GetFlags(boost::shared_ptr<PlayerGO> spPlayer) const;\r
 \r
                void LoadPlayerCache(void);\r
                void WritePlayerCache(void) const;\r
@@ -56,16 +56,16 @@ namespace GameServ {  namespace DataLayer { namespace File
                // Helper Methods /////////////////////////////////////////////////////\r
 \r
                //! Creates the PlayerGO found at iterator position\r
-               shared_ptr<PlayerGO> CreatePlayerFromLine(const string &line) const;\r
-               void LoadInventoryFromLine(shared_ptr<PlayerGO> spPlayer, const string &line) const;\r
-               string CreateLineFromPlayer(shared_ptr<PlayerGO> spPlayer) const;\r
+               boost::shared_ptr<PlayerGO> CreatePlayerFromLine(const string &line) const;\r
+               void LoadInventoryFromLine(boost::shared_ptr<PlayerGO> spPlayer, const string &line) const;\r
+               string CreateLineFromPlayer(boost::shared_ptr<PlayerGO> spPlayer) const;\r
 \r
                //! Get the Player database file path\r
                string GetPlayerFilePath(void) const;\r
 \r
                void Initialize(const string &filename);\r
 \r
-               map<string, shared_ptr<PlayerGO> > spPlayerCache;\r
+               map<string, boost::shared_ptr<PlayerGO> > spPlayerCache;\r
        };\r
 } } } // GameServ.DataLayer.DataAccessObjects.File\r
 \r
index ea39258d1cd4a894d460f308dc837f2fb53845f1..c9882560ab9a9d0edaff48aaecba8a5d843dcead 100644 (file)
@@ -14,7 +14,7 @@ using GameServ::DataLayer::DataAccessObjects::ILevelDAO;
 \r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace DataLayer \r
 {\r
@@ -32,19 +32,19 @@ namespace GameServ { namespace DataLayer
                virtual ~IDAOFactory(void) { }\r
 \r
                //! Player DataAccessObject for all Player related operations\r
-               virtual shared_ptr<IPlayerDAO> GetPlayerDAO(void) const = 0;\r
+               virtual boost::shared_ptr<IPlayerDAO> GetPlayerDAO(void) const = 0;\r
 \r
                //! Item DataAccessObject for all item related operations\r
-               virtual shared_ptr<IItemDAO> GetItemDAO(void) const = 0;\r
+               virtual boost::shared_ptr<IItemDAO> GetItemDAO(void) const = 0;\r
 \r
                //! Monster DataAccessObject for all monster related operations\r
-               virtual shared_ptr<IMonsterDAO> GetMonsterDAO(void) const = 0;\r
+               virtual boost::shared_ptr<IMonsterDAO> GetMonsterDAO(void) const = 0;\r
 \r
                //! Master DataAccessObject for all master related operations\r
-               virtual shared_ptr<IMasterDAO> GetMasterDAO(void) const = 0;\r
+               virtual boost::shared_ptr<IMasterDAO> GetMasterDAO(void) const = 0;\r
 \r
                //! Level DataAccessObject for all level related operations\r
-               virtual shared_ptr<ILevelDAO> GetLevelDAO(void) const = 0;\r
+               virtual boost::shared_ptr<ILevelDAO> GetLevelDAO(void) const = 0;\r
 \r
 \r
 \r
index 8a050e96e6284682d266736f73f0be2b56c8d461..f4ea4c0c6c550a7c8e468a4aa58423a0bbdbe147 100644 (file)
@@ -4,8 +4,8 @@
 #include <GameServ/GameLayer/GameObjects/ItemGO.h>\r
 using GameServ::GameLayer::GameObjects::ItemGO;\r
 \r
-#include <boost/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
 \r
 #include <list>\r
 using std::list;\r
@@ -32,7 +32,7 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                        \return A boost shared pointer to a Item game object if found\r
                        otherwise the list is empty.\r
                */\r
-               virtual shared_ptr<ItemGO> GetById(const string &Id) const = 0;\r
+               virtual boost::shared_ptr<ItemGO> GetById(const string &Id) const = 0;\r
 \r
                //! Function to quickly search to see if an Id exists or not\r
                /*!\r
@@ -41,8 +41,8 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                */\r
                virtual bool IdExists(const string &Id) const = 0;\r
 \r
-               virtual void Insert(shared_ptr<ItemGO> spItem) = 0;\r
-               virtual void Update(shared_ptr<ItemGO> spItem) = 0;\r
+               virtual void Insert(boost::shared_ptr<ItemGO> spItem) = 0;\r
+               virtual void Update(boost::shared_ptr<ItemGO> spItem) = 0;\r
 \r
        private:\r
                \r
index 7f18958990bc74a7e08cf8dd166157346cd397c2..55e44cc8293f10a4d56152f060c59845bd6c5a59 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::GameLayer::GameObjects::LevelGO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <list>\r
 using std::list;\r
@@ -32,7 +32,7 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                        \return A boost shared pointer to a Level game object if found\r
                        otherwise the list is empty.\r
                */\r
-               virtual shared_ptr<LevelGO> GetById(const string &Id) const = 0;\r
+               virtual boost::shared_ptr<LevelGO> GetById(const string &Id) const = 0;\r
 \r
                //! Function to quickly search to see if an Id exists or not\r
                /*!\r
@@ -41,8 +41,8 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                */\r
                virtual bool IdExists(const string &Id) const = 0;\r
 \r
-               virtual void Insert(shared_ptr<LevelGO> spLevel) = 0;\r
-               virtual void Update(shared_ptr<LevelGO> spLevel) = 0;\r
+               virtual void Insert(boost::shared_ptr<LevelGO> spLevel) = 0;\r
+               virtual void Update(boost::shared_ptr<LevelGO> spLevel) = 0;\r
 \r
        private:\r
                \r
index 6b3905ca7ddf0a01984df47ea024571da615a304..089a37ae216b16eca4f12a1338cac6a3e52b1d52 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::GameLayer::GameObjects::MasterGO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <list>\r
 using std::list;\r
@@ -32,7 +32,7 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                        \return A boost shared pointer to a Master game object if found\r
                        otherwise the list is empty.\r
                */\r
-               virtual shared_ptr<MasterGO> GetById(const string &Id) const = 0;\r
+               virtual boost::shared_ptr<MasterGO> GetById(const string &Id) const = 0;\r
 \r
                //! Function to quickly search to see if an Id exists or not\r
                /*!\r
@@ -41,8 +41,8 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                */\r
                virtual bool IdExists(const string &Id) const = 0;\r
 \r
-               virtual void Update(shared_ptr<MasterGO> spMaster) = 0;\r
-               virtual void Insert(shared_ptr<MasterGO> spMaster) = 0;\r
+               virtual void Update(boost::shared_ptr<MasterGO> spMaster) = 0;\r
+               virtual void Insert(boost::shared_ptr<MasterGO> spMaster) = 0;\r
 \r
        private:\r
                \r
index dfd591c4b4535539d57202491d3b5fa3ac3a15e4..7deff480c4181c559bb6d4609c1dc0238e1cf2f3 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::GameLayer::GameObjects::MonsterGO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <vector>\r
 using std::vector;\r
@@ -32,7 +32,7 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                        \return A boost shared pointer to a Monster game object if found\r
                        otherwise the list is empty.\r
                */\r
-               virtual shared_ptr<MonsterGO> GetById(const string &Id) const = 0;\r
+               virtual boost::shared_ptr<MonsterGO> GetById(const string &Id) const = 0;\r
 \r
                //! Function to quickly search to see if an Id exists or not\r
                /*!\r
@@ -43,8 +43,8 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
 \r
                virtual vector<string> GetMonsterIdsByLevelId(const string &LevelId) const = 0;\r
 \r
-               virtual void Update(shared_ptr<MonsterGO> spMonster) = 0;\r
-               virtual void Insert(shared_ptr<MonsterGO> spMonster) = 0;\r
+               virtual void Update(boost::shared_ptr<MonsterGO> spMonster) = 0;\r
+               virtual void Insert(boost::shared_ptr<MonsterGO> spMonster) = 0;\r
 \r
        private:\r
                \r
index 2d82a68af15c7e1d8260e14a85042a2894dc445f..dd59ff39ab07a57cee127dee445126ca57a710c8 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::GameLayer::GameObjects::PlayerGO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <list>\r
 using std::list;\r
@@ -32,7 +32,7 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                        \return A boost shared pointer to a Player game object if found\r
                        otherwise the list is empty.\r
                */\r
-               virtual shared_ptr<PlayerGO> GetById(const string &Id) const = 0;\r
+               virtual boost::shared_ptr<PlayerGO> GetById(const string &Id) const = 0;\r
 \r
                /*! Get a list of Player Ids by Name\r
                \param Name The partial name of the Player to match against the beginning of a Player name\r
@@ -47,8 +47,8 @@ namespace GameServ { namespace DataLayer { namespace DataAccessObjects
                */\r
                virtual bool IdExists(const string &Id) const = 0;\r
 \r
-               virtual void Insert(shared_ptr<PlayerGO> spPlayer) = 0;\r
-               virtual void Update(shared_ptr<PlayerGO> spPlayer) = 0;\r
+               virtual void Insert(boost::shared_ptr<PlayerGO> spPlayer) = 0;\r
+               virtual void Update(boost::shared_ptr<PlayerGO> spPlayer) = 0;\r
        private:\r
                \r
                \r
index 575f466849eb9b226594ef551985c7776f347427..c1f2fda26b7ecc58fe9561882b52380e317b5117 100644 (file)
@@ -17,7 +17,7 @@ using GameServ::DataLayer::DataAccessObjects::ILevelDAO;
 \r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace DataLayer { namespace MySQL\r
 {\r
@@ -33,11 +33,11 @@ namespace GameServ { namespace DataLayer { namespace MySQL
 \r
                // Overrides //////////////////////////////////////////////////////////\r
                \r
-               virtual shared_ptr<IPlayerDAO> GetPlayerDAO(void) const;\r
-               virtual shared_ptr<IItemDAO> GetItemDAO(void) const;\r
-               virtual shared_ptr<IMonsterDAO> GetMonsterDAO(void) const;\r
-               virtual shared_ptr<IMasterDAO> GetMasterDAO(void) const;\r
-               virtual shared_ptr<ILevelDAO> GetLevelDAO(void) const;\r
+               virtual boost::shared_ptr<IPlayerDAO> GetPlayerDAO(void) const;\r
+               virtual boost::shared_ptr<IItemDAO> GetItemDAO(void) const;\r
+               virtual boost::shared_ptr<IMonsterDAO> GetMonsterDAO(void) const;\r
+               virtual boost::shared_ptr<IMasterDAO> GetMasterDAO(void) const;\r
+               virtual boost::shared_ptr<ILevelDAO> GetLevelDAO(void) const;\r
 \r
        private:\r
 \r
index 2508f7e3f7b2006ad335d08031b21d3e18f0ccff..a9c1410b0008a3b08710929471a18bbc9ec1f4e9 100644 (file)
@@ -6,8 +6,8 @@ using GameServ::GameLayer::GameObjects::ItemGO;
 #include <GameServ/DataLayer/IItemDAO.h>\r
 using GameServ::DataLayer::DataAccessObjects::IItemDAO;\r
 \r
-#include <boost/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -32,12 +32,12 @@ namespace GameServ {  namespace DataLayer { namespace MySQL
                virtual ~MySQLItemDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<ItemGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<ItemGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
                \r
-               virtual void Insert(shared_ptr<ItemGO> spItem);\r
-               virtual void Update(shared_ptr<ItemGO> spItem);\r
+               virtual void Insert(boost::shared_ptr<ItemGO> spItem);\r
+               virtual void Update(boost::shared_ptr<ItemGO> spItem);\r
 \r
        private:\r
                //! Data mysql\r
index 817879f6adbf30d1e685fc59ed4c67ee9017135d..577bbf86ae6654c66188d075188d105a08df241e 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::LevelGO;
 using GameServ::DataLayer::DataAccessObjects::ILevelDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -41,14 +41,14 @@ namespace GameServ {  namespace DataLayer { namespace MySQL
                virtual ~MySQLLevelDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<LevelGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<LevelGO> GetById(const string &Id) const;\r
 \r
                virtual list<string> GetIdsByName(const string &Name) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
 \r
-               virtual void Insert(shared_ptr<LevelGO> spLevel);\r
-               virtual void Update(shared_ptr<LevelGO> spLevel);\r
+               virtual void Insert(boost::shared_ptr<LevelGO> spLevel);\r
+               virtual void Update(boost::shared_ptr<LevelGO> spLevel);\r
 \r
 \r
        private:\r
index f45eee0f2571885a5ccdef0306889c7f610d364f..50cbd07779b477e7584f9dcb4ae088444e4bf522 100644 (file)
@@ -6,8 +6,8 @@ using GameServ::GameLayer::GameObjects::MasterGO;
 #include <GameServ/DataLayer/IMasterDAO.h>\r
 using GameServ::DataLayer::DataAccessObjects::IMasterDAO;\r
 \r
-#include <boost/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -33,12 +33,12 @@ namespace GameServ {  namespace DataLayer { namespace MySQL
                virtual ~MySQLMasterDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<MasterGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<MasterGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
                \r
-               virtual void Insert(shared_ptr<MasterGO> spMaster);\r
-               virtual void Update(shared_ptr<MasterGO> spMaster);\r
+               virtual void Insert(boost::shared_ptr<MasterGO> spMaster);\r
+               virtual void Update(boost::shared_ptr<MasterGO> spMaster);\r
 \r
        private:\r
                //! Data mysql\r
index 2f77ee9b21ffda75f447d83b47ca14ce8e3de53c..9a2035a445817a4c7e7ee56b24432595ec535f81 100644 (file)
@@ -6,8 +6,8 @@ using GameServ::GameLayer::GameObjects::MonsterGO;
 #include <GameServ/DataLayer/IMonsterDAO.h>\r
 using GameServ::DataLayer::DataAccessObjects::IMonsterDAO;\r
 \r
-#include <boost/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -33,12 +33,12 @@ namespace GameServ {  namespace DataLayer { namespace MySQL
                virtual ~MySQLMonsterDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<MonsterGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<MonsterGO> GetById(const string &Id) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
                \r
-               virtual void Insert(shared_ptr<MonsterGO> spMonster);\r
-               virtual void Update(shared_ptr<MonsterGO> spMonster);\r
+               virtual void Insert(boost::shared_ptr<MonsterGO> spMonster);\r
+               virtual void Update(boost::shared_ptr<MonsterGO> spMonster);\r
 \r
        private:\r
                //! Data mysql\r
index 89002927551d99e3ad8eb72f2d8996344e6f0e6c..2b2cc4bed425f3bea6608a405b49f3dd5335158f 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::GameLayer::GameObjects::PlayerGO;
 using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -40,14 +40,14 @@ namespace GameServ {  namespace DataLayer { namespace MySQL
                virtual ~MySQLPlayerDAO();\r
 \r
                // Methods ////////////////////////////////////////////////////////////\r
-               virtual shared_ptr<PlayerGO> GetById(const string &Id) const;\r
+               virtual boost::shared_ptr<PlayerGO> GetById(const string &Id) const;\r
 \r
                virtual list<string> GetIdsByName(const string &Name) const;\r
 \r
                virtual bool IdExists(const string &Id) const;\r
 \r
-               virtual void Insert(shared_ptr<PlayerGO> spPlayer);\r
-               virtual void Update(shared_ptr<PlayerGO> spPlayer);\r
+               virtual void Insert(boost::shared_ptr<PlayerGO> spPlayer);\r
+               virtual void Update(boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
 \r
        private:\r
index c4f9fc03686823137dbda5814ae406a674893780..89630abbf6f303523857fc95e698877b77cad72a 100644 (file)
@@ -11,7 +11,6 @@ using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;
 \r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
 \r
 #include <string>\r
 using std::string;\r
@@ -24,17 +23,17 @@ public:
        FightGL();\r
        ~FightGL();\r
        \r
-       unsigned int PlayerAttackMonster(shared_ptr<PlayerGO> spPlayer, shared_ptr<MonsterGO> spMonster);\r
-       unsigned int MonsterAttackPlayer(shared_ptr<MonsterGO> spMonster, shared_ptr<PlayerGO> spPlayer);\r
+       unsigned int PlayerAttackMonster(boost::shared_ptr<PlayerGO> spPlayer, boost::shared_ptr<MonsterGO> spMonster);\r
+       unsigned int MonsterAttackPlayer(boost::shared_ptr<MonsterGO> spMonster, boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
-       unsigned int PlayerAttackPlayer(shared_ptr<PlayerGO> spPlayerAttacker, shared_ptr<PlayerGO> spPlayerDefender);\r
+       unsigned int PlayerAttackPlayer(boost::shared_ptr<PlayerGO> spPlayerAttacker, boost::shared_ptr<PlayerGO> spPlayerDefender);\r
        \r
 \r
 private:\r
 \r
        unsigned int CalculateAttack(unsigned int strength, unsigned int defense);\r
        void Initialize();\r
-       shared_ptr<IPlayerDAO> mspPlayerDAO;\r
+       boost::shared_ptr<IPlayerDAO> mspPlayerDAO;\r
 };\r
 \r
 }}\r
index 520c1c9fd0d3c644976363f610c576238fa3f8c6..82336f9ea7e3a89378d5bef5e60a45ba062ad387 100644 (file)
@@ -13,7 +13,7 @@ using GameServ::GameLayer::GameObjects::MonsterGO;
 \r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -26,12 +26,12 @@ public:
        ForestGL();\r
        ~ForestGL();\r
        \r
-       shared_ptr<MonsterGO> GetRandomMonsterForPlayer(shared_ptr<PlayerGO> spPlayer);\r
+       boost::shared_ptr<MonsterGO> GetRandomMonsterForPlayer(boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
 private:\r
        void Initialize();\r
-       shared_ptr<IMonsterDAO> mspMonsterDAO;\r
-       shared_ptr<ILevelDAO> mspLevelDAO;\r
+       boost::shared_ptr<IMonsterDAO> mspMonsterDAO;\r
+       boost::shared_ptr<ILevelDAO> mspLevelDAO;\r
 };\r
 \r
 }}\r
index f6d5335a4a9936d52a2458144c0fa72332954470..14f58e415505146d3a85cc229653e20bad4835f2 100644 (file)
@@ -10,7 +10,7 @@ using std::string;
 using std::unary_function;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace GameLayer { namespace GameObjects\r
 {\r
@@ -45,13 +45,13 @@ namespace GameServ { namespace GameLayer { namespace GameObjects
        };\r
 \r
        //! Functor to compare Id's of Game Objects\r
-       class GameObjectIds_Eq : public unary_function<shared_ptr<GameObject>, bool>\r
+       class GameObjectIds_Eq : public unary_function<boost::shared_ptr<GameObject>, bool>\r
        {\r
        public:\r
                explicit GameObjectIds_Eq(const string &Id);\r
                \r
-               //! Comparison against shared_ptr types\r
-               bool operator()(const shared_ptr<GameObject> &BO) const;\r
+               //! Comparison against boost::shared_ptr types\r
+               bool operator()(const boost::shared_ptr<GameObject> &BO) const;\r
                \r
        private:\r
                string mId;\r
index d0f6771e411e9e2ed1ad814fad69fbe5cde24bce..1142a8c65f35692021936d30299be01907c1da5d 100644 (file)
@@ -5,7 +5,7 @@ using GameServ::GameLayer::GameObjects::GameObject;
 #include <GameServ/Types.h>\r
 using GameServ::Types::ItemTypes;\r
 using GameServ::Types::Modifiers;\r
-using GameServ::Types::Range;\r
+using GameServ::Types::IntRange;\r
 using GameServ::Types::ObjectTypes;\r
 \r
 #include <string>\r
@@ -46,15 +46,15 @@ namespace GameServ { namespace GameLayer { namespace GameObjects {
                virtual ItemTypes::ItemType Type(void) const = 0;\r
 \r
                //! Property get - Modifiers\r
-               map<Modifiers::Modifier, Range<int> > Modifiers(void) const;\r
+               map<Modifiers::Modifier, IntRange> Modifiers(void) const;\r
 \r
                //! Property set - Modifiers\r
-               void Modifiers(const map<Modifiers::Modifier, Range<int> > &modifiers);\r
+               void Modifiers(const map<Modifiers::Modifier, IntRange> &modifiers);\r
 \r
                //! Use item on a game object\r
-               virtual void Use(shared_ptr<GameObject> spObject);\r
+               virtual void Use(boost::shared_ptr<GameObject> spObject);\r
                //! Undo item's last effect on a game object\r
-               virtual void Undo(shared_ptr<GameObject> spObject);\r
+               virtual void Undo(boost::shared_ptr<GameObject> spObject);\r
 \r
                virtual ItemGO *Clone(void) const = 0;\r
 \r
@@ -65,11 +65,11 @@ namespace GameServ { namespace GameLayer { namespace GameObjects {
                string mName;\r
                unsigned long int mPrice;\r
                int mUses;\r
-               map<Modifiers::Modifier, Range<int> > mModifiers;\r
+               map<Modifiers::Modifier, IntRange> mModifiers;\r
 \r
                //! Base class standard modifier applier. Simply adds the modified stat to the correct stat\r
-               virtual void ApplyModifier(shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, Range<int> r);\r
-               virtual void UndoModifier(shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, Range<int> r);\r
+               virtual void ApplyModifier(boost::shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, IntRange);\r
+               virtual void UndoModifier(boost::shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, IntRange);\r
        };\r
 }}}\r
 #endif
\ No newline at end of file
index 0bf17073802bf0308573557bda574b483701533d..ba16096ba831a678ad435c2707cec93a909843aa 100644 (file)
@@ -9,10 +9,10 @@ using GameServ::GameLayer::GameObjects::MonsterGO;
 \r
 #include <GameServ/Types.h>\r
 using GameServ::Types::ObjectTypes;\r
-using GameServ::Types::Range;\r
+using GameServ::Types::IntRange;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -20,7 +20,7 @@ using std::string;
 using std::vector;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 namespace GameServ { namespace GameLayer { namespace GameObjects\r
 {\r
@@ -44,40 +44,40 @@ namespace GameServ { namespace GameLayer { namespace GameObjects
                unsigned int Number(void) const;\r
 \r
                //! Property set - Strength Range\r
-               void StrengthRange(const Range<int> &value);\r
+               void StrengthRange(const IntRange &value);\r
                //! Property get - Strength Range\r
-               Range<int> StrengthRange(void) const;\r
+               IntRange StrengthRange(void) const;\r
 \r
 \r
                //! Property set - Defense Range\r
-               void DefenseRange(const Range<int> &value);\r
+               void DefenseRange(const IntRange &value);\r
                //! Property get - Defense Range\r
-               Range<int> DefenseRange(void) const;\r
+               IntRange DefenseRange(void) const;\r
 \r
                //! Property set - Gold Range\r
-               void GoldRange(const Range<int> &value);\r
+               void GoldRange(const IntRange &value);\r
                //! Property get - Gold Range\r
-               Range<int> GoldRange(void) const;\r
+               IntRange GoldRange(void) const;\r
 \r
                //! Property set - Experience Range\r
-               void ExperienceRange(const Range<int> &value);\r
+               void ExperienceRange(const IntRange &value);\r
                //! Property get - Experience Range\r
-               Range<int> ExperienceRange(void) const;\r
+               IntRange ExperienceRange(void) const;\r
 \r
 \r
                //! Property set - Health Range\r
-               void HealthRange(const Range<int> &value);\r
+               void HealthRange(const IntRange &value);\r
                //! Property get - Health Range\r
-               Range<int> HealthRange(void) const;\r
+               IntRange HealthRange(void) const;\r
 \r
                \r
        private:\r
                unsigned int mNumber;\r
-               Range<int> mStrength;\r
-               Range<int> mDefense;\r
-               Range<int> mGold;\r
-               Range<int> mExperience;\r
-               Range<int> mHealth;\r
+               IntRange mStrength;\r
+               IntRange mDefense;\r
+               IntRange mGold;\r
+               IntRange mExperience;\r
+               IntRange mHealth;\r
        };\r
 }}} // GameServ::GameLayer::GameObjects\r
 #endif
\ No newline at end of file
index 1d8da315dffc748bf6c05f5c665a3309cc56def6..80b70284c2467fa54d0bbca8baa0d5cf16245fe4 100644 (file)
@@ -15,7 +15,6 @@ using GameServ::GameLayer::GameObjects::WeaponGO;
 using GameServ::Types::ObjectTypes;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
 \r
 #include <string>\r
 using std::string;\r
@@ -102,9 +101,9 @@ namespace GameServ { namespace GameLayer { namespace GameObjects
                void WeaponId(const string &value);\r
 \r
                //! Property get - Weapon\r
-               shared_ptr<WeaponGO> Weapon(void) const;\r
+               boost::shared_ptr<WeaponGO> Weapon(void) const;\r
                //! Property set - Weapon\r
-               void Weapon(shared_ptr<WeaponGO> spWeapon);\r
+               void Weapon(boost::shared_ptr<WeaponGO> spWeapon);\r
 \r
                //! Property get - ArmorId\r
                string ArmorId(void) const;\r
@@ -112,9 +111,9 @@ namespace GameServ { namespace GameLayer { namespace GameObjects
                void ArmorId(const string &value);\r
 \r
                //! Property get - Armor\r
-               shared_ptr<ArmorGO> Armor(void) const;\r
+               boost::shared_ptr<ArmorGO> Armor(void) const;\r
                //! Property set - Armor\r
-               void Armor(shared_ptr<ArmorGO> spArmor);\r
+               void Armor(boost::shared_ptr<ArmorGO> spArmor);\r
 \r
                //! Property set - Password\r
                void Password(const string &value);\r
@@ -161,8 +160,8 @@ namespace GameServ { namespace GameLayer { namespace GameObjects
                int mForestFights;\r
                int mPlayerFights;\r
                string mPassword;\r
-               shared_ptr<WeaponGO> mWeapon;\r
-               shared_ptr<ArmorGO> mArmor;\r
+               boost::shared_ptr<WeaponGO> mWeapon;\r
+               boost::shared_ptr<ArmorGO> mArmor;\r
                ptime mLastLogin;\r
 \r
                bool mFoughtMaster;\r
index a885603f4652cd784bc1ea5a6e3819c2069cc6fa..2a8d9ae7b279642b05e09d8101a559012aa945e7 100644 (file)
@@ -2,7 +2,7 @@
 #define __GS__INVENTORYMANAGER_H__\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 #include <GameServ/GameLayer/GameObjects/ItemGO.h>\r
 using GameServ::GameLayer::GameObjects::ItemGO;\r
 \r
@@ -15,7 +15,7 @@ using std::map;
 namespace GameServ { namespace GameLayer { namespace Helpers {\r
 \r
 \r
-typedef list< shared_ptr<ItemGO> > ItemList;\r
+typedef list< boost::shared_ptr<ItemGO> > ItemList;\r
 typedef map<string, ItemList> PlayerInventoryMap;\r
 \r
 \r
@@ -24,10 +24,10 @@ class InventoryManager
 public:\r
        ~InventoryManager();\r
 \r
-       static shared_ptr<InventoryManager> Instance();\r
+       static boost::shared_ptr<InventoryManager> Instance();\r
 \r
-       void AddItem(const string &PlayerId, shared_ptr<ItemGO> spItem);\r
-       void RemoveItem(const string &PlayerId, shared_ptr<ItemGO> spItem);\r
+       void AddItem(const string &PlayerId, boost::shared_ptr<ItemGO> spItem);\r
+       void RemoveItem(const string &PlayerId, boost::shared_ptr<ItemGO> spItem);\r
        ItemList GetInventory(const string &PlayerId) const;    \r
        bool PlayerHasInventory(const string &PlayerId) const;\r
 \r
@@ -36,7 +36,7 @@ protected:
 private:\r
 \r
        PlayerInventoryMap mInventoryTable;\r
-       static shared_ptr<InventoryManager> mInstance;\r
+       static boost::shared_ptr<InventoryManager> mInstance;\r
 \r
 }; // InventoryManager\r
 \r
index 562255e8da781a8dcdbf601558d21b7428dfbe2b..3e296f3193fd59024f22805d23b4150667302f4c 100644 (file)
@@ -5,7 +5,7 @@
 using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <list>\r
 using std::list;\r
@@ -19,12 +19,12 @@ public:
        PlayerGL();\r
        ~PlayerGL();\r
 \r
-       shared_ptr<PlayerGO> GetById(const string &Id);\r
-       void Insert(shared_ptr<PlayerGO> spPlayer);\r
+       boost::shared_ptr<PlayerGO> GetById(const string &Id);\r
+       void Insert(boost::shared_ptr<PlayerGO> spPlayer);\r
        \r
 private:\r
        void Initialize();\r
-       shared_ptr<IPlayerDAO> mspPlayerDAO;\r
+       boost::shared_ptr<IPlayerDAO> mspPlayerDAO;\r
 };\r
 \r
 }}\r
diff --git a/gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj b/gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj
new file mode 100644 (file)
index 0000000..52c7a7e
--- /dev/null
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{3CED9BD5-BEAA-4C36-A735-AFF2B3F2CF42}</ProjectGuid>\r
+    <RootNamespace>libgameservgldl</RootNamespace>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\mysql-5.5.15-win32\include;C:\MySQL++\include;C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\boost_1_47_0;$(IncludePath)</IncludePath>\r
+    <ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\mysql-5.5.15-win32\bin;$(ExecutablePath)</ExecutablePath>\r
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\MySQL++\lib;C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\boost_1_47_0\stage\lib;C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\mysql-5.5.15-win32\lib;$(LibraryPath)</LibraryPath>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <Optimization>Disabled</Optimization>\r
+      <AdditionalIncludeDirectories>C:\Users\ddatti\Documents\Visual Studio 2010\Projects\C++\boost_1_47_0;$(ProjectDir)\include;$(ProjectDir)\..\libgameservcore\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS ;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MinimalRebuild>true</MinimalRebuild>\r
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+    </ClCompile>\r
+    <Lib>\r
+      <AdditionalDependencies>libmysql.lib;wsock32.lib;mysqlpp_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Lib>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+    </ClCompile>\r
+    <Link>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+      <DataExecutionPrevention>\r
+      </DataExecutionPrevention>\r
+      <TargetMachine>MachineX86</TargetMachine>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="src\DataLayer\DataAccess.cpp" />\r
+    <ClCompile Include="src\DataLayer\DataLayerExceptions.cpp" />\r
+    <ClCompile Include="src\DataLayer\IItemDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\ILevelDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\IMasterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\IMonsterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\IPlayerDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileDAOFactory.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileId.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileItemDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileLevelDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileMasterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FileMonsterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\File\FilePlayerDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLDAOFactory.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLId.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLItemDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLLevelDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLMasterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLMonsterDAO.cpp" />\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLPlayerDAO.cpp" />\r
+    <ClCompile Include="src\GameLayer\FightGL.cpp" />\r
+    <ClCompile Include="src\GameLayer\ForestGL.cpp" />\r
+    <ClCompile Include="src\GameLayer\PlayerGL.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\ArmorGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\GameObject.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\ItemGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\LevelGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\MasterGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\MonsterGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\PlayerGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\PotionGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\GameObjects\WeaponGO.cpp" />\r
+    <ClCompile Include="src\GameLayer\Helpers\InventoryManager.cpp" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="include\GameServ\DataLayer\DataAccess.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\DataLayerExceptions.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\IDAOFactory.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\IItemDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\ILevelDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\IMasterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\IMonsterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\IPlayerDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileDAOFactory.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileId.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileItemDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileLevelDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileMasterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileMonsterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FilePlayerDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLDAOFactory.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLId.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLItemDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLLevelDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLMasterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLMonsterDAO.h" />\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLPlayerDAO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\FightGL.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\ForestGL.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\PlayerGL.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\ArmorGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\GameObject.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\ItemGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\LevelGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\MasterGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\MonsterGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\PlayerGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\PotionGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\WeaponGO.h" />\r
+    <ClInclude Include="include\GameServ\GameLayer\Helpers\InventoryManager.h" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\libgameservcore\libgameservcore.vcxproj">\r
+      <Project>{279aa91c-8638-45e5-aaa3-988f74764a97}</Project>\r
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj.filters b/gameserv-2.0/libgameservgldl/libgameservgldl.vcxproj.filters
new file mode 100644 (file)
index 0000000..d6e294d
--- /dev/null
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="DataLayer">\r
+      <UniqueIdentifier>{1c8d1f5d-1ae1-422f-bef8-d9babd1320fa}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="DataLayer\File">\r
+      <UniqueIdentifier>{1c02f37c-8a70-4e8c-ba00-63edf14077df}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="DataLayer\MySQL">\r
+      <UniqueIdentifier>{d2187353-d23f-42f0-bf1b-6beb30fe274d}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="GameLayer">\r
+      <UniqueIdentifier>{0850b3f0-ba53-44ec-9c18-15260f6a3dec}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="GameLayer\GameObjects">\r
+      <UniqueIdentifier>{608549e1-0c0b-4c2f-8a5c-8e62fbd7023b}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="GameLayer\Helpers">\r
+      <UniqueIdentifier>{d84587f2-8fba-4348-9b78-93434077b256}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="src\DataLayer\DataAccess.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\DataLayerExceptions.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\IItemDAO.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\ILevelDAO.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\IMasterDAO.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\IMonsterDAO.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\IPlayerDAO.cpp">\r
+      <Filter>DataLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileDAOFactory.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileId.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileItemDAO.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileLevelDAO.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileMasterDAO.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FileMonsterDAO.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\File\FilePlayerDAO.cpp">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLDAOFactory.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLId.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLItemDAO.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLLevelDAO.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLMasterDAO.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLMonsterDAO.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\DataLayer\MySQL\MySQLPlayerDAO.cpp">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\FightGL.cpp">\r
+      <Filter>GameLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\ForestGL.cpp">\r
+      <Filter>GameLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\PlayerGL.cpp">\r
+      <Filter>GameLayer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\ArmorGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\GameObject.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\ItemGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\LevelGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\MasterGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\MonsterGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\PlayerGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\PotionGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\GameObjects\WeaponGO.cpp">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="src\GameLayer\Helpers\InventoryManager.cpp">\r
+      <Filter>GameLayer\Helpers</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="include\GameServ\DataLayer\DataAccess.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\DataLayerExceptions.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\IDAOFactory.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\IItemDAO.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\ILevelDAO.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\IMasterDAO.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\IMonsterDAO.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\IPlayerDAO.h">\r
+      <Filter>DataLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileDAOFactory.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileId.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileItemDAO.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileLevelDAO.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileMasterDAO.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FileMonsterDAO.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\File\FilePlayerDAO.h">\r
+      <Filter>DataLayer\File</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLDAOFactory.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLId.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLItemDAO.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLLevelDAO.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLMasterDAO.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLMonsterDAO.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\DataLayer\MySQL\MySQLPlayerDAO.h">\r
+      <Filter>DataLayer\MySQL</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\FightGL.h">\r
+      <Filter>GameLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\ForestGL.h">\r
+      <Filter>GameLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\PlayerGL.h">\r
+      <Filter>GameLayer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\ArmorGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\GameObject.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\ItemGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\LevelGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\MasterGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\MonsterGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\PlayerGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\PotionGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\GameObjects\WeaponGO.h">\r
+      <Filter>GameLayer\GameObjects</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="include\GameServ\GameLayer\Helpers\InventoryManager.h">\r
+      <Filter>GameLayer\Helpers</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index dce5cad75790f427c5c8214c57762dab867cef43..4d1b7de0d3044bce45f04a7f1faa0eade25fb759 100644 (file)
@@ -8,18 +8,18 @@ using GameServ::DataLayer::File::FileDAOFactory;
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::format;\r
 using boost::str;\r
 \r
-shared_ptr<IDAOFactory> DataAccess::GetDataAccessFactory(const string &Provider)\r
+boost::shared_ptr<IDAOFactory> DataAccess::GetDataAccessFactory(const string &Provider)\r
 {\r
        // Make sure a provider was even specified\r
        if (Provider.empty())\r
                throw DataLayerException("When using the DataLayer you must specify a Provider programatically", __FILE__, __LINE__);\r
        \r
        if (Provider == "File")\r
-               return shared_ptr<IDAOFactory>(new FileDAOFactory());\r
+               return boost::shared_ptr<IDAOFactory>(new FileDAOFactory());\r
        // else if (Provider == "MySQL")\r
        // PUT OTHER PROVIDERS HERE\r
        else\r
index 157741cd25d195b45d85f2b6337eb911110500a9..d447b3e69edd1b383a3d7aa667698c8d389c9134 100644 (file)
@@ -13,7 +13,7 @@ using GameServ::DataLayer::File::FileMasterDAO;
 using GameServ::DataLayer::File::FileLevelDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 FileDAOFactory::FileDAOFactory(void)\r
 {\r
@@ -23,28 +23,28 @@ FileDAOFactory::~FileDAOFactory(void)
 {\r
 }\r
 \r
-shared_ptr<IPlayerDAO> FileDAOFactory::GetPlayerDAO(void) const\r
+boost::shared_ptr<IPlayerDAO> FileDAOFactory::GetPlayerDAO(void) const\r
 {\r
-       return shared_ptr<IPlayerDAO>(new FilePlayerDAO());\r
+       return boost::shared_ptr<IPlayerDAO>(new FilePlayerDAO());\r
 }\r
 \r
-shared_ptr<IItemDAO> FileDAOFactory::GetItemDAO(void) const\r
+boost::shared_ptr<IItemDAO> FileDAOFactory::GetItemDAO(void) const\r
 {\r
-       return shared_ptr<IItemDAO>(new FileItemDAO());\r
+       return boost::shared_ptr<IItemDAO>(new FileItemDAO());\r
 }\r
 \r
-shared_ptr<IMonsterDAO> FileDAOFactory::GetMonsterDAO(void) const\r
+boost::shared_ptr<IMonsterDAO> FileDAOFactory::GetMonsterDAO(void) const\r
 {\r
-       return shared_ptr<IMonsterDAO>(new FileMonsterDAO());\r
+       return boost::shared_ptr<IMonsterDAO>(new FileMonsterDAO());\r
 }\r
 \r
-shared_ptr<IMasterDAO> FileDAOFactory::GetMasterDAO(void) const\r
+boost::shared_ptr<IMasterDAO> FileDAOFactory::GetMasterDAO(void) const\r
 {\r
-       return shared_ptr<IMasterDAO>(new FileMasterDAO());\r
+       return boost::shared_ptr<IMasterDAO>(new FileMasterDAO());\r
 }\r
 \r
-shared_ptr<ILevelDAO> FileDAOFactory::GetLevelDAO(void) const\r
+boost::shared_ptr<ILevelDAO> FileDAOFactory::GetLevelDAO(void) const\r
 {\r
-       return shared_ptr<ILevelDAO>(new FileLevelDAO());\r
+       return boost::shared_ptr<ILevelDAO>(new FileLevelDAO());\r
 }\r
 \r
index c61a141c324dc4bf4c12bf6a5f9fd8d86f048289..fde64f39751b35c33e87ddbd8f510d372e93a1fb 100644 (file)
@@ -21,11 +21,11 @@ using GameServ::Types::ItemTypes;
 using GameServ::Types::Modifiers;\r
 using GameServ::Types::Exceptions::TypeException;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::format;\r
 using boost::str;\r
 using boost::algorithm::to_upper;\r
@@ -72,24 +72,24 @@ string FileItemDAO::GetItemFilePath() const
        return mFilename;\r
 }\r
 \r
-shared_ptr<ItemGO> FileItemDAO::GetById(const string &Id) const\r
+boost::shared_ptr<ItemGO> FileItemDAO::GetById(const string &Id) const\r
 {\r
-       map<string, shared_ptr<ItemGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<ItemGO> >::const_iterator iter;\r
        iter = spItemCache.find(Id);\r
        if (iter != spItemCache.end())\r
        {\r
-               return shared_ptr<ItemGO>(iter->second->Clone());\r
+               return boost::shared_ptr<ItemGO>(iter->second->Clone());\r
        }\r
        else\r
        {\r
-               return shared_ptr<ItemGO>();\r
+               return boost::shared_ptr<ItemGO>();\r
        }\r
 }\r
-shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const\r
+boost::shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<PotionGO> spPotion = shared_ptr<PotionGO>(new PotionGO());\r
-       map<Modifiers::Modifier, Range<int> > modifiers;\r
+       boost::shared_ptr<PotionGO> spPotion = boost::shared_ptr<PotionGO>(new PotionGO());\r
+       map<Modifiers::Modifier, IntRange> modifiers;\r
        boost::char_separator<char> sep("~", 0, boost::keep_empty_tokens);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -141,7 +141,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        int high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::strength] = Range<int>(high, low);\r
+       modifiers[Modifiers::strength] = IntRange(high, low);\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
        {\r
@@ -156,7 +156,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::defense] = Range<int>(high, low);\r
+       modifiers[Modifiers::defense] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -172,7 +172,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::maxhealth] = Range<int>(high, low);\r
+       modifiers[Modifiers::maxhealth] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -188,7 +188,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::health] = Range<int>(high, low);\r
+       modifiers[Modifiers::health] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -204,7 +204,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::forestfights] = Range<int>(high, low);\r
+       modifiers[Modifiers::forestfights] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -220,7 +220,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::playerfights] = Range<int>(high, low);\r
+       modifiers[Modifiers::playerfights] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -236,7 +236,7 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::gold] = Range<int>(high, low);\r
+       modifiers[Modifiers::gold] = IntRange(high, low);\r
 \r
                tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -252,16 +252,16 @@ shared_ptr<ItemGO> FileItemDAO::CreatePotionFromLine(const string &line) const
                        mFilename %  line), __FILE__, __LINE__);\r
        }\r
        high = lexical_cast<int>((*tok_iter));\r
-       modifiers[Modifiers::bank] = Range<int>(high, low);\r
+       modifiers[Modifiers::bank] = IntRange(high, low);\r
 \r
        return spPotion;\r
 }\r
 \r
-shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const\r
+boost::shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<ItemGO> spItem;\r
-       map<Modifiers::Modifier, Range<int> > modifiers;\r
+       boost::shared_ptr<ItemGO> spItem;\r
+       map<Modifiers::Modifier, IntRange> modifiers;\r
        boost::char_separator<char> sep("~", 0, boost::keep_empty_tokens);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -274,16 +274,16 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        catch (TypeException)\r
        {\r
-               return shared_ptr<ItemGO>();\r
+               return boost::shared_ptr<ItemGO>();\r
        }\r
 \r
        switch(type)\r
        {\r
        case ItemTypes::Weapon:\r
-               spItem = shared_ptr<WeaponGO>(new WeaponGO());\r
+               spItem = boost::shared_ptr<WeaponGO>(new WeaponGO());\r
                break;\r
        case ItemTypes::Armor:\r
-               spItem = shared_ptr<ArmorGO>(new ArmorGO());\r
+               spItem = boost::shared_ptr<ArmorGO>(new ArmorGO());\r
                break;\r
        case ItemTypes::Potion:\r
                return CreatePotionFromLine(line);\r
@@ -328,7 +328,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::strength] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::strength] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -338,7 +338,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::defense] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::defense] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -348,7 +348,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::maxhealth] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::maxhealth] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -358,7 +358,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::health] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::health] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -368,7 +368,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::forestfights] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::forestfights] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -378,7 +378,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::playerfights] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::playerfights] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -388,7 +388,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::gold] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::gold] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -398,7 +398,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
        }\r
        if ((*tok_iter) != "0")\r
        {\r
-               modifiers[Modifiers::bank] = Range<int>(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
+               modifiers[Modifiers::bank] = IntRange(lexical_cast<int>((*tok_iter)), lexical_cast<int>((*tok_iter)));\r
        }\r
        spItem->Modifiers(modifiers);\r
 \r
@@ -406,7 +406,7 @@ shared_ptr<ItemGO> FileItemDAO::CreateItemFromLine(const string &line) const
 }\r
 bool FileItemDAO::IdExists(const string &Id) const\r
 {\r
-       map<string, shared_ptr<ItemGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<ItemGO> >::const_iterator iter;\r
        iter = spItemCache.find(Id);\r
        return (iter != spItemCache.end());\r
 }\r
@@ -431,7 +431,7 @@ void FileItemDAO::LoadItemCache(void)
                {\r
                        continue;\r
                }\r
-               shared_ptr<ItemGO> spItem = CreateItemFromLine(line);\r
+               boost::shared_ptr<ItemGO> spItem = CreateItemFromLine(line);\r
                if (spItem != 0)\r
                {\r
                        spItemCache[spItem->Id()] = spItem;\r
@@ -440,11 +440,11 @@ void FileItemDAO::LoadItemCache(void)
        infile.close();\r
 }\r
 \r
-void FileItemDAO::Insert(shared_ptr<ItemGO> spItem)\r
+void FileItemDAO::Insert(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
-void FileItemDAO::Update(shared_ptr<ItemGO> spItem)\r
+void FileItemDAO::Update(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
index 4580929bf51a4233eafcbc1c50e360223b3c841c..2bde14483b94912325a9a0694494d2476f23bfe9 100644 (file)
@@ -15,7 +15,7 @@ using GameServ::DataLayer::File::FileId;
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -71,7 +71,7 @@ void FileLevelDAO::LoadLevelCache(void)
        while (!infile.eof())\r
        {\r
                string line;\r
-               shared_ptr<LevelGO> spLevel;\r
+               boost::shared_ptr<LevelGO> spLevel;\r
                getline(infile, line);\r
                if (line.empty())\r
                {\r
@@ -92,31 +92,31 @@ string FileLevelDAO::GetLevelFilePath() const
        return mFilename;\r
 }\r
 \r
-shared_ptr<LevelGO> FileLevelDAO::GetById(const string &Id) const\r
+boost::shared_ptr<LevelGO> FileLevelDAO::GetById(const string &Id) const\r
 {\r
-       map<string, shared_ptr<LevelGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<LevelGO> >::const_iterator iter;\r
        iter = spLevelCache.find(Id);\r
        if (iter != spLevelCache.end())\r
        {\r
-               return shared_ptr<LevelGO>(iter->second);\r
+               return boost::shared_ptr<LevelGO>(iter->second);\r
        }\r
-       return shared_ptr<LevelGO>();\r
+       return boost::shared_ptr<LevelGO>();\r
 }\r
 \r
-void FileLevelDAO::Insert(shared_ptr<LevelGO> spLevel)\r
+void FileLevelDAO::Insert(boost::shared_ptr<LevelGO> spLevel)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
-void FileLevelDAO::Update(shared_ptr<LevelGO> spLevel)\r
+void FileLevelDAO::Update(boost::shared_ptr<LevelGO> spLevel)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const\r
+boost::shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<LevelGO> spLevel;\r
-       spLevel = shared_ptr<LevelGO>(new LevelGO());\r
+       boost::shared_ptr<LevelGO> spLevel;\r
+       spLevel = boost::shared_ptr<LevelGO>(new LevelGO());\r
        boost::char_separator<char> sep("~ ", 0);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -163,7 +163,7 @@ shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const
                        line % (*tok_iter)));\r
        }\r
 \r
-       spLevel->StrengthRange(Range<int>(high, low));\r
+       spLevel->StrengthRange(IntRange(high, low));\r
 \r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -195,7 +195,7 @@ shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const
                throw DataLayerException(str(format("Corrupt level line %1%. Invalid integer value %2%") % \r
                        line % (*tok_iter)));\r
        }\r
-       spLevel->DefenseRange(Range<int>(high, low));\r
+       spLevel->DefenseRange(IntRange(high, low));\r
 \r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -227,7 +227,7 @@ shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const
                throw DataLayerException(str(format("Corrupt level line %1%. Invalid integer value %2%") % \r
                        line % (*tok_iter)));\r
        }\r
-       spLevel->GoldRange(Range<int>(high, low));\r
+       spLevel->GoldRange(IntRange(high, low));\r
 \r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -259,7 +259,7 @@ shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const
                throw DataLayerException(str(format("Corrupt level line %1%. Invalid integer value %2%") % \r
                        line % (*tok_iter)));\r
        }\r
-       spLevel->ExperienceRange(Range<int>(high, low));\r
+       spLevel->ExperienceRange(IntRange(high, low));\r
 \r
        tok_iter++;\r
        if (tok_iter == tokens.end())\r
@@ -291,14 +291,14 @@ shared_ptr<LevelGO> FileLevelDAO::CreateLevelFromLine(const string &line) const
                throw DataLayerException(str(format("Corrupt level line %1%. Invalid integer value %2%") % \r
                        line % (*tok_iter)));\r
        }\r
-       spLevel->HealthRange(Range<int>(high, low));\r
+       spLevel->HealthRange(IntRange(high, low));\r
        \r
        return spLevel;\r
 }\r
 \r
 bool FileLevelDAO::IdExists(const string &Id) const\r
 {\r
-       map<string, shared_ptr<LevelGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<LevelGO> >::const_iterator iter;\r
        iter = spLevelCache.find(Id);\r
        return (iter != spLevelCache.end());\r
 }
\ No newline at end of file
index 9b0178bdc098a5f39b33f3fa711eecce235b277c..e08c8c056580c2382ff52ad8df2619d2c4e00e27 100644 (file)
@@ -15,7 +15,7 @@ using GameServ::DataLayer::File::FileId;
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -71,7 +71,7 @@ void FileMasterDAO::LoadMasterCache(void)
        while (!infile.eof())\r
        {\r
                string line;\r
-               shared_ptr<MasterGO> spMaster;\r
+               boost::shared_ptr<MasterGO> spMaster;\r
                getline(infile, line);\r
                if (line.empty())\r
                {\r
@@ -92,31 +92,31 @@ string FileMasterDAO::GetMasterFilePath() const
        return mFilename;\r
 }\r
 \r
-shared_ptr<MasterGO> FileMasterDAO::GetById(const string &Id) const\r
+boost::shared_ptr<MasterGO> FileMasterDAO::GetById(const string &Id) const\r
 {\r
-       map<string, shared_ptr<MasterGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<MasterGO> >::const_iterator iter;\r
        iter = spMasterCache.find(Id);\r
        if (iter != spMasterCache.end())\r
        {\r
-               return shared_ptr<MasterGO>(iter->second);\r
+               return boost::shared_ptr<MasterGO>(iter->second);\r
        }\r
-       return shared_ptr<MasterGO>();\r
+       return boost::shared_ptr<MasterGO>();\r
 }\r
 \r
-void FileMasterDAO::Insert(shared_ptr<MasterGO> spMaster)\r
+void FileMasterDAO::Insert(boost::shared_ptr<MasterGO> spMaster)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
-void FileMasterDAO::Update(shared_ptr<MasterGO> spMaster)\r
+void FileMasterDAO::Update(boost::shared_ptr<MasterGO> spMaster)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-shared_ptr<MasterGO> FileMasterDAO::CreateMasterFromLine(const string &line) const\r
+boost::shared_ptr<MasterGO> FileMasterDAO::CreateMasterFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<MasterGO> spMaster;\r
-       spMaster = shared_ptr<MasterGO>(new MasterGO());\r
+       boost::shared_ptr<MasterGO> spMaster;\r
+       spMaster = boost::shared_ptr<MasterGO>(new MasterGO());\r
        boost::char_separator<char> sep("~", 0);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -252,7 +252,7 @@ shared_ptr<MasterGO> FileMasterDAO::CreateMasterFromLine(const string &line) con
 \r
 bool FileMasterDAO::IdExists(const string &Id) const\r
 {\r
-       map<string, shared_ptr<MasterGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<MasterGO> >::const_iterator iter;\r
        iter = spMasterCache.find(Id);\r
        return (iter != spMasterCache.end());\r
 }
\ No newline at end of file
index 1e03eb3c3e010c1b71e3aba2c5c170bb266b98b5..4d62585e37870ffdd92d852293a66536e0dafc0d 100644 (file)
@@ -15,7 +15,7 @@ using GameServ::DataLayer::File::FileId;
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -73,7 +73,7 @@ void FileMonsterDAO::LoadMonsterCache(void)
        while (!infile.eof())\r
        {\r
                string line;\r
-               shared_ptr<MonsterGO> spMonster;\r
+               boost::shared_ptr<MonsterGO> spMonster;\r
                getline(infile, line);\r
                if (line.empty())\r
                {\r
@@ -96,34 +96,34 @@ string FileMonsterDAO::GetMonsterFilePath() const
        return mFilename;\r
 }\r
 \r
-shared_ptr<MonsterGO> FileMonsterDAO::GetById(const string &Id) const\r
+boost::shared_ptr<MonsterGO> FileMonsterDAO::GetById(const string &Id) const\r
 {\r
-       map<string, shared_ptr<MonsterGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<MonsterGO> >::const_iterator iter;\r
        string id = Id;\r
        to_lower(id);\r
        iter = spMonsterCache.find(id);\r
        if (iter != spMonsterCache.end())\r
        {\r
-               return shared_ptr<MonsterGO>(iter->second->Clone());\r
+               return boost::shared_ptr<MonsterGO>(iter->second->Clone());\r
        }\r
-       return shared_ptr<MonsterGO>();\r
+       return boost::shared_ptr<MonsterGO>();\r
 }\r
 \r
-void Update(shared_ptr<MonsterGO> spMonster)\r
+void Update(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-void Insert(shared_ptr<MonsterGO> spMonster)\r
+void Insert(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        throw DataLayerException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-shared_ptr<MonsterGO> FileMonsterDAO::CreateMonsterFromLine(const string &line) const\r
+boost::shared_ptr<MonsterGO> FileMonsterDAO::CreateMonsterFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<MonsterGO> spMonster;\r
-       spMonster = shared_ptr<MonsterGO>(new MonsterGO());\r
+       boost::shared_ptr<MonsterGO> spMonster;\r
+       spMonster = boost::shared_ptr<MonsterGO>(new MonsterGO());\r
        boost::char_separator<char> sep("~", 0);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -166,7 +166,7 @@ shared_ptr<MonsterGO> FileMonsterDAO::CreateMonsterFromLine(const string &line)
 \r
 bool FileMonsterDAO::IdExists(const string &Id) const\r
 {\r
-       map<string, shared_ptr<MonsterGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<MonsterGO> >::const_iterator iter;\r
        string id = Id;\r
        to_lower(id);\r
        iter = spMonsterCache.find(id);\r
@@ -181,7 +181,7 @@ vector<string> FileMonsterDAO::GetMonsterIdsByLevelId(const string &LevelId) con
        if (leveliter == MonsterLevelIndex.end())\r
        {\r
                vector<string> monsterIds;\r
-               map<string, shared_ptr<MonsterGO> >::const_iterator iter;\r
+               map<string, boost::shared_ptr<MonsterGO> >::const_iterator iter;\r
                for (iter = spMonsterCache.begin(); iter != spMonsterCache.end(); iter++)\r
                {\r
                        if (iter->second->LevelId() == LevelId)\r
index 6895eca9172287a6732ce9ac71b2037b62de8954..88166d654fe6b3ca477e34cb76436a6dbb4e0921 100644 (file)
@@ -20,7 +20,7 @@ using namespace GameServ::GameLayer::Helpers;
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -84,7 +84,7 @@ void FilePlayerDAO::LoadPlayerCache(void)
        while (!infile.eof())\r
        {\r
                string line;\r
-               shared_ptr<PlayerGO> spPlayer;\r
+               boost::shared_ptr<PlayerGO> spPlayer;\r
                getline(infile, line);\r
                if (line.empty())\r
                {\r
@@ -101,7 +101,7 @@ void FilePlayerDAO::LoadPlayerCache(void)
                        to_lower(id);\r
                        spPlayerCache[id] = spPlayer;\r
                        // Load all the items into the player's inventory\r
-                       shared_ptr<InventoryManager> inventory = InventoryManager::Instance();\r
+                       boost::shared_ptr<InventoryManager> inventory = InventoryManager::Instance();\r
                        if (!inventory->PlayerHasInventory(spPlayer->Id()))\r
                        {\r
                                LoadInventoryFromLine(spPlayer, line);\r
@@ -121,7 +121,7 @@ void FilePlayerDAO::WritePlayerCache(void) const
                        __FILE__, __LINE__);\r
        }\r
 \r
-       map<string, shared_ptr<PlayerGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<PlayerGO> >::const_iterator iter;\r
        for (iter = spPlayerCache.begin(); iter != spPlayerCache.end(); iter++)\r
        {\r
                outfile << CreateLineFromPlayer(iter->second) << endl;\r
@@ -134,24 +134,24 @@ string FilePlayerDAO::GetPlayerFilePath() const
        return mFilename;\r
 }\r
 \r
-shared_ptr<PlayerGO> FilePlayerDAO::GetById(const string &Id) const\r
+boost::shared_ptr<PlayerGO> FilePlayerDAO::GetById(const string &Id) const\r
 {\r
-       map<string, shared_ptr<PlayerGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<PlayerGO> >::const_iterator iter;\r
        string id = Id;\r
        to_lower(id);\r
        iter = spPlayerCache.find(id);\r
        if (iter != spPlayerCache.end())\r
        {\r
-               return shared_ptr<PlayerGO>(iter->second->Clone());\r
+               return boost::shared_ptr<PlayerGO>(iter->second->Clone());\r
        }\r
-       return shared_ptr<PlayerGO>();\r
+       return boost::shared_ptr<PlayerGO>();\r
 }\r
 \r
-shared_ptr<PlayerGO> FilePlayerDAO::CreatePlayerFromLine(const string &line) const\r
+boost::shared_ptr<PlayerGO> FilePlayerDAO::CreatePlayerFromLine(const string &line) const\r
 {\r
        assert(!line.empty());\r
-       shared_ptr<PlayerGO> spPlayer;\r
-       spPlayer = shared_ptr<PlayerGO>(new PlayerGO());\r
+       boost::shared_ptr<PlayerGO> spPlayer;\r
+       spPlayer = boost::shared_ptr<PlayerGO>(new PlayerGO());\r
        boost::char_separator<char> sep(" ", 0, boost::keep_empty_tokens);\r
        tokenizer tokens(line, sep);\r
        tokenizer::iterator tok_iter = tokens.begin();\r
@@ -296,7 +296,7 @@ shared_ptr<PlayerGO> FilePlayerDAO::CreatePlayerFromLine(const string &line) con
        return spPlayer;\r
 }\r
 \r
-void FilePlayerDAO::LoadInventoryFromLine(shared_ptr<PlayerGO> spPlayer, const string &line) const\r
+void FilePlayerDAO::LoadInventoryFromLine(boost::shared_ptr<PlayerGO> spPlayer, const string &line) const\r
 {\r
        assert(!line.empty());\r
        boost::char_separator<char> sep(" ", 0);\r
@@ -313,12 +313,12 @@ void FilePlayerDAO::LoadInventoryFromLine(shared_ptr<PlayerGO> spPlayer, const s
                }\r
        }\r
        // Load all the items into the player's inventory\r
-       shared_ptr<InventoryManager> inventory = InventoryManager::Instance();\r
+       boost::shared_ptr<InventoryManager> inventory = InventoryManager::Instance();\r
        FileItemDAO idao;\r
        while (tok_iter != tokens.end())\r
        {\r
                string itemid = FileId::CreateItemId((*tok_iter));\r
-               shared_ptr<ItemGO> spItem = idao.GetById(itemid);\r
+               boost::shared_ptr<ItemGO> spItem = idao.GetById(itemid);\r
                tok_iter++;\r
                if (tok_iter == tokens.end())\r
                {\r
@@ -339,7 +339,7 @@ void FilePlayerDAO::LoadInventoryFromLine(shared_ptr<PlayerGO> spPlayer, const s
        }\r
 }\r
 \r
-string FilePlayerDAO::CreateLineFromPlayer(shared_ptr<PlayerGO> spPlayer) const\r
+string FilePlayerDAO::CreateLineFromPlayer(boost::shared_ptr<PlayerGO> spPlayer) const\r
 {\r
        string line;\r
        line = str(format("%1% %2% %3% %4% %5% %6% %7% %8% %9% %10% %11% %12% %13% %14% %15% %16%") % \r
@@ -349,19 +349,19 @@ string FilePlayerDAO::CreateLineFromPlayer(shared_ptr<PlayerGO> spPlayer) const
                GetFlags(spPlayer) % spPlayer->Password() % (to_iso_string(spPlayer->LastLogin())) %\r
                FileId::GetItemNumberFromId(spPlayer->Weapon()->Id()) % FileId::GetItemNumberFromId(spPlayer->Armor()->Id()));\r
 \r
-       shared_ptr<InventoryManager> spInventory = InventoryManager::Instance();\r
+       boost::shared_ptr<InventoryManager> spInventory = InventoryManager::Instance();\r
        ItemList inventory = spInventory->GetInventory(spPlayer->Id());\r
        ItemList::const_iterator iter;\r
        for (iter = inventory.begin(); iter != inventory.end(); iter++)\r
        {\r
-               shared_ptr<ItemGO> spItem = (*iter);\r
+               boost::shared_ptr<ItemGO> spItem = (*iter);\r
                line += " " + FileId::GetItemNumberFromId(spItem->Id()) + " " + lexical_cast<string>(spItem->Uses());\r
        }\r
 \r
        return line;\r
 }\r
 \r
-void FilePlayerDAO::SetFlags(shared_ptr<PlayerGO> spPlayer, const int &flags) const\r
+void FilePlayerDAO::SetFlags(boost::shared_ptr<PlayerGO> spPlayer, const int &flags) const\r
 {\r
        if ((flags & 0x00000001) == 0x00000001)\r
        {\r
@@ -382,7 +382,7 @@ void FilePlayerDAO::SetFlags(shared_ptr<PlayerGO> spPlayer, const int &flags) co
        }\r
 }\r
 \r
-int FilePlayerDAO::GetFlags(shared_ptr<PlayerGO> spPlayer) const\r
+int FilePlayerDAO::GetFlags(boost::shared_ptr<PlayerGO> spPlayer) const\r
 {\r
        int flags = 0;\r
 \r
@@ -397,7 +397,7 @@ int FilePlayerDAO::GetFlags(shared_ptr<PlayerGO> spPlayer) const
        return 0;\r
 }\r
 \r
-void FilePlayerDAO::Update(shared_ptr<PlayerGO> spPlayer)\r
+void FilePlayerDAO::Update(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        assert(spPlayer != 0);\r
        assert(!spPlayer->Id().empty());\r
@@ -417,7 +417,7 @@ void FilePlayerDAO::Update(shared_ptr<PlayerGO> spPlayer)
        }\r
 }\r
 \r
-void FilePlayerDAO::Insert(shared_ptr<PlayerGO> spPlayer)\r
+void FilePlayerDAO::Insert(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        assert(spPlayer != 0);\r
        assert(!spPlayer->Name().empty());\r
@@ -446,7 +446,7 @@ void FilePlayerDAO::Insert(shared_ptr<PlayerGO> spPlayer)
 \r
 bool FilePlayerDAO::IdExists(const string &Id) const\r
 {\r
-       map<string, shared_ptr<PlayerGO> >::const_iterator iter;\r
+       map<string, boost::shared_ptr<PlayerGO> >::const_iterator iter;\r
        string id = Id;\r
        to_lower(id);\r
        iter = spPlayerCache.find(id);\r
index 32abd18cb8b13cc16e3a16303ba1f470f0fe9741..fdf2b3385af1e5b845cf8a1b726713e33b06f0bd 100644 (file)
@@ -13,7 +13,7 @@ using GameServ::DataLayer::MySQL::MySQLMasterDAO;
 using GameServ::DataLayer::MySQL::MySQLLevelDAO;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 MySQLDAOFactory::MySQLDAOFactory(void)\r
 {\r
@@ -23,31 +23,31 @@ MySQLDAOFactory::~MySQLDAOFactory(void)
 {\r
 }\r
 \r
-shared_ptr<IPlayerDAO> MySQLDAOFactory::GetPlayerDAO(void) const\r
+boost::shared_ptr<IPlayerDAO> MySQLDAOFactory::GetPlayerDAO(void) const\r
 {\r
-       return shared_ptr<IPlayerDAO>(new MySQLPlayerDAO());\r
+       return boost::shared_ptr<IPlayerDAO>(new MySQLPlayerDAO());\r
 }\r
 \r
-shared_ptr<IItemDAO> MySQLDAOFactory::GetItemDAO(void) const\r
+boost::shared_ptr<IItemDAO> MySQLDAOFactory::GetItemDAO(void) const\r
 {\r
-       return shared_ptr<IItemDAO>(new MySQLItemDAO());\r
+       return boost::shared_ptr<IItemDAO>(new MySQLItemDAO());\r
 }\r
 \r
-shared_ptr<IMonsterDAO> MySQLDAOFactory::GetMonsterDAO(void) const\r
+boost::shared_ptr<IMonsterDAO> MySQLDAOFactory::GetMonsterDAO(void) const\r
 {\r
-       //return shared_ptr<IMonsterDAO>(new MySQLMonsterDAO());\r
+       //return boost::shared_ptr<IMonsterDAO>(new MySQLMonsterDAO());\r
        throw GameServException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-shared_ptr<IMasterDAO> MySQLDAOFactory::GetMasterDAO(void) const\r
+boost::shared_ptr<IMasterDAO> MySQLDAOFactory::GetMasterDAO(void) const\r
 {\r
-//     return shared_ptr<IMasterDAO>(new MySQLMasterDAO());\r
+//     return boost::shared_ptr<IMasterDAO>(new MySQLMasterDAO());\r
        throw GameServException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
-shared_ptr<ILevelDAO> MySQLDAOFactory::GetLevelDAO(void) const\r
+boost::shared_ptr<ILevelDAO> MySQLDAOFactory::GetLevelDAO(void) const\r
 {\r
-//     return shared_ptr<ILevelDAO>(new MySQLLevelDAO());\r
+//     return boost::shared_ptr<ILevelDAO>(new MySQLLevelDAO());\r
        throw GameServException("Not implemented", __FILE__, __LINE__);\r
 }\r
 \r
index c3512c4a73de9bc6abc76ed5f74ca23d1e739c8a..ad3430b497d5d2d84177de3e8df7b6fc10cf73b8 100644 (file)
@@ -22,11 +22,11 @@ using GameServ::Types::ItemTypes;
 using GameServ::Types::Modifiers;\r
 using GameServ::Types::Exceptions::TypeException;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::format;\r
 using boost::str;\r
 using boost::algorithm::to_upper;\r
@@ -65,8 +65,8 @@ mysqlpp::sql_int, playerfightslow,
 mysqlpp::sql_int, maxhealthhigh,\r
 mysqlpp::sql_int, maxhealthlow);\r
 \r
-shared_ptr<ItemGO> CreateItemFromItemSSQLS(const item &i);\r
-item CreateItemSSQLSFromItem(shared_ptr<ItemGO> spItem);\r
+boost::shared_ptr<ItemGO> CreateItemFromItemSSQLS(const item &i);\r
+item CreateItemSSQLSFromItem(boost::shared_ptr<ItemGO> spItem);\r
 \r
 MySQLItemDAO::MySQLItemDAO()\r
 {\r
@@ -82,7 +82,7 @@ void MySQLItemDAO::Initialize(const string &tablename)
        mTableName = tablename;\r
 }\r
 \r
-shared_ptr<ItemGO> MySQLItemDAO::GetById(const string &Id) const\r
+boost::shared_ptr<ItemGO> MySQLItemDAO::GetById(const string &Id) const\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -138,7 +138,7 @@ shared_ptr<ItemGO> MySQLItemDAO::GetById(const string &Id) const
        }\r
        else if (items.size() == 0)\r
        {\r
-               return shared_ptr<ItemGO>();\r
+               return boost::shared_ptr<ItemGO>();\r
        }\r
        else\r
        {\r
@@ -148,7 +148,7 @@ shared_ptr<ItemGO> MySQLItemDAO::GetById(const string &Id) const
 }\r
 \r
 \r
-void MySQLItemDAO::Insert(shared_ptr<ItemGO> spItem)\r
+void MySQLItemDAO::Insert(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -194,7 +194,7 @@ void MySQLItemDAO::Insert(shared_ptr<ItemGO> spItem)
        spItem->Number(query.insert_id());\r
 }\r
 \r
-void MySQLItemDAO::Update(shared_ptr<ItemGO> spItem)\r
+void MySQLItemDAO::Update(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -266,22 +266,22 @@ void MySQLItemDAO::Update(shared_ptr<ItemGO> spItem)
        }\r
 }\r
 \r
-shared_ptr<ItemGO> CreateItemFromItemSSQLS(const item &i)\r
+boost::shared_ptr<ItemGO> CreateItemFromItemSSQLS(const item &i)\r
 {\r
-       shared_ptr<ItemGO> spItem;\r
+       boost::shared_ptr<ItemGO> spItem;\r
 \r
        ItemTypes::ItemType type = ItemTypes::Parse(i.type);\r
 \r
        switch (type)\r
        {\r
        case ItemTypes::Armor:\r
-               spItem = shared_ptr<ArmorGO>(new ArmorGO());\r
+               spItem = boost::shared_ptr<ArmorGO>(new ArmorGO());\r
                break;\r
        case ItemTypes::Weapon:\r
-               spItem = shared_ptr<WeaponGO>(new WeaponGO());\r
+               spItem = boost::shared_ptr<WeaponGO>(new WeaponGO());\r
                break;\r
        case ItemTypes::Potion:\r
-               spItem = shared_ptr<PotionGO>(new PotionGO());\r
+               spItem = boost::shared_ptr<PotionGO>(new PotionGO());\r
                break;\r
        case ItemTypes::NOTYPE:\r
        default:\r
@@ -291,27 +291,27 @@ shared_ptr<ItemGO> CreateItemFromItemSSQLS(const item &i)
        spItem->Id(MySQLId::CreateItemId(i.id));\r
        spItem->Name(i.name);\r
        spItem->Uses(i.startinguses);\r
-       map<Modifiers::Modifier, Range<int> > modifiers;\r
-       modifiers[Modifiers::strength] = Range<int>(i.strengthhigh, i.strengthlow);\r
-       modifiers[Modifiers::defense] = Range<int>(i.defensehigh, i.defenselow);\r
-       modifiers[Modifiers::bank] = Range<int>(i.bankhigh, i.banklow);\r
-       modifiers[Modifiers::gold] = Range<int>(i.goldhigh, i.goldlow);\r
-       modifiers[Modifiers::forestfights] = Range<int>(i.forestfightshigh, i.forestfightslow);\r
-       modifiers[Modifiers::health] = Range<int>(i.healthhigh, i.healthlow);\r
-       modifiers[Modifiers::maxhealth] = Range<int>(i.maxhealthhigh, i.maxhealthlow);\r
-       modifiers[Modifiers::playerfights] = Range<int>(i.playerfightshigh, i.playerfightslow);\r
-       modifiers[Modifiers::experience] = Range<int>(i.experiencehigh, i.experiencelow);\r
+       map<Modifiers::Modifier, IntRange> modifiers;\r
+       modifiers[Modifiers::strength] = IntRange(i.strengthhigh, i.strengthlow);\r
+       modifiers[Modifiers::defense] = IntRange(i.defensehigh, i.defenselow);\r
+       modifiers[Modifiers::bank] = IntRange(i.bankhigh, i.banklow);\r
+       modifiers[Modifiers::gold] = IntRange(i.goldhigh, i.goldlow);\r
+       modifiers[Modifiers::forestfights] = IntRange(i.forestfightshigh, i.forestfightslow);\r
+       modifiers[Modifiers::health] = IntRange(i.healthhigh, i.healthlow);\r
+       modifiers[Modifiers::maxhealth] = IntRange(i.maxhealthhigh, i.maxhealthlow);\r
+       modifiers[Modifiers::playerfights] = IntRange(i.playerfightshigh, i.playerfightslow);\r
+       modifiers[Modifiers::experience] = IntRange(i.experiencehigh, i.experiencelow);\r
        \r
        \r
        spItem->Modifiers(modifiers);\r
 \r
        return spItem;\r
 }\r
-item CreateItemSSQLSFromItem(shared_ptr<ItemGO> spItem)\r
+item CreateItemSSQLSFromItem(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        item i;\r
        i.name = spItem->Name();\r
-       map<Modifiers::Modifier, Range<int> > modifiers = spItem->Modifiers();\r
+       map<Modifiers::Modifier, IntRange> modifiers = spItem->Modifiers();\r
        i.strengthhigh = modifiers[Modifiers::strength].High();\r
        i.strengthlow = modifiers[Modifiers::strength].Low();\r
        i.defensehigh = modifiers[Modifiers::defense].High();\r
index 0704b6d114a54db92457b63252a699761c780593..bf8c3006f637ba1e1fb5992e23a0d40002e92450 100644 (file)
@@ -11,11 +11,11 @@ using GameServ::DataLayer::Exceptions::DataLayerException;
 #include <GameServ/DataLayer/MySQL/MySQLId.h>\r
 using GameServ::DataLayer::MySQL::MySQLId;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -44,8 +44,8 @@ mysqlpp::sql_int, experiencelow,
 mysqlpp::sql_int, healthhigh,\r
 mysqlpp::sql_int, healthlow);\r
 \r
-shared_ptr<LevelGO> CreateLevelFromLevelSSQLS(const level &l);\r
-level CreateLevelSSQLSFromLevel(shared_ptr<LevelGO> spLevel);\r
+boost::shared_ptr<LevelGO> CreateLevelFromLevelSSQLS(const level &l);\r
+level CreateLevelSSQLSFromLevel(boost::shared_ptr<LevelGO> spLevel);\r
 \r
 MySQLLevelDAO::MySQLLevelDAO()\r
 {\r
@@ -61,7 +61,7 @@ void MySQLLevelDAO::Initialize(const string &tablename)
        mTableName = tablename;\r
 }\r
 \r
-shared_ptr<LevelGO> MySQLLevelDAO::GetById(const string &Id) const\r
+boost::shared_ptr<LevelGO> MySQLLevelDAO::GetById(const string &Id) const\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -117,7 +117,7 @@ shared_ptr<LevelGO> MySQLLevelDAO::GetById(const string &Id) const
        }\r
        else if (levels.size() == 0)\r
        {\r
-               return shared_ptr<LevelGO>();\r
+               return boost::shared_ptr<LevelGO>();\r
        }\r
        else\r
        {\r
@@ -127,7 +127,7 @@ shared_ptr<LevelGO> MySQLLevelDAO::GetById(const string &Id) const
 }\r
 \r
 \r
-void MySQLLevelDAO::Insert(shared_ptr<LevelGO> spLevel)\r
+void MySQLLevelDAO::Insert(boost::shared_ptr<LevelGO> spLevel)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -172,7 +172,7 @@ void MySQLLevelDAO::Insert(shared_ptr<LevelGO> spLevel)
        spLevel->Id(MySQLId::CreateLevelId(query.insert_id()));\r
 }\r
 \r
-void MySQLLevelDAO::Update(shared_ptr<LevelGO> spLevel)\r
+void MySQLLevelDAO::Update(boost::shared_ptr<LevelGO> spLevel)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -244,20 +244,20 @@ void MySQLLevelDAO::Update(shared_ptr<LevelGO> spLevel)
        }\r
 }\r
 \r
-shared_ptr<LevelGO> CreateLevelFromLevelSSQLS(const level &l)\r
+boost::shared_ptr<LevelGO> CreateLevelFromLevelSSQLS(const level &l)\r
 {\r
-       shared_ptr<LevelGO> spLevel = shared_ptr<LevelGO>(new LevelGO());\r
+       boost::shared_ptr<LevelGO> spLevel = boost::shared_ptr<LevelGO>(new LevelGO());\r
 \r
        spLevel->Id(MySQLId::CreateLevelId(l.id));\r
-       spLevel->StrengthRange(Range<int>(l.strengthhigh, l.strengthlow));\r
-       spLevel->DefenseRange(Range<int>(l.defensehigh, l.defenselow));\r
-       spLevel->GoldRange(Range<int>(l.goldhigh, l.goldlow));\r
-       spLevel->ExperienceRange(Range<int>(l.experiencehigh, l.experiencelow));\r
-       spLevel->HealthRange(Range<int>(l.healthhigh, l.healthlow));\r
+       spLevel->StrengthRange(IntRange(l.strengthhigh, l.strengthlow));\r
+       spLevel->DefenseRange(IntRange(l.defensehigh, l.defenselow));\r
+       spLevel->GoldRange(IntRange(l.goldhigh, l.goldlow));\r
+       spLevel->ExperienceRange(IntRange(l.experiencehigh, l.experiencelow));\r
+       spLevel->HealthRange(IntRange(l.healthhigh, l.healthlow));\r
 \r
        return spLevel;\r
 }\r
-level CreateLevelSSQLSFromLevel(shared_ptr<LevelGO> spLevel)\r
+level CreateLevelSSQLSFromLevel(boost::shared_ptr<LevelGO> spLevel)\r
 {\r
        assert (spLevel != 0);\r
 \r
index f9c394173036343720e6aed24555ae1596ae4481..3a8125c8d1511133fe2026dfe520aaa61b053776 100644 (file)
@@ -11,11 +11,11 @@ using GameServ::DataLayer::Exceptions::DataLayerException;
 #include <GameServ/DataLayer/MySQL/MySQLId.h>\r
 using GameServ::DataLayer::MySQL::MySQLId;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::format;\r
 using boost::str;\r
 using boost::algorithm::to_upper;\r
@@ -42,8 +42,8 @@ mysqlpp::sql_int_unsigned, levelId,
 mysqlpp::sql_int_unsigned, health,\r
 mysqlpp::sql_varchar, partingwords);\r
 \r
-shared_ptr<MasterGO> CreateMasterFromMasterSSQLS(const master &m);\r
-master CreateMasterSSQLSFromMaster(shared_ptr<MasterGO> spMaster);\r
+boost::shared_ptr<MasterGO> CreateMasterFromMasterSSQLS(const master &m);\r
+master CreateMasterSSQLSFromMaster(boost::shared_ptr<MasterGO> spMaster);\r
 \r
 MySQLMasterDAO::MySQLMasterDAO()\r
 {\r
@@ -59,7 +59,7 @@ void MySQLMasterDAO::Initialize(const string &tablename)
        mTableName = tablename;\r
 }\r
 \r
-shared_ptr<MasterGO> MySQLMasterDAO::GetById(const string &Id) const\r
+boost::shared_ptr<MasterGO> MySQLMasterDAO::GetById(const string &Id) const\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -115,7 +115,7 @@ shared_ptr<MasterGO> MySQLMasterDAO::GetById(const string &Id) const
        }\r
        else if (masters.size() == 0)\r
        {\r
-               return shared_ptr<MasterGO>();\r
+               return boost::shared_ptr<MasterGO>();\r
        }\r
        else\r
        {\r
@@ -125,7 +125,7 @@ shared_ptr<MasterGO> MySQLMasterDAO::GetById(const string &Id) const
 }\r
 \r
 \r
-void MySQLMasterDAO::Insert(shared_ptr<MasterGO> spMaster)\r
+void MySQLMasterDAO::Insert(boost::shared_ptr<MasterGO> spMaster)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -170,7 +170,7 @@ void MySQLMasterDAO::Insert(shared_ptr<MasterGO> spMaster)
        spMaster->Id(MySQLId::CreateMasterId(query.insert_id()));\r
 }\r
 \r
-void MySQLMasterDAO::Update(shared_ptr<MasterGO> spMaster)\r
+void MySQLMasterDAO::Update(boost::shared_ptr<MasterGO> spMaster)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -242,9 +242,9 @@ void MySQLMasterDAO::Update(shared_ptr<MasterGO> spMaster)
        }\r
 }\r
 \r
-shared_ptr<MasterGO> CreateMasterFromMasterSSQLS(const master &m)\r
+boost::shared_ptr<MasterGO> CreateMasterFromMasterSSQLS(const master &m)\r
 {\r
-       shared_ptr<MasterGO> spMaster = shared_ptr<MasterGO>(new MasterGO());\r
+       boost::shared_ptr<MasterGO> spMaster = boost::shared_ptr<MasterGO>(new MasterGO());\r
 \r
        spMaster->Id(MySQLId::CreateMasterId(m.id));\r
        spMaster->Name(m.name);\r
@@ -260,7 +260,7 @@ shared_ptr<MasterGO> CreateMasterFromMasterSSQLS(const master &m)
 \r
        return spMaster;\r
 }\r
-master CreateMasterSSQLSFromMaster(shared_ptr<MasterGO> spMaster)\r
+master CreateMasterSSQLSFromMaster(boost::shared_ptr<MasterGO> spMaster)\r
 {\r
        master m;\r
 \r
index 0314ef5de5ffb270e7a3a9e9d0cf0f9828e1e264..7b040148690aeeb241a17e1f40e01a130b4d76fb 100644 (file)
@@ -11,11 +11,11 @@ using GameServ::DataLayer::Exceptions::DataLayerException;
 #include <GameServ/DataLayer/MySQL/MySQLId.h>\r
 using GameServ::DataLayer::MySQL::MySQLId;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::format;\r
 using boost::str;\r
 using boost::algorithm::to_upper;\r
@@ -43,8 +43,8 @@ mysqlpp::sql_int_unsigned, health,
 mysqlpp::sql_varchar, deathcry);\r
 \r
 \r
-shared_ptr<MonsterGO> CreateMonsterFromMonsterSSQLS(const monster &m);\r
-monster CreateMonsterSSQLSFromMonster(shared_ptr<MonsterGO> spMonster);\r
+boost::shared_ptr<MonsterGO> CreateMonsterFromMonsterSSQLS(const monster &m);\r
+monster CreateMonsterSSQLSFromMonster(boost::shared_ptr<MonsterGO> spMonster);\r
 \r
 MySQLMonsterDAO::MySQLMonsterDAO()\r
 {\r
@@ -60,7 +60,7 @@ void MySQLMonsterDAO::Initialize(const string &tablename)
        mTableName = tablename;\r
 }\r
 \r
-shared_ptr<MonsterGO> MySQLMonsterDAO::GetById(const string &Id) const\r
+boost::shared_ptr<MonsterGO> MySQLMonsterDAO::GetById(const string &Id) const\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -116,7 +116,7 @@ shared_ptr<MonsterGO> MySQLMonsterDAO::GetById(const string &Id) const
        }\r
        else if (monsters.size() == 0)\r
        {\r
-               return shared_ptr<MonsterGO>();\r
+               return boost::shared_ptr<MonsterGO>();\r
        }\r
        else\r
        {\r
@@ -126,7 +126,7 @@ shared_ptr<MonsterGO> MySQLMonsterDAO::GetById(const string &Id) const
 }\r
 \r
 \r
-void MySQLMonsterDAO::Insert(shared_ptr<MonsterGO> spMonster)\r
+void MySQLMonsterDAO::Insert(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -171,7 +171,7 @@ void MySQLMonsterDAO::Insert(shared_ptr<MonsterGO> spMonster)
        spMonster->Id(MySQLId::CreateMonsterId(query.insert_id()));\r
 }\r
 \r
-void MySQLMonsterDAO::Update(shared_ptr<MonsterGO> spMonster)\r
+void MySQLMonsterDAO::Update(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -243,9 +243,9 @@ void MySQLMonsterDAO::Update(shared_ptr<MonsterGO> spMonster)
        }\r
 }\r
 \r
-shared_ptr<MonsterGO> CreateMonsterFromMonsterSSQLS(const monster &m)\r
+boost::shared_ptr<MonsterGO> CreateMonsterFromMonsterSSQLS(const monster &m)\r
 {\r
-       shared_ptr<MonsterGO> spMonster = shared_ptr<MonsterGO>(new MonsterGO());\r
+       boost::shared_ptr<MonsterGO> spMonster = boost::shared_ptr<MonsterGO>(new MonsterGO());\r
 \r
        spMonster->Id(MySQLId::CreateMonsterId(m.id));\r
        spMonster->Name(m.name);\r
@@ -261,7 +261,7 @@ shared_ptr<MonsterGO> CreateMonsterFromMonsterSSQLS(const monster &m)
 \r
        return spMonster;\r
 }\r
-monster CreateMonsterSSQLSFromMonster(shared_ptr<MonsterGO> spMonster)\r
+monster CreateMonsterSSQLSFromMonster(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        monster m;\r
 \r
index ebbfb94d985c89e9db23e3026ed3959519a2b18d..56d86154d404e3b5667b8f9744e1191a8a4f8f16 100644 (file)
@@ -11,11 +11,11 @@ using GameServ::DataLayer::Exceptions::DataLayerException;
 #include <GameServ/DataLayer/MySQL/MySQLId.h>\r
 using GameServ::DataLayer::MySQL::MySQLId;\r
 \r
-#include <boost/shared_ptr.hpp>\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
 #include <boost/format.hpp>\r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 using boost::format;\r
 using boost::str;\r
@@ -54,8 +54,8 @@ mysqlpp::sql_boolean, alive,
 mysqlpp::sql_boolean, foughtmaster);\r
 \r
 \r
-shared_ptr<PlayerGO> CreatePlayerFromPlayerSSQLS(const player &p);\r
-player CreatePlayerSSQLSFromPlayer(shared_ptr<PlayerGO> spPlayer);\r
+boost::shared_ptr<PlayerGO> CreatePlayerFromPlayerSSQLS(const player &p);\r
+player CreatePlayerSSQLSFromPlayer(boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
 MySQLPlayerDAO::MySQLPlayerDAO()\r
 {\r
@@ -71,7 +71,7 @@ void MySQLPlayerDAO::Initialize(const string &tablename)
        mTableName = tablename;\r
 }\r
 \r
-shared_ptr<PlayerGO> MySQLPlayerDAO::GetById(const string &Id) const\r
+boost::shared_ptr<PlayerGO> MySQLPlayerDAO::GetById(const string &Id) const\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -127,7 +127,7 @@ shared_ptr<PlayerGO> MySQLPlayerDAO::GetById(const string &Id) const
        }\r
        else if (players.size() == 0)\r
        {\r
-               return shared_ptr<PlayerGO>();\r
+               return boost::shared_ptr<PlayerGO>();\r
        }\r
        else\r
        {\r
@@ -137,7 +137,7 @@ shared_ptr<PlayerGO> MySQLPlayerDAO::GetById(const string &Id) const
 }\r
 \r
 \r
-void MySQLPlayerDAO::Insert(shared_ptr<PlayerGO> spPlayer)\r
+void MySQLPlayerDAO::Insert(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -182,7 +182,7 @@ void MySQLPlayerDAO::Insert(shared_ptr<PlayerGO> spPlayer)
        spPlayer->Id(MySQLId::CreatePlayerId(query.insert_id()));\r
 }\r
 \r
-void MySQLPlayerDAO::Update(shared_ptr<PlayerGO> spPlayer)\r
+void MySQLPlayerDAO::Update(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        // TODO: Enable and catch exceptions\r
        mysqlpp::Connection conn;\r
@@ -254,9 +254,9 @@ void MySQLPlayerDAO::Update(shared_ptr<PlayerGO> spPlayer)
        }\r
 }\r
 \r
-shared_ptr<PlayerGO> CreatePlayerFromPlayerSSQLS(const player &p)\r
+boost::shared_ptr<PlayerGO> CreatePlayerFromPlayerSSQLS(const player &p)\r
 {\r
-       shared_ptr<PlayerGO> spPlayer = shared_ptr<PlayerGO>(new PlayerGO());\r
+       boost::shared_ptr<PlayerGO> spPlayer = boost::shared_ptr<PlayerGO>(new PlayerGO());\r
 \r
        spPlayer->Id(MySQLId::CreatePlayerId(p.id));\r
        spPlayer->Name(p.name);\r
@@ -300,7 +300,7 @@ shared_ptr<PlayerGO> CreatePlayerFromPlayerSSQLS(const player &p)
 \r
        return spPlayer;\r
 }\r
-player CreatePlayerSSQLSFromPlayer(shared_ptr<PlayerGO> spPlayer)\r
+player CreatePlayerSSQLSFromPlayer(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        player p;\r
        p.name = spPlayer->Name();\r
index cd938d3bfb8a65e8a4ef91b081d77a69f4aafac1..4d24a7b344747e9979cc3c017a750931b0e40c23 100644 (file)
@@ -7,7 +7,7 @@ using GameServ::DataLayer::DataAccess;
 using GameServ::DataLayer::IDAOFactory;\r
 \r
 #include <GameServ/Types.h>\r
-using GameServ::Types::Range;\r
+using GameServ::Types::UIntRange;\r
 using GameServ::Types::Modifiers;\r
 \r
 FightGL::FightGL()\r
@@ -22,11 +22,11 @@ FightGL::~FightGL()
 void FightGL::Initialize()\r
 {\r
        // TODO: Load from config\r
-       shared_ptr<IDAOFactory> factory = DataAccess::GetDataAccessFactory("File");\r
+       boost::shared_ptr<IDAOFactory> factory = DataAccess::GetDataAccessFactory("File");\r
        mspPlayerDAO = factory->GetPlayerDAO();\r
 }\r
 \r
-unsigned int FightGL::PlayerAttackMonster(shared_ptr<PlayerGO> spPlayer, shared_ptr<MonsterGO> spMonster)\r
+unsigned int FightGL::PlayerAttackMonster(boost::shared_ptr<PlayerGO> spPlayer, boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        unsigned int attack = CalculateAttack(spPlayer->Strength(), spMonster->Defense());\r
        if (attack >= spMonster->Health())\r
@@ -41,7 +41,7 @@ unsigned int FightGL::PlayerAttackMonster(shared_ptr<PlayerGO> spPlayer, shared_
        return attack;\r
 }\r
 \r
-unsigned int FightGL::MonsterAttackPlayer(shared_ptr<MonsterGO> spMonster, shared_ptr<PlayerGO> spPlayer)\r
+unsigned int FightGL::MonsterAttackPlayer(boost::shared_ptr<MonsterGO> spMonster, boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        unsigned int attack = CalculateAttack(spMonster->Strength(), spPlayer->Defense());\r
        if (attack >= spPlayer->Health())\r
@@ -57,7 +57,7 @@ unsigned int FightGL::MonsterAttackPlayer(shared_ptr<MonsterGO> spMonster, share
        return attack;\r
 }\r
 \r
-unsigned int FightGL::PlayerAttackPlayer(shared_ptr<PlayerGO> spPlayerAttacker, shared_ptr<PlayerGO> spPlayerDefender)\r
+unsigned int FightGL::PlayerAttackPlayer(boost::shared_ptr<PlayerGO> spPlayerAttacker, boost::shared_ptr<PlayerGO> spPlayerDefender)\r
 {\r
        unsigned int attack = CalculateAttack(spPlayerAttacker->Strength(), spPlayerDefender->Defense());\r
        if (attack >= spPlayerDefender->Health())\r
@@ -79,7 +79,7 @@ unsigned int FightGL::CalculateAttack(unsigned int strength, unsigned int defens
        {\r
                return 0;\r
        }\r
-       Range<unsigned int> r(strength, strength / 2);\r
+       UIntRange r(strength, strength / 2);\r
        if (r.Random() <= defense)\r
        {\r
                return 0;\r
index 5131cafb9933f0c8bbc786b9fb7a7e4d8b5fc8c5..77986a4f9e9c54ff89054b85cc0f146e524e94f6 100644 (file)
@@ -18,8 +18,11 @@ using GameServ::DataLayer::IDAOFactory;
 using GameServ::GameLayer::GameObjects::PlayerGO;\r
 using GameServ::GameLayer::GameObjects::MonsterGO;\r
 \r
+#include <GameServ/Types.h>\r
+using GameServ::Types::UIntRange;\r
+\r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <string>\r
 using std::string;\r
@@ -36,21 +39,21 @@ ForestGL::~ForestGL()
 void ForestGL::Initialize(void)\r
 {\r
        // TODO: Change this to be loaded from a config file\r
-       shared_ptr<IDAOFactory> spFactory = DataAccess::GetDataAccessFactory("File");\r
+       boost::shared_ptr<IDAOFactory> spFactory = DataAccess::GetDataAccessFactory("File");\r
 \r
        mspMonsterDAO = spFactory->GetMonsterDAO();\r
        mspLevelDAO = spFactory->GetLevelDAO();\r
 }\r
 \r
-shared_ptr<MonsterGO> ForestGL::GetRandomMonsterForPlayer(shared_ptr<PlayerGO> spPlayer)\r
+boost::shared_ptr<MonsterGO> ForestGL::GetRandomMonsterForPlayer(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        assert (spPlayer != 0);\r
-       shared_ptr<LevelGO> spLevel = mspLevelDAO->GetById(spPlayer->LevelId());\r
+       boost::shared_ptr<LevelGO> spLevel = mspLevelDAO->GetById(spPlayer->LevelId());\r
        vector<string> monsterIds = mspMonsterDAO->GetMonsterIdsByLevelId(spLevel->Id());\r
        if (monsterIds.size() > 0)\r
        {\r
-               Range<unsigned int> r(monsterIds.size() - 1, 0);\r
-               shared_ptr<MonsterGO> spMonster = mspMonsterDAO->GetById(monsterIds[r.Random()]);\r
+               UIntRange r(monsterIds.size() - 1, 0);\r
+               boost::shared_ptr<MonsterGO> spMonster = mspMonsterDAO->GetById(monsterIds[r.Random()]);\r
                spMonster->MaxHealth(spLevel->HealthRange().Random());\r
                spMonster->Health(spMonster->MaxHealth());\r
                spMonster->Strength(spLevel->StrengthRange().Random());\r
@@ -59,5 +62,5 @@ shared_ptr<MonsterGO> ForestGL::GetRandomMonsterForPlayer(shared_ptr<PlayerGO> s
                spMonster->Experience(spLevel->ExperienceRange().Random());\r
                return spMonster;\r
        }\r
-       return shared_ptr<MonsterGO>();\r
+       return boost::shared_ptr<MonsterGO>();\r
 }\r
index 768a77b9c29797bb693fa1cdf5a8d51e9d2c63e6..cb6e3b832376a47331506923ff497cf9a702299a 100644 (file)
@@ -27,9 +27,9 @@ ItemGO()
        mPrice = price;\r
        mUses = uses;\r
        mModifiers.clear();\r
-       mModifiers[Modifiers::strength] = Range<int>(strength, strength);\r
-       mModifiers[Modifiers::defense] = Range<int>(defense, defense);\r
-       mModifiers[Modifiers::maxhealth] = Range<int>(maxhealth, maxhealth);\r
+       mModifiers[Modifiers::strength] = IntRange(strength, strength);\r
+       mModifiers[Modifiers::defense] = IntRange(defense, defense);\r
+       mModifiers[Modifiers::maxhealth] = IntRange(maxhealth, maxhealth);\r
 }\r
 \r
 ArmorGO::~ArmorGO()\r
index 8041cc91aaa04103b50f571a27b7ca3c5053a5d1..7e7b6de66b4c706a092f2342c7ce767698d90613 100644 (file)
@@ -6,7 +6,7 @@ using GameServ::GameLayer::GameObjects::GameObjectIds_Eq;
 using std::string;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 GameObject::GameObject(void) : mId()\r
 {\r
@@ -45,7 +45,7 @@ GameObjectIds_Eq::GameObjectIds_Eq(const string &Id) : mId(Id)
 {\r
 }\r
 \r
-bool GameObjectIds_Eq::operator ()(const shared_ptr<GameObject> &BO) const\r
+bool GameObjectIds_Eq::operator ()(const boost::shared_ptr<GameObject> &BO) const\r
 {\r
        return  mId == BO->mId;\r
 }\r
index f36cf4bf8e3663da5a78bf8478f377ef2b367c7f..7777c2c4d307f251cc29d2a46f7e303082be87c3 100644 (file)
@@ -6,7 +6,7 @@ using GameServ::GameLayer::GameObjects::PlayerGO;
 #include <GameServ/Types.h>\r
 using GameServ::Types::ItemTypes;\r
 using GameServ::Types::Modifiers;\r
-using GameServ::Types::Range;\r
+using GameServ::Types::IntRange;\r
 using GameServ::Types::ObjectTypes;\r
 \r
 #include <GameServ/GameServException.h>\r
@@ -18,7 +18,7 @@ using std::string;
 using std::map;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 \r
 #include <boost/algorithm/string.hpp>\r
@@ -78,25 +78,25 @@ void ItemGO::Uses(const int &value)
        mUses = value;\r
 }\r
 \r
-void ItemGO::Use(shared_ptr<GameObject> spObject)\r
+void ItemGO::Use(boost::shared_ptr<GameObject> spObject)\r
 {\r
-       map<Modifiers::Modifier, Range<int> >::const_iterator iter;\r
+       map<Modifiers::Modifier, IntRange>::const_iterator iter;\r
        for (iter = mModifiers.begin(); iter != mModifiers.end(); iter++)\r
        {\r
                ApplyModifier(spObject, iter->first, iter->second);\r
        }\r
 }\r
 \r
-void ItemGO::Undo(shared_ptr<GameObject> spObject)\r
+void ItemGO::Undo(boost::shared_ptr<GameObject> spObject)\r
 {\r
-       map<Modifiers::Modifier, Range<int> >::const_iterator iter;\r
+       map<Modifiers::Modifier, IntRange>::const_iterator iter;\r
        for (iter = mModifiers.begin(); iter != mModifiers.end(); iter++)\r
        {\r
                UndoModifier(spObject, iter->first, iter->second);\r
        }\r
 }\r
 \r
-void ItemGO::ApplyModifier(shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, Range<int> r)\r
+void ItemGO::ApplyModifier(boost::shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, IntRange r)\r
 {\r
        if (spObject->ObjectType() != ObjectTypes::Player)\r
        {\r
@@ -104,7 +104,7 @@ void ItemGO::ApplyModifier(shared_ptr<GameObject> spObject, const Modifiers::Mod
                        Id() % Name() % ObjectTypes::GetName(spObject->ObjectType())), __FILE__, __LINE__);\r
        }\r
 \r
-       shared_ptr<PlayerGO> spPlayer = shared_static_cast<PlayerGO>(spObject);\r
+       boost::shared_ptr<PlayerGO> spPlayer = shared_static_cast<PlayerGO>(spObject);\r
 \r
        switch (modifier)\r
        {\r
@@ -137,7 +137,7 @@ void ItemGO::ApplyModifier(shared_ptr<GameObject> spObject, const Modifiers::Mod
        }\r
 }\r
 \r
-void ItemGO::UndoModifier(shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, Range<int> r)\r
+void ItemGO::UndoModifier(boost::shared_ptr<GameObject> spObject, const Modifiers::Modifier &modifier, IntRange r)\r
 {\r
        if (spObject->ObjectType() != ObjectTypes::Player)\r
        {\r
@@ -145,7 +145,7 @@ void ItemGO::UndoModifier(shared_ptr<GameObject> spObject, const Modifiers::Modi
                        Id() % Name() % ObjectTypes::GetName(spObject->ObjectType())), __FILE__, __LINE__);\r
        }\r
 \r
-       shared_ptr<PlayerGO> spPlayer = shared_static_cast<PlayerGO>(spObject);\r
+       boost::shared_ptr<PlayerGO> spPlayer = shared_static_cast<PlayerGO>(spObject);\r
 \r
        switch (modifier)\r
        {\r
@@ -178,12 +178,12 @@ void ItemGO::UndoModifier(shared_ptr<GameObject> spObject, const Modifiers::Modi
        }\r
 }\r
 \r
-map<Modifiers::Modifier, Range<int> > ItemGO::Modifiers(void) const\r
+map<Modifiers::Modifier, IntRange> ItemGO::Modifiers(void) const\r
 {\r
        return mModifiers;\r
 }\r
 \r
-void ItemGO::Modifiers(const map<Modifiers::Modifier, Range<int> > &modifiers)\r
+void ItemGO::Modifiers(const map<Modifiers::Modifier, IntRange> &modifiers)\r
 {\r
        mModifiers.clear();\r
        mModifiers.insert(modifiers.begin(), modifiers.end());\r
index 64396dbbe1d22751e0d48fcde3885b33908c1677..fb50e68f2ea9ac0c99d27c8ad640e16e72afe1f9 100644 (file)
@@ -44,52 +44,52 @@ unsigned int LevelGO::Number(void) const
        return mNumber;\r
 }\r
 \r
-void LevelGO::StrengthRange(const Range<int> &value)\r
+void LevelGO::StrengthRange(const IntRange&value)\r
 {\r
        mStrength = value;\r
 }\r
 \r
-Range<int> LevelGO::StrengthRange(void) const\r
+IntRange LevelGO::StrengthRange(void) const\r
 {\r
        return mStrength;\r
 }\r
 \r
-void LevelGO::DefenseRange(const Range<int> &value)\r
+void LevelGO::DefenseRange(const IntRange&value)\r
 {\r
        mDefense = value;\r
 }\r
 \r
-Range<int> LevelGO::DefenseRange(void) const\r
+IntRange LevelGO::DefenseRange(void) const\r
 {\r
        return mDefense;\r
 }\r
 \r
-void LevelGO::GoldRange(const Range<int> &value)\r
+void LevelGO::GoldRange(const IntRange&value)\r
 {\r
        mGold = value;\r
 }\r
 \r
-Range<int> LevelGO::GoldRange(void) const\r
+IntRange LevelGO::GoldRange(void) const\r
 {\r
        return mGold;\r
 }\r
 \r
-void LevelGO::ExperienceRange(const Range<int> &value)\r
+void LevelGO::ExperienceRange(const IntRange&value)\r
 {\r
        mExperience = value;\r
 }\r
 \r
-Range<int> LevelGO::ExperienceRange(void) const\r
+IntRange LevelGO::ExperienceRange(void) const\r
 {\r
        return mExperience;\r
 }\r
 \r
-void LevelGO::HealthRange(const Range<int> &value)\r
+void LevelGO::HealthRange(const IntRange&value)\r
 {\r
        mHealth = value;\r
 }\r
 \r
-Range<int> LevelGO::HealthRange(void) const\r
+IntRange LevelGO::HealthRange(void) const\r
 {\r
        return mHealth;\r
 }\r
index 99e95660169109b37f11fca1309ce3026e105ab0..a70c2b19e1a92d3512e5c68f3cda0a6651698693 100644 (file)
@@ -14,7 +14,7 @@ using GameServ::Exceptions::GameServException;
 using GameServ::Types::ObjectTypes;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 using boost::shared_static_cast;\r
 \r
 #include <boost/algorithm/string.hpp>\r
@@ -206,17 +206,17 @@ void PlayerGO::WeaponId(const string &value)
        {\r
                if (mfkWeaponId != mWeapon->Id())\r
                {\r
-                       mWeapon = shared_ptr<WeaponGO>();\r
+                       mWeapon = boost::shared_ptr<WeaponGO>();\r
                }\r
        }\r
 }\r
 \r
-shared_ptr<WeaponGO> PlayerGO::Weapon(void) const\r
+boost::shared_ptr<WeaponGO> PlayerGO::Weapon(void) const\r
 {\r
        return mWeapon;\r
 }\r
 \r
-void PlayerGO::Weapon(shared_ptr<WeaponGO> spWeapon)\r
+void PlayerGO::Weapon(boost::shared_ptr<WeaponGO> spWeapon)\r
 {\r
        mWeapon = spWeapon;\r
        if (mWeapon != 0)\r
@@ -241,17 +241,17 @@ void PlayerGO::ArmorId(const string &value)
        {\r
                if (mfkArmorId != mArmor->Id())\r
                {\r
-                       mArmor = shared_ptr<ArmorGO>();\r
+                       mArmor = boost::shared_ptr<ArmorGO>();\r
                }\r
        }\r
 }\r
 \r
-shared_ptr<ArmorGO> PlayerGO::Armor(void) const\r
+boost::shared_ptr<ArmorGO> PlayerGO::Armor(void) const\r
 {\r
        return mArmor;\r
 }\r
 \r
-void PlayerGO::Armor(shared_ptr<ArmorGO> spArmor)\r
+void PlayerGO::Armor(boost::shared_ptr<ArmorGO> spArmor)\r
 {\r
        mArmor = spArmor;\r
        if (mArmor != 0)\r
index 3ce5789aff93fd191e76081d0280154c9b924d2c..240d212e130bae9461399a1a64021e1937ecae5b 100644 (file)
@@ -27,9 +27,9 @@ ItemGO()
        mPrice = price;\r
        mUses = uses;\r
        mModifiers.clear();\r
-       mModifiers[Modifiers::strength] = Range<int>(strength, strength);\r
-       mModifiers[Modifiers::defense] = Range<int>(defense, defense);\r
-       mModifiers[Modifiers::maxhealth] = Range<int>(maxhealth, maxhealth);\r
+       mModifiers[Modifiers::strength] = IntRange(strength, strength);\r
+       mModifiers[Modifiers::defense] = IntRange(defense, defense);\r
+       mModifiers[Modifiers::maxhealth] = IntRange(maxhealth, maxhealth);\r
 }\r
 \r
 PotionGO::~PotionGO()\r
index ec3ede657df2cd6c96899262907d436ec51f3fb8..5244606ecd2db287a3b8f202b49fd2effa7edf0e 100644 (file)
@@ -27,9 +27,9 @@ ItemGO()
        mPrice = price;\r
        mUses = uses;\r
        mModifiers.clear();\r
-       mModifiers[Modifiers::strength] = Range<int>(strength, strength);\r
-       mModifiers[Modifiers::defense] = Range<int>(defense, defense);\r
-       mModifiers[Modifiers::maxhealth] = Range<int>(maxhealth, maxhealth);\r
+       mModifiers[Modifiers::strength] = IntRange(strength, strength);\r
+       mModifiers[Modifiers::defense] = IntRange(defense, defense);\r
+       mModifiers[Modifiers::maxhealth] = IntRange(maxhealth, maxhealth);\r
 }\r
 \r
 WeaponGO::~WeaponGO()\r
index 93a83b0682b3c55adba5774b117eb4c0206fe1ed..00c56ad5cc4148c648d57ef4be873e9d0e022238 100644 (file)
@@ -2,7 +2,7 @@
 using namespace GameServ::GameLayer::Helpers;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 #include <list>\r
 #include <map>\r
@@ -11,7 +11,7 @@ using std::map;
 #include <algorithm>\r
 using std::find;\r
 \r
-shared_ptr<InventoryManager> InventoryManager::mInstance = shared_ptr<InventoryManager>();\r
+boost::shared_ptr<InventoryManager> InventoryManager::mInstance = boost::shared_ptr<InventoryManager>();\r
 \r
 InventoryManager::InventoryManager()\r
 {\r
@@ -23,21 +23,21 @@ InventoryManager::~InventoryManager()
        mInstance.reset();\r
 }\r
 \r
-shared_ptr<InventoryManager> InventoryManager::Instance(void)\r
+boost::shared_ptr<InventoryManager> InventoryManager::Instance(void)\r
 {\r
        if (mInstance == 0)\r
        {\r
-               mInstance = shared_ptr<InventoryManager>(new InventoryManager());\r
+               mInstance = boost::shared_ptr<InventoryManager>(new InventoryManager());\r
        }\r
        return mInstance;\r
 }\r
 \r
-void InventoryManager::AddItem(const string &PlayerId, shared_ptr<ItemGO> spItem)\r
+void InventoryManager::AddItem(const string &PlayerId, boost::shared_ptr<ItemGO> spItem)\r
 {\r
        mInventoryTable[PlayerId].push_back(spItem);\r
 }\r
 \r
-void InventoryManager::RemoveItem(const string &PlayerId, shared_ptr<ItemGO> spItem)\r
+void InventoryManager::RemoveItem(const string &PlayerId, boost::shared_ptr<ItemGO> spItem)\r
 {\r
        assert(spItem != 0);\r
        PlayerInventoryMap::const_iterator iter = mInventoryTable.find(PlayerId);\r
index d16dd554bfe2b1cef300c6b36a8c09f8badf18cc..7a0418c9187a0ff1e4a58f5dfd352c1741a5d8f2 100644 (file)
@@ -13,25 +13,25 @@ PlayerGL::PlayerGL()
 \r
 PlayerGL::~PlayerGL()\r
 {\r
-       mspPlayerDAO = shared_ptr<IPlayerDAO>();\r
+       mspPlayerDAO = boost::shared_ptr<IPlayerDAO>();\r
 }\r
 \r
 void PlayerGL::Initialize()\r
 {\r
-       shared_ptr<IDAOFactory> spDAOFactory;\r
+       boost::shared_ptr<IDAOFactory> spDAOFactory;\r
        // TODO: Hard coded for now for POC. Get from a config file\r
-       spDAOFactory = shared_ptr<IDAOFactory>(DataAccess::GetDataAccessFactory("File"));\r
+       spDAOFactory = boost::shared_ptr<IDAOFactory>(DataAccess::GetDataAccessFactory("File"));\r
        mspPlayerDAO = spDAOFactory->GetPlayerDAO();\r
 \r
 }\r
 \r
-shared_ptr<PlayerGO> PlayerGL::GetById(const string &Id)\r
+boost::shared_ptr<PlayerGO> PlayerGL::GetById(const string &Id)\r
 {\r
        assert(!Id.empty());\r
        return mspPlayerDAO->GetById(Id);\r
 }\r
 \r
-void PlayerGL::Insert(shared_ptr<PlayerGO> spPlayer)\r
+void PlayerGL::Insert(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        assert(spPlayer != 0);\r
        mspPlayerDAO->Insert(spPlayer);\r
index c13011d495a14b315cd1e69c12f6a69c5fdb5f13..26132c584be459eee18569d27ea0300bc4d9a40e 100644 (file)
@@ -25,7 +25,7 @@ using GameServ::GameLayer::GameObjects::MonsterGO;
 using GameServ::Exceptions::GameServException;\r
 \r
 #include <GameServ/Types.h>\r
-using GameServ::Types::Range;\r
+using GameServ::Types::IntRange;\r
 using GameServ::Types::ItemTypes;\r
 using GameServ::Types::Modifiers;\r
 \r
@@ -38,7 +38,7 @@ using boost::str;
 using boost::format;\r
 \r
 #include <boost/smart_ptr/shared_ptr.hpp>\r
-using boost::shared_ptr;\r
+\r
 \r
 // just to test\r
 #include <GameServ/DataLayer/MySQL/MySQLPlayerDAO.h>\r
@@ -46,18 +46,18 @@ using GameServ::DataLayer::MySQL::MySQLPlayerDAO;
 #include <GameServ/DataLayer/MySQL/MySQLItemDAO.h>\r
 using GameServ::DataLayer::MySQL::MySQLItemDAO;\r
 \r
-string ItemInfo(shared_ptr<ItemGO> spItem);\r
-string MonsterInfo(shared_ptr<MonsterGO> spMonster);\r
-string PlayerInfo(shared_ptr<PlayerGO> spPlayer);\r
-void DisplayMonster(shared_ptr<MonsterGO> spMonster);\r
-void DisplayPlayer(shared_ptr<PlayerGO> spPlayer);\r
+string ItemInfo(boost::shared_ptr<ItemGO> spItem);\r
+string MonsterInfo(boost::shared_ptr<MonsterGO> spMonster);\r
+string PlayerInfo(boost::shared_ptr<PlayerGO> spPlayer);\r
+void DisplayMonster(boost::shared_ptr<MonsterGO> spMonster);\r
+void DisplayPlayer(boost::shared_ptr<PlayerGO> spPlayer);\r
 \r
 int main()\r
 {\r
        try\r
        {\r
                //PlayerGL pgl;\r
-               //shared_ptr<PlayerGO> spPlayer = pgl.GetById("Kain");\r
+               //boost::shared_ptr<PlayerGO> spPlayer = pgl.GetById("Kain");\r
                //\r
                //\r
                //\r
@@ -72,12 +72,12 @@ int main()
 \r
 \r
 \r
-               //shared_ptr<InventoryManager> spInventory = InventoryManager::Instance();\r
+               //boost::shared_ptr<InventoryManager> spInventory = InventoryManager::Instance();\r
                //ItemList inventory = spInventory->GetInventory(spPlayer);\r
                //ItemList::const_iterator iter;\r
                //for (iter = inventory.begin(); iter != inventory.end(); iter++)\r
                //{\r
-               //      shared_ptr<ItemGO> spItem = (*iter);\r
+               //      boost::shared_ptr<ItemGO> spItem = (*iter);\r
                //      cout << ItemInfo(spItem) << endl;\r
                //}\r
 \r
@@ -95,7 +95,7 @@ int main()
                //      if (cmd == "search")\r
                //      {\r
                //              //cout << "Searching the forest..." << endl;\r
-               //              shared_ptr<MonsterGO> spMonster = forestGL.GetRandomMonsterForPlayer(spPlayer);\r
+               //              boost::shared_ptr<MonsterGO> spMonster = forestGL.GetRandomMonsterForPlayer(spPlayer);\r
                //              \r
                //              while (spPlayer->Alive() && spMonster->Alive())\r
                //              {\r
@@ -126,8 +126,9 @@ int main()
 \r
 \r
                MySQLItemDAO test;\r
-               shared_ptr<ItemGO> spItem = test.GetById("3");\r
+               boost::shared_ptr<ItemGO> spItem = test.GetById("3");\r
                spItem->Name("Testin' again!!");\r
+               \r
                test.Insert(spItem);\r
                \r
                MySQLPlayerDAO playerTest;\r
@@ -135,7 +136,7 @@ int main()
                //int x;\r
                //for (x = 0; x < 10000; x++)\r
                //{\r
-               //      Range testrange(-100, 100);\r
+               //      IntRangetestrange(-100, 100);\r
                //      int randnum = testrange.Random();\r
                //      frequencies[randnum]++;\r
                //}\r
@@ -157,12 +158,12 @@ int main()
        return 0;\r
 }\r
 \r
-string ItemInfo(shared_ptr<ItemGO> spItem)\r
+string ItemInfo(boost::shared_ptr<ItemGO> spItem)\r
 {\r
        return str(format("Name: %1%  Type: %2%") % spItem->Name() % ItemTypes::GetName(spItem->Type()));\r
 }\r
 \r
-string MonsterInfo(shared_ptr<MonsterGO> spMonster)\r
+string MonsterInfo(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        string info = str(format("Name: %1% Weapon: %2%\nStrength: %3% Defense %4% ") %\r
                spMonster->Name() % spMonster->WeaponName() % spMonster->Strength() %\r
@@ -171,7 +172,7 @@ string MonsterInfo(shared_ptr<MonsterGO> spMonster)
        return info;\r
 }\r
 \r
-string PlayerInfo(shared_ptr<PlayerGO> spPlayer)\r
+string PlayerInfo(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        string info = str(format("Name: %1%  Level: %2%\nHealth: %3%/%4%") % \r
                spPlayer->Name() % spPlayer->LevelNumber() % spPlayer->Health() %\r
@@ -179,12 +180,12 @@ string PlayerInfo(shared_ptr<PlayerGO> spPlayer)
        return info;\r
 }\r
 \r
-void DisplayMonster(shared_ptr<MonsterGO> spMonster)\r
+void DisplayMonster(boost::shared_ptr<MonsterGO> spMonster)\r
 {\r
        cout << "Monster:\n" << MonsterInfo(spMonster) << endl;\r
 }\r
 \r
-void DisplayPlayer(shared_ptr<PlayerGO> spPlayer)\r
+void DisplayPlayer(boost::shared_ptr<PlayerGO> spPlayer)\r
 {\r
        cout << "Player:\n" << PlayerInfo(spPlayer) << endl;\r
 }
\ No newline at end of file
diff --git a/gameserv-2.0/testdriver/testdriver.vcxproj b/gameserv-2.0/testdriver/testdriver.vcxproj
new file mode 100644 (file)
index 0000000..a37ac06
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{9DAAD910-02AF-431F-88F2-08434ECB5102}</ProjectGuid>\r
+    <RootNamespace>testdriver</RootNamespace>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <Optimization>Disabled</Optimization>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)/libgameservgldl/include;$(SolutionDir)/libgameservcore/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <MinimalRebuild>true</MinimalRebuild>\r
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+    </ClCompile>\r
+    <Link>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <TargetMachine>MachineX86</TargetMachine>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+    </ClCompile>\r
+    <Link>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <TargetMachine>MachineX86</TargetMachine>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="main.cpp" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\libgameservcore\libgameservcore.vcxproj">\r
+      <Project>{279aa91c-8638-45e5-aaa3-988f74764a97}</Project>\r
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+    </ProjectReference>\r
+    <ProjectReference Include="..\libgameservgldl\libgameservgldl.vcxproj">\r
+      <Project>{3ced9bd5-beaa-4c36-a735-aff2b3f2cf42}</Project>\r
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file