[#TxGraph-Ref] = xref:TxGraph.adoc[TxGraph]::Ref :relfileprefix: ../ :mrdocs: Data type used to reference transactions within a TxGraph. == Synopsis Declared in `<txgraph.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Ref; ---- == Description Every transaction within a TxGraph has exactly one corresponding TxGraph::Ref, held by users of the class. Destroying the TxGraph::Ref removes the corresponding transaction (in both the main and staging graphs). Users of the class can inherit from TxGraph::Ref. If all Refs are inherited this way, the Ref* pointers returned by TxGraph functions can be cast to, and used as, this inherited type. == Member Functions [cols="1,4"] |=== | Name| Description | xref:TxGraph/Ref/2constructor-0a.adoc[`Ref`] [.small]#[constructor]# | Constructors | xref:TxGraph/Ref/2destructor.adoc[`~Ref`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this Ref. If it is not empty, the corresponding transaction is removed (in both main and staging, if it exists). | xref:TxGraph/Ref/operator_assign-01.adoc[`operator=`] | Assignment operators |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:TxGraph.adoc[TxGraph]` | Data structure to encapsulate fees, sizes, and dependencies for a set of transactions. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:CTxMemPoolEntry.adoc[`CTxMemPoolEntry`] | CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in‐mempool transactions that depend on the transaction ("descendant" transactions). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#