mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Get a field as a string.
This commit is contained in:
@@ -254,6 +254,13 @@ void STObject::makeFieldAbsent(SOE_Field field)
|
|||||||
clearFlag(mType[index]->e_flags);
|
clearFlag(mType[index]->e_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string STObject::getFieldString(SOE_Field field) const
|
||||||
|
{
|
||||||
|
const SerializedType* rf=peekAtPField(field);
|
||||||
|
if(!rf) throw std::runtime_error("Field not found");
|
||||||
|
return rf->getText();
|
||||||
|
}
|
||||||
|
|
||||||
unsigned char STObject::getValueFieldU8(SOE_Field field) const
|
unsigned char STObject::getValueFieldU8(SOE_Field field) const
|
||||||
{
|
{
|
||||||
const SerializedType* rf=peekAtPField(field);
|
const SerializedType* rf=peekAtPField(field);
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public:
|
|||||||
|
|
||||||
// these throw if the field type doesn't match, or return default values if the
|
// these throw if the field type doesn't match, or return default values if the
|
||||||
// field is optional but not present
|
// field is optional but not present
|
||||||
|
std::string getFieldString(SOE_Field field) const;
|
||||||
unsigned char getValueFieldU8(SOE_Field field) const;
|
unsigned char getValueFieldU8(SOE_Field field) const;
|
||||||
uint16 getValueFieldU16(SOE_Field field) const;
|
uint16 getValueFieldU16(SOE_Field field) const;
|
||||||
uint32 getValueFieldU32(SOE_Field field) const;
|
uint32 getValueFieldU32(SOE_Field field) const;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public:
|
|||||||
const std::vector<unsigned char>& peekSigningAccount() const;
|
const std::vector<unsigned char>& peekSigningAccount() const;
|
||||||
std::vector<unsigned char>& peekSigningAccount();
|
std::vector<unsigned char>& peekSigningAccount();
|
||||||
void setSigningAccount(const std::vector<unsigned char>& s);
|
void setSigningAccount(const std::vector<unsigned char>& s);
|
||||||
|
std::string getTransactionType() const { return mFormat->t_name; }
|
||||||
|
|
||||||
// inner transaction functions
|
// inner transaction functions
|
||||||
uint16 getFlags() const;
|
uint16 getFlags() const;
|
||||||
@@ -65,6 +66,7 @@ public:
|
|||||||
SerializedType& getITField(SOE_Field field);
|
SerializedType& getITField(SOE_Field field);
|
||||||
|
|
||||||
// inner transaction field value functions
|
// inner transaction field value functions
|
||||||
|
std::string getITFieldString(SOE_Field field) const { return mInnerTxn.getFieldString(field); }
|
||||||
unsigned char getITFieldU8(SOE_Field field) const { return mInnerTxn.getValueFieldU8(field); }
|
unsigned char getITFieldU8(SOE_Field field) const { return mInnerTxn.getValueFieldU8(field); }
|
||||||
uint16 getITFieldU16(SOE_Field field) const { return mInnerTxn.getValueFieldU16(field); }
|
uint16 getITFieldU16(SOE_Field field) const { return mInnerTxn.getValueFieldU16(field); }
|
||||||
uint32 getITFieldU32(SOE_Field field) const { return mInnerTxn.getValueFieldU32(field); }
|
uint32 getITFieldU32(SOE_Field field) const { return mInnerTxn.getValueFieldU32(field); }
|
||||||
|
|||||||
Reference in New Issue
Block a user