Move Application to ripple_app.cpp

This commit is contained in:
Vinnie Falco
2013-08-31 14:46:09 -07:00
parent a709167801
commit 3526cabd7b
9 changed files with 137 additions and 108 deletions

View File

@@ -66,6 +66,7 @@ SOURCES += \
../../Subtrees/beast/modules/beast_db/beast_db.cpp \ ../../Subtrees/beast/modules/beast_db/beast_db.cpp \
../../Subtrees/beast/modules/beast_sqdb/beast_sqdb.cpp \ ../../Subtrees/beast/modules/beast_sqdb/beast_sqdb.cpp \
../../Subtrees/beast/modules/beast_sqlite/beast_sqlite.c \ ../../Subtrees/beast/modules/beast_sqlite/beast_sqlite.c \
../../modules/ripple_app/ripple_app.cpp \
../../modules/ripple_app/ripple_app_pt1.cpp \ ../../modules/ripple_app/ripple_app_pt1.cpp \
../../modules/ripple_app/ripple_app_pt2.cpp \ ../../modules/ripple_app/ripple_app_pt2.cpp \
../../modules/ripple_app/ripple_app_pt3.cpp \ ../../modules/ripple_app/ripple_app_pt3.cpp \

View File

@@ -419,6 +419,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\modules\ripple_app\ripple_app.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp"> <ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>

View File

@@ -876,6 +876,9 @@
<ClCompile Include="..\..\modules\ripple_net\basics\RPCDoor.cpp"> <ClCompile Include="..\..\modules\ripple_net\basics\RPCDoor.cpp">
<Filter>[1] Ripple\ripple_net\basics</Filter> <Filter>[1] Ripple\ripple_net\basics</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\modules\ripple_app\ripple_app.cpp">
<Filter>[1] Ripple\ripple_app</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\modules\ripple_app\ripple_app.h"> <ClInclude Include="..\..\modules\ripple_app\ripple_app.h">

View File

@@ -136,6 +136,7 @@ COMPILED_FILES.extend([
'Subtrees/beast/modules/beast_db/beast_db.cpp', 'Subtrees/beast/modules/beast_db/beast_db.cpp',
'Subtrees/beast/modules/beast_sqdb/beast_sqdb.cpp', 'Subtrees/beast/modules/beast_sqdb/beast_sqdb.cpp',
'Subtrees/beast/modules/beast_sqlite/beast_sqlite.c', 'Subtrees/beast/modules/beast_sqlite/beast_sqlite.c',
'modules/ripple_app/ripple_app.cpp',
'modules/ripple_app/ripple_app_pt1.cpp', 'modules/ripple_app/ripple_app_pt1.cpp',
'modules/ripple_app/ripple_app_pt2.cpp', 'modules/ripple_app/ripple_app_pt2.cpp',
'modules/ripple_app/ripple_app_pt3.cpp', 'modules/ripple_app/ripple_app_pt3.cpp',
@@ -145,6 +146,7 @@ COMPILED_FILES.extend([
'modules/ripple_app/ripple_app_pt7.cpp', 'modules/ripple_app/ripple_app_pt7.cpp',
'modules/ripple_app/ripple_app_pt8.cpp', 'modules/ripple_app/ripple_app_pt8.cpp',
'modules/ripple_basics/ripple_basics.cpp', 'modules/ripple_basics/ripple_basics.cpp',
'modules/ripple_client/ripple_client.cpp',
'modules/ripple_core/ripple_core.cpp', 'modules/ripple_core/ripple_core.cpp',
'modules/ripple_data/ripple_data.cpp', 'modules/ripple_data/ripple_data.cpp',
'modules/ripple_hyperleveldb/ripple_hyperleveldb.cpp', 'modules/ripple_hyperleveldb/ripple_hyperleveldb.cpp',

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
/*
Copyright (c) 2011-2013, OpenCoin, Inc.
*/
//==============================================================================
#include "BeastConfig.h"
#include "ripple_app.h"
// This file should only hold the Application object .cpp. It depends on
// everything else. Nothing else should depend on the Application
// implementation (although they will depend on its abstract interface)
//
namespace ripple
{
#include "boost/ripple_IoService.h" // deprecated
#include "boost/ripple_IoService.cpp" // deprecated
#ifdef _MSC_VER
# pragma warning (push)
# pragma warning (disable: 4244) // conversion, possible loss of data
# pragma warning (disable: 4018) // signed/unsigned mismatch
#endif
#include "main/ripple_Application.cpp"
#ifdef _MSC_VER
# pragma warning (pop)
#endif
}

View File

@@ -8,36 +8,63 @@
#include "ripple_app.h" #include "ripple_app.h"
#include "beast/modules/beast_db/beast_db.h"
#include "../ripple_mdb/ripple_mdb.h"
#include "../ripple_leveldb/ripple_leveldb.h"
#include "../ripple_hyperleveldb/ripple_hyperleveldb.h"
namespace ripple namespace ripple
{ {
#include "boost/ripple_IoService.h" #include "peers/ripple_PeerSet.cpp"
#include "boost/ripple_IoService.cpp" #include "misc/ripple_InfoSub.cpp"
#include "misc/ripple_OrderBook.cpp"
#include "misc/ripple_ProofOfWork.cpp"
#include "misc/ripple_ProofOfWorkFactory.h"
#include "misc/ripple_ProofOfWorkFactory.cpp" // requires ProofOfWork.cpp for ProofOfWork::sMaxDifficulty
#include "misc/ripple_SerializedTransaction.cpp"
#include "shamap/ripple_SHAMapSyncFilters.cpp" // requires Application
#include "main/ripple_FatalErrorReporter.h"
#include "main/ripple_FatalErrorReporter.cpp"
#include "main/ripple_RippleMain.h"
#include "node/ripple_HyperLevelDBBackendFactory.h"
#include "node/ripple_KeyvaDBBackendFactory.h"
#include "node/ripple_LevelDBBackendFactory.h"
#include "node/ripple_MdbBackendFactory.h"
#include "node/ripple_MemoryBackendFactory.h"
#include "node/ripple_NullBackendFactory.h"
#include "node/ripple_SqliteBackendFactory.h"
#include "main/ripple_RippleMain.cpp"
#include "node/ripple_HyperLevelDBBackendFactory.cpp"
#include "node/ripple_KeyvaDBBackendFactory.cpp"
#include "node/ripple_LevelDBBackendFactory.cpp"
#include "node/ripple_MemoryBackendFactory.cpp"
#include "node/ripple_NullBackendFactory.cpp"
#include "node/ripple_MdbBackendFactory.cpp"
#include "node/ripple_SqliteBackendFactory.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (push) # pragma warning (push)
# pragma warning (disable: 4244) // conversion, possible loss of data # pragma warning (disable: 4244) // conversion, possible loss of data
# pragma warning (disable: 4018) // signed/unsigned mismatch # pragma warning (disable: 4018) // signed/unsigned mismatch
#endif #endif
#include "main/ripple_Application.cpp" #include "consensus/ripple_LedgerConsensus.cpp"
#include "ledger/Ledger.cpp" #include "ledger/LedgerMaster.cpp"
#include "node/ripple_NodeStore.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (pop) # pragma warning (pop)
#endif #endif
#include "basics/ripple_BuildInfo.cpp" }
#include "node/ripple_NodeObject.cpp"
//------------------------------------------------------------------------------
#include "shamap/ripple_SHAMapDelta.cpp"
#include "shamap/ripple_SHAMapNode.cpp" // Must be outside the namespace for obvious reasons
#include "shamap/ripple_SHAMapTreeNode.cpp" //
#include "misc/ripple_AccountItems.cpp" int main (int argc, char** argv)
#include "misc/ripple_AccountState.cpp" {
#include "tx/ChangeTransactor.cpp" ripple::RippleMain rippled;
#include "contracts/ripple_Contract.cpp" return rippled.runFromMain (argc, argv);
#include "contracts/ripple_Operation.cpp"
#include "contracts/ripple_ScriptData.cpp"
#include "contracts/ripple_Interpreter.cpp"
} }

View File

@@ -11,46 +11,29 @@
namespace ripple namespace ripple
{ {
#include "rpc/RPCErr.h" // private
#include "rpc/RPCUtil.h" // private
#include "websocket/WSConnection.h" // private
#include "rpc/RPCErr.cpp"
#include "rpc/RPCUtil.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (push) # pragma warning (push)
#pragma warning (disable: 4018) // signed/unsigned mismatch # pragma warning (disable: 4244) // conversion, possible loss of data
#pragma warning (disable: 4244) // conversion, possible loss of data # pragma warning (disable: 4018) // signed/unsigned mismatch
#endif #endif
#include "rpc/CallRPC.cpp" #include "ledger/Ledger.cpp"
#include "rpc/RPCHandler.cpp" #include "node/ripple_NodeStore.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (pop) # pragma warning (pop)
#endif #endif
#include "rpc/RPCSub.cpp" #include "basics/ripple_BuildInfo.cpp"
#include "node/ripple_NodeObject.cpp"
#include "basics/ripple_RPCServerHandler.cpp" // needs RPCUtil #include "shamap/ripple_SHAMapDelta.cpp"
#include "paths/ripple_PathRequest.cpp" // needs RPCErr.h #include "shamap/ripple_SHAMapNode.cpp"
#include "paths/ripple_RippleCalc.cpp" #include "shamap/ripple_SHAMapTreeNode.cpp"
#include "paths/ripple_PathState.cpp" #include "misc/ripple_AccountItems.cpp"
#include "misc/ripple_AccountState.cpp"
#include "main/ParameterTable.cpp" #include "tx/ChangeTransactor.cpp"
#include "peers/PeerDoor.cpp" #include "contracts/ripple_Contract.cpp"
#include "paths/ripple_RippleLineCache.cpp" #include "contracts/ripple_Operation.cpp"
#include "ledger/SerializedValidation.cpp" #include "contracts/ripple_ScriptData.cpp"
#include "contracts/ripple_Interpreter.cpp"
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4309) // truncation of constant value
#endif
#include "websocket/WSConnection.cpp"
#include "websocket/WSDoor.cpp"
#include "websocket/WSServerHandler.cpp"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
} }

View File

@@ -8,63 +8,49 @@
#include "ripple_app.h" #include "ripple_app.h"
#include "beast/modules/beast_db/beast_db.h"
#include "../ripple_mdb/ripple_mdb.h"
#include "../ripple_leveldb/ripple_leveldb.h"
#include "../ripple_hyperleveldb/ripple_hyperleveldb.h"
namespace ripple namespace ripple
{ {
#include "peers/ripple_PeerSet.cpp" #include "rpc/RPCErr.h"
#include "misc/ripple_InfoSub.cpp" #include "rpc/RPCUtil.h"
#include "misc/ripple_OrderBook.cpp" #include "websocket/WSConnection.h" // needs RPCErr
#include "misc/ripple_ProofOfWork.cpp"
#include "misc/ripple_ProofOfWorkFactory.h"
#include "misc/ripple_ProofOfWorkFactory.cpp" // requires ProofOfWork.cpp for ProofOfWork::sMaxDifficulty
#include "misc/ripple_SerializedTransaction.cpp"
#include "shamap/ripple_SHAMapSyncFilters.cpp" // requires Application #include "rpc/RPCErr.cpp"
#include "rpc/RPCUtil.cpp"
#include "main/ripple_FatalErrorReporter.h"
#include "main/ripple_FatalErrorReporter.cpp"
#include "main/ripple_RippleMain.h"
#include "node/ripple_HyperLevelDBBackendFactory.h"
#include "node/ripple_KeyvaDBBackendFactory.h"
#include "node/ripple_LevelDBBackendFactory.h"
#include "node/ripple_MdbBackendFactory.h"
#include "node/ripple_MemoryBackendFactory.h"
#include "node/ripple_NullBackendFactory.h"
#include "node/ripple_SqliteBackendFactory.h"
#include "main/ripple_RippleMain.cpp"
#include "node/ripple_HyperLevelDBBackendFactory.cpp"
#include "node/ripple_KeyvaDBBackendFactory.cpp"
#include "node/ripple_LevelDBBackendFactory.cpp"
#include "node/ripple_MemoryBackendFactory.cpp"
#include "node/ripple_NullBackendFactory.cpp"
#include "node/ripple_MdbBackendFactory.cpp"
#include "node/ripple_SqliteBackendFactory.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (push) #pragma warning (push)
# pragma warning (disable: 4244) // conversion, possible loss of data #pragma warning (disable: 4018) // signed/unsigned mismatch
# pragma warning (disable: 4018) // signed/unsigned mismatch #pragma warning (disable: 4244) // conversion, possible loss of data
#endif #endif
#include "consensus/ripple_LedgerConsensus.cpp" #include "rpc/CallRPC.cpp"
#include "ledger/LedgerMaster.cpp" #include "rpc/RPCHandler.cpp"
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning (pop) #pragma warning (pop)
#endif
#include "rpc/RPCSub.cpp"
#include "basics/ripple_RPCServerHandler.cpp" // needs RPCUtil
#include "paths/ripple_PathRequest.cpp" // needs RPCErr.h
#include "paths/ripple_RippleCalc.cpp"
#include "paths/ripple_PathState.cpp"
#include "main/ParameterTable.cpp"
#include "peers/PeerDoor.cpp"
#include "paths/ripple_RippleLineCache.cpp"
#include "ledger/SerializedValidation.cpp"
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4309) // truncation of constant value
#endif
#include "websocket/WSConnection.cpp"
#include "websocket/WSDoor.cpp"
#include "websocket/WSServerHandler.cpp"
#ifdef _MSC_VER
#pragma warning (pop)
#endif #endif
} }
//------------------------------------------------------------------------------
// Must be outside the namespace for obvious reasons
//
int main (int argc, char** argv)
{
ripple::RippleMain rippled;
return rippled.runFromMain (argc, argv);
}

View File

@@ -4,12 +4,6 @@
*/ */
//============================================================================== //==============================================================================
/** Include this to get the @ref ripple_client module.
@file ripple_client.h
@ingroup ripple_client
*/
/** Client classes. /** Client classes.
This module provides classes that perform client interaction with the server. This module provides classes that perform client interaction with the server.