dksdk_ffi_c/cls_capnp_segment_factory.h¶
Defines
-
DK_IIDSTR_CAPN_SEGMENT_FACTORY¶
The interface identifier for the singleton Cap 'n Proto Segment Factory
dk_cls_capnp_segment_factory
.The Cap 'n Proto Segment Factory is responsible for allocating Cap'n Proto segments that are managed by the host language (C).
Since the interface is for a singleton, when queried with dksdk_ffi_registry_get the interface identifier will give a
struct dksdk_ffi_i_com
. Use one of the interfaces in the next section to get additional fields and methods.
Typedefs
-
typedef int DKSDK_FFI_ALLOC_SEGMENT(struct dksdk_ffi *ffi, struct dk_cls_capnp_segment **ppObject, size_t size)¶
Allocates a new zero-filled, aligned Cap 'n Proto message segment of at least
size
bytes.There should only be one owner of the message segment. It is the responsibility of the owner to release the segment.
- Param ffi:
[in] The FFI pointer from dksdk_ffi_host_create
- Param ppObject:
[inout] The address of the pointer to an object initialized with zero bytes. On success the object will be populated. The object must be released when the caller is finished with it. On failure the de-referenced address *ppObject will be NULL.
- Param size:
[in] The minimum number of bytes to allocate. Must be at least one byte or greater. More bytes may be allocated to pad to the machine's word alignment or page size.
- Return:
DKSDK_FFI_OK on success, and DKSDK_FFI_ERR_INVALID_STATE when there is no memory.
Variables
-
DKSDK_FFI_C_EXPORT const dksdk_ffi_uuid DK_IID_CAPN_SEGMENT_FACTORY¶
-
struct dk_cls_capnp_segment_factory_vtable¶
- #include <cls_capnp_segment_factory.h>
Virtual methods for the Cap 'n Proto Segment Factory class.
Public Members
-
dksdk_ffi_i_com_vtable com_vtable¶
The C++ style virtual table containing the Cap 'n Proto Segment Factory methods.
-
DKSDK_FFI_ALLOC_SEGMENT *fpAllocSegment¶
Allocate a new Cap n' Proto message segment.
-
dksdk_ffi_i_com_vtable com_vtable¶
-
struct dk_cls_capnp_segment_factory¶
- #include <cls_capnp_segment_factory.h>
The Cap 'n Proto Segment Factory is responsible for allocating Cap'n Proto segments that are managed by the C host language.
Its methods are dk_cls_capnp_segment_factory_vtable.
Public Members
-
struct dksdk_ffi_i_com com¶
The always-valid DkSDK FFI COM superclass.
Use this superclass to access private fields of the DkSDK FFI COM superclass.
-
dk_cls_capnp_segment_factory_vtable *vtable_capnp_segment_factory¶
The always-valid virtual table for the Cap 'n Proto Segment Factory class.
Use this virtual table to access virtual methods.
- union dk_cls_capnp_segment_factory
The DkSDK FFI COM object superclass, with the virtual method table extended to conform to dk_cls_capnp_segment_factory_vtable.
-
struct dksdk_ffi_i_com com¶