[#btck-Handle-046]
= xref:btck.adoc[btck]::Handle
:relfileprefix: ../
:mrdocs:

Owning RAII handle for a copyable C object of type `CType&period;`

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&lowbar;wrapper&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename CType,
    CType*(* CopyFunc)(CType const*),
    void(* DestroyFunc)(CType*)&gt;
class Handle;
----

== Description

Uses `CopyFunc` for copies and `DestroyFunc` for destruction, giving value semantics over the underlying C handle&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:btck/Handle-046/2constructor-06.adoc[`Handle`]         [.small]#[constructor]#
| Constructors
| xref:btck/Handle-046/2destructor.adoc[`&#126;Handle`] [.small]#[destructor]#
| Destroys the owned C object&period;
| xref:btck/Handle-046/operator_assign-08.adoc[`operator&equals;`] 
| Assignment operators
| xref:btck/Handle-046/get-08.adoc[`get`] 
| Returns the owned C handle&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:btck/Handle-046/m_ptr.adoc[`m&lowbar;ptr`] 
| The owned C handle&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:btck/Block.adoc[`Block`] 
| Owning wrapper over a `btck&lowbar;Block`, a full block with its transactions&period;
| xref:btck/BlockHash.adoc[`BlockHash`] 
| Owning wrapper over a `btck&lowbar;BlockHash`&period;
| xref:btck/BlockHeader.adoc[`BlockHeader`] 
| Owning wrapper over a `btck&lowbar;BlockHeader`&period;
| xref:btck/BlockSpentOutputs.adoc[`BlockSpentOutputs`] 
| Owning wrapper over a `btck&lowbar;BlockSpentOutputs`, the undo data of a whole block&period;
| xref:btck/BlockValidationState.adoc[`BlockValidationState`] 
| Owning wrapper over a `btck&lowbar;BlockValidationState`, holding a block&apos;s validation outcome&period;
| xref:btck/ChainParams.adoc[`ChainParams`] 
| Owning wrapper over `btck&lowbar;ChainParameters`, the consensus parameters for a network&period;
| xref:btck/Coin.adoc[`Coin`] 
| Owning wrapper over a `btck&lowbar;Coin`&period;
| xref:btck/Context.adoc[`Context`] 
| Owning wrapper over a `btck&lowbar;Context`, the top&hyphen;level kernel execution context&period;
| xref:btck/OutPoint.adoc[`OutPoint`] 
| Owning wrapper over a `btck&lowbar;TransactionOutPoint`&period;
| xref:btck/PrecomputedTransactionData.adoc[`PrecomputedTransactionData`] 
| Owning wrapper over `btck&lowbar;PrecomputedTransactionData` used to cache signature hashes&period;
| xref:btck/ScriptPubkey.adoc[`ScriptPubkey`] 
| Owning wrapper over a `btck&lowbar;ScriptPubkey` output script&period;
| xref:btck/Transaction.adoc[`Transaction`] 
| Owning wrapper over a `btck&lowbar;Transaction`&period;
| xref:btck/TransactionInput.adoc[`TransactionInput`] 
| Owning wrapper over a `btck&lowbar;TransactionInput`&period;
| xref:btck/TransactionOutput.adoc[`TransactionOutput`] 
| Owning wrapper over a `btck&lowbar;TransactionOutput`&period;
| xref:btck/TransactionSpentOutputs.adoc[`TransactionSpentOutputs`] 
| Owning wrapper over a `btck&lowbar;TransactionSpentOutputs`, the coins spent by one transaction&period;
| xref:btck/Txid.adoc[`Txid`] 
| Owning wrapper over a `btck&lowbar;Txid` transaction identifier&period;
| xref:btck/WitnessStack.adoc[`WitnessStack`] 
| Owning wrapper over a `btck&lowbar;WitnessStack`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
