mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Use provided names for CountedObject instead of typeid()
This commit is contained in:
@@ -101,6 +101,8 @@ public:
|
||||
getCounter ().decrement ();
|
||||
}
|
||||
|
||||
virtual char const* getCountedObjectName () = 0;
|
||||
|
||||
private:
|
||||
class Counter : public CountedObjects::CounterBase
|
||||
{
|
||||
|
||||
@@ -12,6 +12,8 @@ class STObject
|
||||
, public CountedObject <STObject>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "STObject"; }
|
||||
|
||||
STObject () : mType (NULL)
|
||||
{
|
||||
;
|
||||
@@ -323,6 +325,8 @@ class STArray
|
||||
, public CountedObject <STArray>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "STArray"; }
|
||||
|
||||
typedef boost::ptr_vector<STObject> vector;
|
||||
typedef boost::ptr_vector<STObject>::iterator iterator;
|
||||
typedef boost::ptr_vector<STObject>::const_iterator const_iterator;
|
||||
|
||||
@@ -41,6 +41,8 @@ class Ledger
|
||||
, public CountedObject <Ledger>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "Ledger"; }
|
||||
|
||||
typedef boost::shared_ptr<Ledger> pointer;
|
||||
typedef const boost::shared_ptr<Ledger>& ref;
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ class LedgerProposal
|
||||
: public CountedObject <LedgerProposal>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "LedgerProposal"; }
|
||||
|
||||
static const uint32 seqLeave = 0xffffffff; // leaving the consensus process
|
||||
|
||||
typedef boost::shared_ptr<LedgerProposal> pointer;
|
||||
|
||||
@@ -12,6 +12,8 @@ class SerializedValidation
|
||||
, public CountedObject <SerializedValidation>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SerializedValidation"; }
|
||||
|
||||
typedef boost::shared_ptr<SerializedValidation> pointer;
|
||||
typedef const boost::shared_ptr<SerializedValidation>& ref;
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ class Transaction
|
||||
, public CountedObject <Transaction>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "Transaction"; }
|
||||
|
||||
typedef boost::shared_ptr<Transaction> pointer;
|
||||
typedef const pointer& ref;
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
class TransactionEngine
|
||||
: public CountedObject <TransactionEngine>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "TransactionEngine"; }
|
||||
|
||||
private:
|
||||
LedgerEntrySet mNodes;
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ class WSConnection
|
||||
, public CountedObject <WSConnection <endpoint_type> >
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "WSConnection"; }
|
||||
|
||||
typedef typename endpoint_type::connection_type connection;
|
||||
typedef typename boost::shared_ptr<connection> connection_ptr;
|
||||
typedef typename boost::weak_ptr<connection> weak_connection_ptr;
|
||||
|
||||
@@ -13,6 +13,8 @@ private:
|
||||
class Entry : public CountedObject <Entry>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "HashRouterEntry"; }
|
||||
|
||||
Entry ()
|
||||
: mFlags (0)
|
||||
{
|
||||
|
||||
@@ -36,6 +36,8 @@ class HashedObject
|
||||
: public CountedObject <HashedObject>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "HashedObject"; }
|
||||
|
||||
typedef boost::shared_ptr <HashedObject> pointer;
|
||||
typedef pointer const& ref;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ class InboundLedger
|
||||
, public CountedObject <InboundLedger>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "InboundLedger"; }
|
||||
|
||||
typedef boost::shared_ptr <InboundLedger> pointer;
|
||||
|
||||
public:
|
||||
|
||||
@@ -16,6 +16,8 @@ class InfoSub
|
||||
: public CountedObject <InfoSub>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "InfoSub"; }
|
||||
|
||||
typedef boost::shared_ptr<InfoSub> pointer;
|
||||
|
||||
// VFALCO TODO Standardize on the names of weak / strong pointer typedefs.
|
||||
|
||||
@@ -17,6 +17,8 @@ class LedgerConsensus
|
||||
, public CountedObject <LedgerConsensus>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "LedgerConsensus"; }
|
||||
|
||||
LedgerConsensus (LedgerHash const & prevLCLHash, Ledger::ref previousLedger, uint32 closeTime);
|
||||
|
||||
int startup ();
|
||||
|
||||
@@ -36,6 +36,8 @@ class LedgerEntrySetEntry
|
||||
: public CountedObject <LedgerEntrySetEntry>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "LedgerEntrySetEntry"; }
|
||||
|
||||
SLE::pointer mEntry;
|
||||
LedgerEntryAction mAction;
|
||||
int mSeq;
|
||||
@@ -60,6 +62,8 @@ class LedgerEntrySet
|
||||
: public CountedObject <LedgerEntrySet>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "LedgerEntrySet"; }
|
||||
|
||||
LedgerEntrySet (Ledger::ref ledger, TransactionEngineParams tep, bool immutable = false) :
|
||||
mLedger (ledger), mParams (tep), mSeq (0), mImmutable (immutable)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,8 @@ class PeerImp : public Peer
|
||||
, public CountedObject <PeerImp>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "Peer"; }
|
||||
|
||||
PeerImp (boost::asio::io_service & io_service,
|
||||
boost::asio::ssl::context & ctx,
|
||||
uint64 peerId,
|
||||
|
||||
@@ -20,6 +20,8 @@ class SHAMap
|
||||
: public CountedObject <SHAMap>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SHAMap"; }
|
||||
|
||||
typedef boost::shared_ptr<SHAMap> pointer;
|
||||
typedef const boost::shared_ptr<SHAMap>& ref;
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ class SHAMapItem
|
||||
: public CountedObject <SHAMapItem>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SHAMapItem"; }
|
||||
|
||||
typedef boost::shared_ptr<SHAMapItem> pointer;
|
||||
typedef const boost::shared_ptr<SHAMapItem>& ref;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ class SHAMapTreeNode
|
||||
, public CountedObject <SHAMapTreeNode>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SHAMapTreeNode"; }
|
||||
|
||||
typedef boost::shared_ptr<SHAMapTreeNode> pointer;
|
||||
typedef const boost::shared_ptr<SHAMapTreeNode>& ref;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ class SerializedLedgerEntry
|
||||
, public CountedObject <SerializedLedgerEntry>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SerializedLedgerEntry"; }
|
||||
|
||||
typedef boost::shared_ptr<SerializedLedgerEntry> pointer;
|
||||
typedef const boost::shared_ptr<SerializedLedgerEntry>& ref;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ class SerializedTransaction
|
||||
, public CountedObject <SerializedTransaction>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "SerializedTransaction"; }
|
||||
|
||||
typedef boost::shared_ptr<SerializedTransaction> pointer;
|
||||
typedef const boost::shared_ptr<SerializedTransaction>& ref;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ class TransactionAcquire
|
||||
, public CountedObject <TransactionAcquire>
|
||||
{
|
||||
public:
|
||||
char const* getCountedObjectName () { return "TransactionAcquire"; }
|
||||
|
||||
typedef boost::shared_ptr<TransactionAcquire> pointer;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user