mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix getJson for STUInt8, 16, 32, 64.
This commit is contained in:
@@ -64,6 +64,11 @@ std::string STUInt8::getText() const
|
|||||||
return boost::lexical_cast<std::string>(value);
|
return boost::lexical_cast<std::string>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Json::Value STUInt8::getJson(int) const
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
bool STUInt8::isEquivalent(const SerializedType& t) const
|
bool STUInt8::isEquivalent(const SerializedType& t) const
|
||||||
{
|
{
|
||||||
const STUInt8* v = dynamic_cast<const STUInt8*>(&t);
|
const STUInt8* v = dynamic_cast<const STUInt8*>(&t);
|
||||||
@@ -92,6 +97,11 @@ std::string STUInt16::getText() const
|
|||||||
return boost::lexical_cast<std::string>(value);
|
return boost::lexical_cast<std::string>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Json::Value STUInt16::getJson(int) const
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
bool STUInt16::isEquivalent(const SerializedType& t) const
|
bool STUInt16::isEquivalent(const SerializedType& t) const
|
||||||
{
|
{
|
||||||
const STUInt16* v = dynamic_cast<const STUInt16*>(&t);
|
const STUInt16* v = dynamic_cast<const STUInt16*>(&t);
|
||||||
@@ -108,6 +118,11 @@ std::string STUInt32::getText() const
|
|||||||
return boost::lexical_cast<std::string>(value);
|
return boost::lexical_cast<std::string>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Json::Value STUInt32::getJson(int) const
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
bool STUInt32::isEquivalent(const SerializedType& t) const
|
bool STUInt32::isEquivalent(const SerializedType& t) const
|
||||||
{
|
{
|
||||||
const STUInt32* v = dynamic_cast<const STUInt32*>(&t);
|
const STUInt32* v = dynamic_cast<const STUInt32*>(&t);
|
||||||
@@ -124,6 +139,11 @@ std::string STUInt64::getText() const
|
|||||||
return boost::lexical_cast<std::string>(value);
|
return boost::lexical_cast<std::string>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Json::Value STUInt64::getJson(int) const
|
||||||
|
{
|
||||||
|
return strHex(value);
|
||||||
|
}
|
||||||
|
|
||||||
bool STUInt64::isEquivalent(const SerializedType& t) const
|
bool STUInt64::isEquivalent(const SerializedType& t) const
|
||||||
{
|
{
|
||||||
const STUInt64* v = dynamic_cast<const STUInt64*>(&t);
|
const STUInt64* v = dynamic_cast<const STUInt64*>(&t);
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public:
|
|||||||
|
|
||||||
SerializedTypeID getSType() const { return STI_UINT8; }
|
SerializedTypeID getSType() const { return STI_UINT8; }
|
||||||
std::string getText() const;
|
std::string getText() const;
|
||||||
|
Json::Value getJson(int) const;
|
||||||
void add(Serializer& s) const { s.add8(value); }
|
void add(Serializer& s) const { s.add8(value); }
|
||||||
|
|
||||||
unsigned char getValue() const { return value; }
|
unsigned char getValue() const { return value; }
|
||||||
@@ -123,6 +124,7 @@ public:
|
|||||||
|
|
||||||
SerializedTypeID getSType() const { return STI_UINT16; }
|
SerializedTypeID getSType() const { return STI_UINT16; }
|
||||||
std::string getText() const;
|
std::string getText() const;
|
||||||
|
Json::Value getJson(int) const;
|
||||||
void add(Serializer& s) const { s.add16(value); }
|
void add(Serializer& s) const { s.add16(value); }
|
||||||
|
|
||||||
uint16 getValue() const { return value; }
|
uint16 getValue() const { return value; }
|
||||||
@@ -149,6 +151,7 @@ public:
|
|||||||
|
|
||||||
SerializedTypeID getSType() const { return STI_UINT32; }
|
SerializedTypeID getSType() const { return STI_UINT32; }
|
||||||
std::string getText() const;
|
std::string getText() const;
|
||||||
|
Json::Value getJson(int) const;
|
||||||
void add(Serializer& s) const { s.add32(value); }
|
void add(Serializer& s) const { s.add32(value); }
|
||||||
|
|
||||||
uint32 getValue() const { return value; }
|
uint32 getValue() const { return value; }
|
||||||
@@ -175,6 +178,7 @@ public:
|
|||||||
|
|
||||||
SerializedTypeID getSType() const { return STI_UINT64; }
|
SerializedTypeID getSType() const { return STI_UINT64; }
|
||||||
std::string getText() const;
|
std::string getText() const;
|
||||||
|
Json::Value getJson(int) const;
|
||||||
void add(Serializer& s) const { s.add64(value); }
|
void add(Serializer& s) const { s.add64(value); }
|
||||||
|
|
||||||
uint64 getValue() const { return value; }
|
uint64 getValue() const { return value; }
|
||||||
|
|||||||
Reference in New Issue
Block a user