Move RangeSet to ripple_basics module

This commit is contained in:
Vinnie Falco
2013-05-25 14:59:48 -07:00
parent d762abfc85
commit 54d246cb5e
8 changed files with 35 additions and 42 deletions

View File

@@ -1,9 +1,4 @@
#include "RangeSet.h"
#include <boost/test/unit_test.hpp>
#include <boost/lexical_cast.hpp>
SETUP_LOG (RangeSet)
inline uint32 min(uint32 x, uint32 y) { return (x < y) ? x : y; }

View File

@@ -1,18 +1,9 @@
#ifndef RANGESET__H
#define RANGESET__H
#include <list>
#include <string>
#include <boost/foreach.hpp>
#include <boost/icl/interval_set.hpp>
#ifndef RIPPLE_RANGESET_H
#define RIPPLE_RANGESET_H
class RangeSet
{
public:
typedef boost::icl::interval_set<uint32> iRangeSet;
typedef iRangeSet::iterator iterator;
typedef iRangeSet::const_iterator const_iterator;
@@ -21,7 +12,6 @@ public:
static const uint32 RangeSetAbsent = static_cast<uint32>(-1);
protected:
iRangeSet mRanges;
public:

View File

@@ -26,9 +26,10 @@
#include <fstream>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/algorithm/string.hpp>
//#include <boost/filesystem.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/test/unit_test.hpp>
// VFALCO: TODO, fix these warnings!
#ifdef _MSC_VER
@@ -37,6 +38,8 @@
//#pragma warning (disable: 4244) // conversion, possible loss of data
#endif
#include "containers/ripple_RangeSet.cpp"
#include "diagnostic/ripple_Log.cpp"
#include "events/ripple_UptimeTimer.cpp"

View File

@@ -34,14 +34,10 @@
#include <ctime>
#include <limits>
#include <list>
#include <sstream>
#include <string>
// KeyCache
#include <string>
#include <boost/unordered_map.hpp>
#include <boost/thread/mutex.hpp>
// Log
#include <boost/thread/recursive_mutex.hpp>
// Forward declaration
@@ -54,11 +50,25 @@ namespace boost {
*/
#include <boost/filesystem.hpp> // VFALCO: TODO, try to eliminate thie dependency
// KeyCache
#include <string>
#include <boost/unordered_map.hpp>
#include <boost/thread/mutex.hpp>
// RangeSet
#include <boost/foreach.hpp>
#include <boost/icl/interval_set.hpp> // oof this one is ugly
#include "../ripple_json/ripple_json.h"
#include "types/ripple_IntegerTypes.h"
#include "containers/ripple_KeyCache.h"
#include "containers/ripple_RangeSet.h"
#include "diagnostic/ripple_Log.h"

View File

@@ -60,7 +60,6 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
#include "src/cpp/ripple/ParseSection.cpp"
#include "src/cpp/ripple/PlatRand.cpp" // no log
#include "src/cpp/ripple/ProofOfWork.cpp"
#include "src/cpp/ripple/RangeSet.cpp"
#include "src/cpp/ripple/RippleAddress.cpp"
#include "src/cpp/ripple/rfc1751.cpp" // no log
#include "src/cpp/ripple/SHAMap.cpp"

View File

@@ -173,6 +173,12 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="modules\ripple_basics\containers\ripple_RangeSet.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="modules\ripple_basics\diagnostic\ripple_Log.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -875,12 +881,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\cpp\ripple\RangeSet.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\cpp\ripple\RegularKeySetTransactor.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -1176,6 +1176,7 @@
<ClInclude Include="database\sqlite3.h" />
<ClInclude Include="database\sqlite3ext.h" />
<ClInclude Include="modules\ripple_basics\containers\ripple_KeyCache.h" />
<ClInclude Include="modules\ripple_basics\containers\ripple_RangeSet.h" />
<ClInclude Include="modules\ripple_basics\diagnostic\ripple_Log.h" />
<ClInclude Include="modules\ripple_basics\events\ripple_UptimeTimer.h" />
<ClInclude Include="modules\ripple_basics\ripple_basics.h" />
@@ -1561,7 +1562,6 @@
<ClInclude Include="src\cpp\ripple\PeerDoor.h" />
<ClInclude Include="src\cpp\ripple\PFRequest.h" />
<ClInclude Include="src\cpp\ripple\ProofOfWork.h" />
<ClInclude Include="src\cpp\ripple\RangeSet.h" />
<ClInclude Include="src\cpp\ripple\RegularKeySetTransactor.h" />
<ClInclude Include="src\cpp\ripple\rfc1751.h" />
<ClInclude Include="src\cpp\ripple\RippleAddress.h" />

View File

@@ -106,9 +106,6 @@
<Filter Include="1. Modules\ripple_mess\containers">
<UniqueIdentifier>{683c494b-1175-49ac-9714-65640ba50bf5}</UniqueIdentifier>
</Filter>
<Filter Include="1. Modules\ripple_mess\diagnostic">
<UniqueIdentifier>{505d1e20-ff6a-446b-8ce0-962e11b78820}</UniqueIdentifier>
</Filter>
<Filter Include="1. Modules\ripple_mess\protobuf">
<UniqueIdentifier>{eb0c6bda-cf68-4334-a8c3-8d39202852a0}</UniqueIdentifier>
</Filter>
@@ -690,9 +687,6 @@
<ClCompile Include="src\cpp\ripple\NicknameState.cpp">
<Filter>1. Modules\ripple_ledger\processing</Filter>
</ClCompile>
<ClCompile Include="src\cpp\ripple\RangeSet.cpp">
<Filter>1. Modules\ripple_mess\containers</Filter>
</ClCompile>
<ClCompile Include="src\cpp\ripple\SHAMap.cpp">
<Filter>1. Modules\ripple_mess\containers</Filter>
</ClCompile>
@@ -756,6 +750,9 @@
<ClCompile Include="modules\ripple_basics\diagnostic\ripple_LogWebsockets.cpp">
<Filter>1. Modules\ripple_net\sockets</Filter>
</ClCompile>
<ClCompile Include="modules\ripple_basics\containers\ripple_RangeSet.cpp">
<Filter>1. Modules\ripple_basics\containers</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="database\sqlite3ext.h">
@@ -1301,9 +1298,6 @@
<ClInclude Include="src\cpp\ripple\NicknameState.h">
<Filter>1. Modules\ripple_ledger\processing</Filter>
</ClInclude>
<ClInclude Include="src\cpp\ripple\RangeSet.h">
<Filter>1. Modules\ripple_mess\containers</Filter>
</ClInclude>
<ClInclude Include="src\cpp\ripple\SHAMap.h">
<Filter>1. Modules\ripple_mess\containers</Filter>
</ClInclude>
@@ -1403,6 +1397,9 @@
<ClInclude Include="src\cpp\ripple\WSDoor.h">
<Filter>1. Modules\ripple_net\sockets\_OLD</Filter>
</ClInclude>
<ClInclude Include="modules\ripple_basics\containers\ripple_RangeSet.h">
<Filter>1. Modules\ripple_basics\containers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="SConstruct" />

View File

@@ -7,7 +7,6 @@
#include "LedgerAcquire.h"
#include "Transaction.h"
#include "TransactionEngine.h"
#include "RangeSet.h"
#include "CanonicalTXSet.h"
// Tracks the current ledger and any ledgers in the process of closing