A leaf node for a transaction and its associated metadata.  
 More...
#include <SHAMapTxPlusMetaLeafNode.h>
A leaf node for a transaction and its associated metadata. 
Definition at line 32 of file SHAMapTxPlusMetaLeafNode.h.
 
◆ CountType
◆ FieldType
◆ SHAMapTxPlusMetaLeafNode() [1/2]
      
        
          | ripple::SHAMapTxPlusMetaLeafNode::SHAMapTxPlusMetaLeafNode  | 
          ( | 
          boost::intrusive_ptr< SHAMapItem const >  | 
          item,  | 
        
        
           | 
           | 
          std::uint32_t  | 
          cowid  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ SHAMapTxPlusMetaLeafNode() [2/2]
◆ clone()
◆ getType()
◆ updateHash()
  
  
      
        
          | void ripple::SHAMapTxPlusMetaLeafNode::updateHash  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
finaloverridevirtual   | 
  
 
 
◆ serializeForWire()
  
  
      
        
          | void ripple::SHAMapTxPlusMetaLeafNode::serializeForWire  | 
          ( | 
          Serializer &  | 
           | ) | 
           const | 
         
       
   | 
  
finaloverridevirtual   | 
  
 
 
◆ serializeWithPrefix()
  
  
      
        
          | void ripple::SHAMapTxPlusMetaLeafNode::serializeWithPrefix  | 
          ( | 
          Serializer &  | 
           | ) | 
           const | 
         
       
   | 
  
finaloverridevirtual   | 
  
 
 
◆ isLeaf()
  
  
      
        
          | bool ripple::SHAMapLeafNode::isLeaf  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
finaloverridevirtualinherited   | 
  
 
 
◆ isInner()
  
  
      
        
          | bool ripple::SHAMapLeafNode::isInner  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
finaloverridevirtualinherited   | 
  
 
 
◆ invariants()
  
  
      
        
          | void ripple::SHAMapLeafNode::invariants  | 
          ( | 
          bool  | 
          is_root = false | ) | 
           const | 
         
       
   | 
  
finaloverridevirtualinherited   | 
  
 
 
◆ peekItem()
  
  
      
        
          | boost::intrusive_ptr< SHAMapItem const > const  & ripple::SHAMapLeafNode::peekItem  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
 
◆ setItem()
  
  
      
        
          | bool ripple::SHAMapLeafNode::setItem  | 
          ( | 
          boost::intrusive_ptr< SHAMapItem const >  | 
          i | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
Set the item that this node points to and update the node's hash. 
- Parameters
 - 
  
  
 
- Returns
 - false if the change was, effectively, a noop (that is, if the hash was unchanged); true otherwise. 
 
Definition at line 55 of file SHAMapLeafNode.cpp.
 
 
◆ getString()
  
  | 
      
   | 
  
finaloverridevirtualinherited   | 
  
 
 
◆ partialDestructor()
  
  
      
        
          | virtual void ripple::SHAMapTreeNode::partialDestructor  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtualinherited   | 
  
 
 
◆ getHash()
  
  
      
        
          | SHAMapHash const  & ripple::SHAMapTreeNode::getHash  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
 
◆ makeFromPrefix()
◆ makeFromWire()
◆ makeTransaction()
◆ makeAccountState()
◆ makeTransactionWithMeta()
◆ addStrongRef()
  
  
      
        
          | void ripple::IntrusiveRefCounts::addStrongRef  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexceptinherited   | 
  
 
 
◆ addWeakRef()
  
  
      
        
          | void ripple::IntrusiveRefCounts::addWeakRef  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexceptinherited   | 
  
 
 
◆ releaseStrongRef()
◆ addWeakReleaseStrongRef()
◆ releaseWeakRef()
◆ checkoutStrongRefFromWeak()
  
  
      
        
          | bool ripple::IntrusiveRefCounts::checkoutStrongRefFromWeak  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexceptinherited   | 
  
 
 
◆ expired()
  
  
      
        
          | bool ripple::IntrusiveRefCounts::expired  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexceptinherited   | 
  
 
 
◆ use_count()
  
  
      
        
          | std::size_t ripple::IntrusiveRefCounts::use_count  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexceptinherited   | 
  
 
 
◆ getCounter()
  
  | 
      
   | 
  
staticprivatenoexceptinherited   | 
  
 
 
◆ item_
  
  
      
        
          | boost::intrusive_ptr<SHAMapItem const> ripple::SHAMapLeafNode::item_ | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ hash_
◆ cowid_
Determines the owning SHAMap, if any. 
Used for copy-on-write semantics.
If this value is 0, the node is not dirty and does not need to be flushed. It is eligible for sharing and may be included multiple SHAMap instances. 
Definition at line 61 of file SHAMapTreeNode.h.
 
 
◆ StrongCountNumBits
  
  
      
        
          | constexpr size_t ripple::IntrusiveRefCounts::StrongCountNumBits = sizeof(CountType) * 8 | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
 
◆ WeakCountNumBits
  
  | 
      
   | 
  
staticconstexprprivateinherited   | 
  
 
 
◆ FieldTypeBits
  
  
      
        
          | constexpr size_t ripple::IntrusiveRefCounts::FieldTypeBits = sizeof(FieldType) * 8 | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
 
◆ one
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::one = 1 | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
 
◆ refCounts
refCounts consists of four fields that are treated atomically: 
- Strong count. This is a count of the number of shared pointers that hold a reference to this object. When the strong counts goes to zero, if the weak count is zero, the destructor is run. If the weak count is non-zero when the strong count goes to zero then the partialDestructor is run.
 
- Weak count. This is a count of the number of weak pointer that hold a reference to this object. When the weak count goes to zero and the strong count is also zero, then the destructor is run.
 
- Partial destroy started bit. This bit is set if the 
partialDestructor function has been started (or is about to be started). This is used to prevent the destructor from running concurrently with the partial destructor. This can easily happen when the last strong pointer release its reference in one thread and starts the partialDestructor, while in another thread the last weak pointer goes out of scope and starts the destructor while the partialDestructor is still running. Both a start and finished bit is needed to handle a corner-case where the last strong pointer goes out of scope, then then last weakPointer goes out of scope, but this happens before the partialDestructor bit is set. It would be possible to use a single bit if it could also be set atomically when the strong count goes to zero and the weak count is non-zero, but that would add complexity (and likely slow down common cases as well). 
- Partial destroy finished bit. This bit is set when the 
partialDestructor has finished running. See (3) above for more information.  
Definition at line 160 of file IntrusiveRefCounts.h.
 
 
◆ strongDelta
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::strongDelta = 1 | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Amount to change the strong count when adding or releasing a reference. 
Note: The strong count is stored in the low StrongCountNumBits bits of refCounts 
Definition at line 167 of file IntrusiveRefCounts.h.
 
 
◆ weakDelta
  
  | 
      
   | 
  
staticconstexprprivateinherited   | 
  
 
Amount to change the weak count when adding or releasing a reference. 
Note: The weak count is stored in the high WeakCountNumBits bits of refCounts 
Definition at line 174 of file IntrusiveRefCounts.h.
 
 
◆ partialDestroyStartedMask
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::partialDestroyStartedMask | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Initial value:=
static constexpr size_t FieldTypeBits
 
static constexpr FieldType one
 
 
Flag that is set when the partialDestroy function has started running (or is about to start running). 
See description of the refCounts field for a fuller description of this field. 
Definition at line 182 of file IntrusiveRefCounts.h.
 
 
◆ partialDestroyFinishedMask
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::partialDestroyFinishedMask | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Initial value:
Flag that is set when the partialDestroy function has finished running. 
See description of the refCounts field for a fuller description of this field. 
Definition at line 190 of file IntrusiveRefCounts.h.
 
 
◆ tagMask
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::tagMask | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Initial value:=
static constexpr FieldType partialDestroyFinishedMask
Flag that is set when the partialDestroy function has finished running.
 
static constexpr FieldType partialDestroyStartedMask
Flag that is set when the partialDestroy function has started running (or is about to start running).
 
 
Mask that will zero out all the count bits and leave the tag bits unchanged. 
Definition at line 196 of file IntrusiveRefCounts.h.
 
 
◆ valueMask
  
  | 
      
   | 
  
staticconstexprprivateinherited   | 
  
 
Mask that will zero out the tag bits and leave the count bits unchanged. 
Definition at line 202 of file IntrusiveRefCounts.h.
 
 
◆ strongMask
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::strongMask | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Initial value:=
static constexpr size_t StrongCountNumBits
 
static constexpr FieldType valueMask
Mask that will zero out the tag bits and leave the count bits unchanged.
 
 
Mask that will zero out everything except the strong count. 
Definition at line 206 of file IntrusiveRefCounts.h.
 
 
◆ weakMask
  
  
      
        
          | constexpr FieldType ripple::IntrusiveRefCounts::weakMask | 
         
       
   | 
  
staticconstexprprivateinherited   | 
  
 
Initial value:=
static constexpr size_t WeakCountNumBits
 
 
Mask that will zero out everything except the weak count. 
Definition at line 211 of file IntrusiveRefCounts.h.