class
ManagedProtoBuffer
<
Value
,
Element
>
Inheritance |
NonObjectiveCBase
View Protocol Hierarchy →
|
---|---|
Import |
|
Instance Variables
The actual number of elements that can be stored in this object.
This value may be nontrivial to compute; it is usually a good idea to store this information in the "value" area when an instance is created.
Declaration
var
allocatedElementCount
:
Int
{
get
}
Instance Methods
Call body
with an UnsafeMutablePointer
to the Element
storage. Note: this pointer is only valid
for the duration of the call to body
.
Declaration
final
func
withUnsafeMutablePointerToElements
<
R
>
(
body
: (
UnsafeMutablePointer
<
Element
>
) -
>
R
) -
>
R
Call body
with an UnsafeMutablePointer
to the stored
Value
. Note: this pointer is only valid
for the duration of the call to body
.
Declaration
final
func
withUnsafeMutablePointerToValue
<
R
>
(
body
: (
UnsafeMutablePointer
<
Value
>
) -
>
R
) -
>
R
Call body
with UnsafeMutablePointer
s to the stored Value
and raw Element
storage. Note: these pointers are only valid
for the duration of the call to body
.
Declaration
final
func
withUnsafeMutablePointers
<
R
>
(
body
: (
UnsafeMutablePointer
<
Value
>
,
UnsafeMutablePointer
<
Element
>
) -
>
R
) -
>
R
A base class of
ManagedBuffer<Value,Element>
, used during instance creation.During instance creation, in particular during
ManagedBuffer.create
's call to initialize,ManagedBuffer
'svalue
property is as-yet uninitialized, and thereforeManagedProtoBuffer
does not offer access to the as-yet uninitializedvalue
property ofManagedBuffer
.