Levelization, improve structure of source files:

Source files are moved between modules, includes changed and added,
and some code rewritten, with the goal of reducing cross-module dependencies
and eliminating cycles in the dependency graph of classes.

* Remove RippleAddress dependency in CKey_test
* ByteOrder.h, Blob.h, and strHex.h are moved to basics/. This makes
  the basics/ module fully independent of other ripple sources.
* types/ is merged into protocol/. The protocol module now contains
  all primitive types specific to the Ripple protocol.
* Move ErrorCodes to protocol/
* Move base_uint to basics/
* Move Base58 to crypto/
* Remove dependence on Serializer in GenerateDeterministicKey
* Eliminate unity header json.h
* Remove obsolete unity headers
* Remove unnecessary includes
This commit is contained in:
Vinnie Falco
2014-12-19 08:57:30 -08:00
parent e3fbb83ad0
commit 60f27178b8
109 changed files with 859 additions and 493 deletions

View File

@@ -21,7 +21,7 @@
#define RIPPLE_CORE_TYPES_H_INCLUDED
#include <ripple/app/ledger/LedgerEntrySet.h>
#include <ripple/types/Book.h>
#include <ripple/protocol/Book.h>
#include <chrono>
#include <cstdint>

View File

@@ -22,7 +22,7 @@
#include <ripple/protocol/UintTypes.h>
#include <ripple/protocol/Serializer.h>
#include <ripple/types/base_uint.h>
#include <ripple/basics/base_uint.h>
#include <memory>
namespace ripple {

View File

@@ -19,6 +19,7 @@
#include <ripple/app/consensus/DisputedTx.h>
#include <ripple/app/consensus/LedgerConsensus.h>
#include <ripple/json/to_string.h>
#include <ripple/app/ledger/InboundLedgers.h>
#include <ripple/app/ledger/LedgerMaster.h>
#include <ripple/app/ledger/LedgerTiming.h>

View File

@@ -26,7 +26,7 @@
#include <ripple/app/tx/LocalTxs.h>
#include <ripple/json/json_value.h>
#include <ripple/overlay/Peer.h>
#include <ripple/types/RippleLedgerHash.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <beast/chrono/abstract_clock.h>
#include <chrono>

View File

@@ -20,7 +20,7 @@
#ifndef RIPPLE_DATABASE_H_INCLUDED
#define RIPPLE_DATABASE_H_INCLUDED
#include <ripple/types/Blob.h>
#include <ripple/basics/Blob.h>
namespace ripple {

View File

@@ -17,6 +17,8 @@
*/
//==============================================================================
#include <ripple/json/to_string.h>
namespace ripple {
void BookListeners::addSubscriber (InfoSub::ref sub)

View File

@@ -21,7 +21,7 @@
#define RIPPLE_INBOUNDLEDGERS_H
#include <ripple/app/ledger/InboundLedger.h>
#include <ripple/types/RippleLedgerHash.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <beast/threads/Stoppable.h>
#include <beast/cxx14/memory.h> // <memory>

View File

@@ -25,6 +25,7 @@
#include <ripple/core/Config.h>
#include <ripple/core/JobQueue.h>
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/json/to_string.h>
#include <ripple/nodestore/Database.h>
#include <ripple/protocol/HashPrefix.h>
#include <beast/unit_test/suite.h>

View File

@@ -27,7 +27,7 @@
#include <ripple/protocol/STLedgerEntry.h>
#include <ripple/basics/CountedObject.h>
#include <ripple/protocol/Serializer.h>
#include <ripple/types/Book.h>
#include <ripple/protocol/Book.h>
#include <set>
namespace ripple {

View File

@@ -22,6 +22,7 @@
#include <beast/cxx14/memory.h> // <memory>
#include <beast/threads/Stoppable.h>
#include <beast/utility/PropertyStream.h>
#include <beast/utility/Journal.h>
namespace ripple {

View File

@@ -20,7 +20,7 @@
#ifndef RIPPLE_LEDGERHISTORY_H
#define RIPPLE_LEDGERHISTORY_H
#include <ripple/types/RippleLedgerHash.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <beast/insight/Event.h>
namespace ripple {

View File

@@ -21,10 +21,11 @@
#define RIPPLE_LEDGERMASTER_H_INCLUDED
#include <ripple/basics/StringUtilities.h>
#include <ripple/types/RippleLedgerHash.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <beast/insight/Collector.h>
#include <beast/threads/Stoppable.h>
#include <beast/threads/UnlockGuard.h>
#include <beast/utility/PropertyStream.h>
namespace ripple {

View File

@@ -19,13 +19,14 @@
#include <ripple/app/impl/BasicApp.h>
#include <ripple/app/main/Tuning.h>
#include <ripple/app/misc/SHAMapStore.h>
#include <ripple/app/paths/FindPaths.h>
#include <ripple/basics/Log.h>
#include <ripple/basics/LoggedTimings.h>
#include <ripple/basics/Sustain.h>
#include <ripple/basics/seconds_clock.h>
#include <ripple/basics/make_SSLContext.h>
#include <ripple/app/misc/SHAMapStore.h>
#include <ripple/json/json_reader.h>
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/net/SNTPClient.h>
#include <ripple/nodestore/Database.h>

View File

@@ -20,7 +20,7 @@
#ifndef RIPPLE_FULLBELOWCACHE_H_INCLUDED
#define RIPPLE_FULLBELOWCACHE_H_INCLUDED
#include <ripple/types/base_uint.h>
#include <ripple/basics/base_uint.h>
#include <ripple/app/main/BasicFullBelowCache.h>
namespace ripple {

View File

@@ -22,6 +22,7 @@
#include <ripple/basics/ThreadName.h>
#include <ripple/core/ConfigSections.h>
#include <ripple/crypto/RandomNumbers.h>
#include <ripple/json/to_string.h>
#include <ripple/net/RPCCall.h>
#include <ripple/resource/Fees.h>
#include <ripple/protocol/BuildInfo.h>

View File

@@ -20,7 +20,7 @@
#ifndef RIPPLE_CANONICALTXSET_H
#define RIPPLE_CANONICALTXSET_H
#include <ripple/types/RippleLedgerHash.h>
#include <ripple/protocol/RippleLedgerHash.h>
namespace ripple {

View File

@@ -21,7 +21,7 @@
#define RIPPLE_APP_FEEVOTE_H_INCLUDED
#include <ripple/basics/BasicConfig.h>
#include <ripple/core/SystemParameters.h>
#include <ripple/protocol/SystemParameters.h>
namespace ripple {

View File

@@ -28,6 +28,7 @@
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/crypto/RandomNumbers.h>
#include <ripple/crypto/RFC1751.h>
#include <ripple/json/to_string.h>
#include <ripple/overlay/predicates.h>
#include <ripple/protocol/BuildInfo.h>
#include <ripple/protocol/HashPrefix.h>

View File

@@ -23,7 +23,7 @@
#include <ripple/core/Config.h>
#include <ripple/nodestore/Manager.h>
#include <ripple/nodestore/Scheduler.h>
#include <ripple/rpc/ErrorCodes.h>
#include <ripple/protocol/ErrorCodes.h>
namespace ripple {

View File

@@ -23,7 +23,7 @@
#include <ripple/core/Config.h>
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/net/RPCErr.h>
#include <ripple/rpc/ErrorCodes.h>
#include <ripple/protocol/ErrorCodes.h>
#include <ripple/protocol/UintTypes.h>
#include <boost/log/trivial.hpp>
#include <tuple>

View File

@@ -18,6 +18,7 @@
//==============================================================================
#include <ripple/app/paths/Credit.h>
#include <ripple/json/to_string.h>
namespace ripple {

View File

@@ -19,6 +19,7 @@
#include <ripple/app/paths/Tuning.h>
#include <ripple/app/paths/Pathfinder.h>
#include <ripple/json/to_string.h>
#include <ripple/core/JobQueue.h>
#include <tuple>

View File

@@ -17,8 +17,8 @@
*/
//==============================================================================
#ifndef RIPPLE_TYPES_H
#define RIPPLE_TYPES_H
#ifndef RIPPLE_TYPES_H_INCLUDED
#define RIPPLE_TYPES_H_INCLUDED
namespace ripple {

View File

@@ -22,7 +22,7 @@
#include <ripple/basics/CountedObject.h>
#include <ripple/protocol/Serializer.h>
#include <ripple/types/base_uint.h>
#include <ripple/basics/base_uint.h>
#include <memory>
namespace ripple {

View File

@@ -21,7 +21,7 @@
#define RIPPLE_SHAMAPNODEID_H
#include <ripple/protocol/Serializer.h>
#include <ripple/types/base_uint.h>
#include <ripple/basics/base_uint.h>
#include <ostream>
#include <string>
#include <tuple>

View File

@@ -21,6 +21,7 @@
#include <ripple/app/book/Taker.h>
#include <ripple/app/book/Types.h>
#include <ripple/app/book/Amounts.h>
#include <ripple/json/to_string.h>
#include <beast/cxx14/memory.h>

View File

@@ -17,6 +17,7 @@
*/
//==============================================================================
#include <ripple/json/to_string.h>
#include <ripple/protocol/STAccount.h>
namespace ripple {

View File

@@ -23,6 +23,7 @@
#include <ripple/core/Config.h>
#include <ripple/resource/Manager.h>
#include <ripple/server/Port.h>
#include <ripple/json/to_string.h>
#include <beast/asio/placeholders.h>
#include <memory>

View File

@@ -23,6 +23,7 @@
#include <ripple/protocol/JsonFields.h>
#include <ripple/server/Port.h>
#include <ripple/app/websocket/WSConnection.h>
#include <ripple/json/json_reader.h>
#include <memory>
namespace ripple {