rippled
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
ripple::TypedField< T > Struct Template Reference

A field with a type known at compile time. More...

Inheritance diagram for ripple::TypedField< T >:
Inheritance graph
[legend]
Collaboration diagram for ripple::TypedField< T >:
Collaboration graph
[legend]

Public Types

using type = T
 
enum  {
  sMD_Never = 0x00, sMD_ChangeOrig = 0x01, sMD_ChangeNew = 0x02, sMD_DeleteFinal = 0x04,
  sMD_Create = 0x08, sMD_Always = 0x10, sMD_Default
}
 
enum  IsSigning : unsigned char { IsSigning::no, IsSigning::yes }
 

Public Member Functions

template<class... Args>
 TypedField (Args &&... args)
 
 TypedField (TypedField &&u)
 
std::string const & getName () const
 
bool hasName () const
 
Json::StaticString const & getJsonName () const
 
bool isInvalid () const
 
bool isUseful () const
 
bool isBinary () const
 
bool isDiscardable () const
 
int getCode () const
 
int getNum () const
 
bool shouldMeta (int c) const
 
bool shouldInclude (bool withSigningField) const
 
bool operator== (const SField &f) const
 
bool operator!= (const SField &f) const
 

Static Public Member Functions

static const SFieldgetField (int fieldCode)
 
static const SFieldgetField (std::string const &fieldName)
 
static const SFieldgetField (int type, int value)
 
static const SFieldgetField (SerializedTypeID type, int value)
 
static int getNumFields ()
 
static int compare (const SField &f1, const SField &f2)
 

Public Attributes

const int fieldCode
 
const SerializedTypeID fieldType
 
const int fieldValue
 
const std::string fieldName
 
const int fieldMeta
 
const int fieldNum
 
const IsSigning signingField
 
const Json::StaticString jsonName
 

Static Public Attributes

static const IsSigning notSigning = IsSigning::no
 

Static Private Attributes

static int num = 0
 
static std::map< int, SField const * > knownCodeToField
 

Detailed Description

template<class T>
struct ripple::TypedField< T >

A field with a type known at compile time.

Definition at line 271 of file SField.h.

Member Typedef Documentation

◆ type

template<class T >
using ripple::TypedField< T >::type = T

Definition at line 273 of file SField.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
Enumerator
sMD_Never 
sMD_ChangeOrig 
sMD_ChangeNew 
sMD_DeleteFinal 
sMD_Create 
sMD_Always 
sMD_Default 

Definition at line 115 of file SField.h.

◆ IsSigning

enum ripple::SField::IsSigning : unsigned char
stronginherited
Enumerator
no 
yes 

Definition at line 126 of file SField.h.

Constructor & Destructor Documentation

◆ TypedField() [1/2]

template<class T >
template<class... Args>
ripple::TypedField< T >::TypedField ( Args &&...  args)
explicit

Definition at line 276 of file SField.h.

◆ TypedField() [2/2]

template<class T >
ripple::TypedField< T >::TypedField ( TypedField< T > &&  u)

Definition at line 280 of file SField.h.

Member Function Documentation

◆ getField() [1/4]

SField const & ripple::SField::getField ( int  fieldCode)
staticinherited

Definition at line 387 of file SField.cpp.

◆ getField() [2/4]

SField const & ripple::SField::getField ( std::string const &  fieldName)
staticinherited

Definition at line 415 of file SField.cpp.

◆ getField() [3/4]

static const SField& ripple::SField::getField ( int  type,
int  value 
)
staticinherited

Definition at line 163 of file SField.h.

◆ getField() [4/4]

static const SField& ripple::SField::getField ( SerializedTypeID  type,
int  value 
)
staticinherited

Definition at line 169 of file SField.h.

◆ getName()

std::string const& ripple::SField::getName ( ) const
inherited

Definition at line 175 of file SField.h.

◆ hasName()

bool ripple::SField::hasName ( ) const
inherited

Definition at line 181 of file SField.h.

◆ getJsonName()

Json::StaticString const& ripple::SField::getJsonName ( ) const
inherited

Definition at line 187 of file SField.h.

◆ isInvalid()

bool ripple::SField::isInvalid ( ) const
inherited

Definition at line 193 of file SField.h.

◆ isUseful()

bool ripple::SField::isUseful ( ) const
inherited

Definition at line 199 of file SField.h.

◆ isBinary()

bool ripple::SField::isBinary ( ) const
inherited

Definition at line 205 of file SField.h.

◆ isDiscardable()

bool ripple::SField::isDiscardable ( ) const
inherited

Definition at line 215 of file SField.h.

◆ getCode()

int ripple::SField::getCode ( ) const
inherited

Definition at line 221 of file SField.h.

◆ getNum()

int ripple::SField::getNum ( ) const
inherited

Definition at line 226 of file SField.h.

◆ getNumFields()

static int ripple::SField::getNumFields ( )
staticinherited

Definition at line 231 of file SField.h.

◆ shouldMeta()

bool ripple::SField::shouldMeta ( int  c) const
inherited

Definition at line 237 of file SField.h.

◆ shouldInclude()

bool ripple::SField::shouldInclude ( bool  withSigningField) const
inherited

Definition at line 243 of file SField.h.

◆ operator==()

bool ripple::SField::operator== ( const SField f) const
inherited

Definition at line 250 of file SField.h.

◆ operator!=()

bool ripple::SField::operator!= ( const SField f) const
inherited

Definition at line 256 of file SField.h.

◆ compare()

int ripple::SField::compare ( const SField f1,
const SField f2 
)
staticinherited

Definition at line 399 of file SField.cpp.

Member Data Documentation

◆ notSigning

const SField::IsSigning ripple::SField::notSigning = IsSigning::no
staticinherited

Definition at line 127 of file SField.h.

◆ fieldCode

const int ripple::SField::fieldCode
inherited

Definition at line 129 of file SField.h.

◆ fieldType

const SerializedTypeID ripple::SField::fieldType
inherited

Definition at line 130 of file SField.h.

◆ fieldValue

const int ripple::SField::fieldValue
inherited

Definition at line 131 of file SField.h.

◆ fieldName

const std::string ripple::SField::fieldName
inherited

Definition at line 132 of file SField.h.

◆ fieldMeta

const int ripple::SField::fieldMeta
inherited

Definition at line 133 of file SField.h.

◆ fieldNum

const int ripple::SField::fieldNum
inherited

Definition at line 134 of file SField.h.

◆ signingField

const IsSigning ripple::SField::signingField
inherited

Definition at line 135 of file SField.h.

◆ jsonName

const Json::StaticString ripple::SField::jsonName
inherited

Definition at line 136 of file SField.h.

◆ num

int ripple::SField::num = 0
staticprivateinherited

Definition at line 265 of file SField.h.

◆ knownCodeToField

std::map< int, SField const * > ripple::SField::knownCodeToField
staticprivateinherited

Definition at line 266 of file SField.h.