mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add more counted types.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "Ledger.h"
|
||||
#include "Log.h"
|
||||
|
||||
DECLARE_INSTANCE(SerializedLedgerEntry)
|
||||
|
||||
SerializedLedgerEntry::SerializedLedgerEntry(SerializerIterator& sit, const uint256& index)
|
||||
: STObject(sfLedgerEntry), mIndex(index)
|
||||
{
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
#include "SerializedObject.h"
|
||||
#include "LedgerFormats.h"
|
||||
#include "RippleAddress.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
class SerializedLedgerEntry : public STObject
|
||||
DEFINE_INSTANCE(SerializedLedgerEntry);
|
||||
|
||||
class SerializedLedgerEntry : public STObject, private IS_INSTANCE(SerializedLedgerEntry)
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<SerializedLedgerEntry> pointer;
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "SerializedTransaction.h"
|
||||
|
||||
SETUP_LOG();
|
||||
DECLARE_INSTANCE(SerializedObject);
|
||||
DECLARE_INSTANCE(SerializedArray);
|
||||
|
||||
std::auto_ptr<SerializedType> STObject::makeDefaultObject(SerializedTypeID id, SField::ref name)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
#include "../json/value.h"
|
||||
|
||||
#include "SerializedTypes.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
DEFINE_INSTANCE(SerializedObject);
|
||||
DEFINE_INSTANCE(SerializedArray);
|
||||
|
||||
// Serializable object/array types
|
||||
|
||||
@@ -22,7 +26,7 @@ public:
|
||||
SOElement(SField::ref fi, SOE_Flags fl) : e_field(fi), flags(fl) { ; }
|
||||
};
|
||||
|
||||
class STObject : public SerializedType
|
||||
class STObject : public SerializedType, private IS_INSTANCE(SerializedObject)
|
||||
{
|
||||
protected:
|
||||
boost::ptr_vector<SerializedType> mData;
|
||||
@@ -175,7 +179,7 @@ namespace boost
|
||||
|
||||
|
||||
|
||||
class STArray : public SerializedType
|
||||
class STArray : public SerializedType, private IS_INSTANCE(SerializedArray)
|
||||
{
|
||||
public:
|
||||
typedef std::vector<STObject> vector;
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "Log.h"
|
||||
#include "HashPrefixes.h"
|
||||
|
||||
DECLARE_INSTANCE(SerializedTransaction);
|
||||
|
||||
SerializedTransaction::SerializedTransaction(TransactionType type) : STObject(sfTransaction), mType(type)
|
||||
{
|
||||
mFormat = TransactionFormat::getTxnFormat(type);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "SerializedObject.h"
|
||||
#include "TransactionFormats.h"
|
||||
#include "RippleAddress.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
#define TXN_SQL_NEW 'N'
|
||||
#define TXN_SQL_CONFLICT 'C'
|
||||
@@ -17,7 +18,9 @@
|
||||
#define TXN_SQL_INCLUDED 'I'
|
||||
#define TXN_SQL_UNKNOWN 'U'
|
||||
|
||||
class SerializedTransaction : public STObject
|
||||
DEFINE_INSTANCE(SerializedTransaction);
|
||||
|
||||
class SerializedTransaction : public STObject, private IS_INSTANCE(SerializedTransaction)
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<SerializedTransaction> pointer;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "TransactionErr.h"
|
||||
|
||||
SETUP_LOG();
|
||||
DECLARE_INSTANCE(SerializedEntry);
|
||||
|
||||
STAmount saZero(CURRENCY_ONE, ACCOUNT_ONE, 0);
|
||||
STAmount saOne(CURRENCY_ONE, ACCOUNT_ONE, 1);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "uint256.h"
|
||||
#include "Serializer.h"
|
||||
#include "FieldNames.h"
|
||||
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
enum PathFlags
|
||||
{
|
||||
@@ -30,7 +30,9 @@ enum PathFlags
|
||||
#define ACCOUNT_XNS uint160(0)
|
||||
#define ACCOUNT_ONE uint160(1) // Used as a place holder
|
||||
|
||||
class SerializedType
|
||||
DEFINE_INSTANCE(SerializedEntry);
|
||||
|
||||
class SerializedType : private IS_INSTANCE(SerializedEntry)
|
||||
{
|
||||
protected:
|
||||
SField::ptr fName;
|
||||
|
||||
Reference in New Issue
Block a user