This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
LEFTONE/core/locommon/counter.h
falsycat 84c3a02b9a [RELEASE] u22-v03
This version is submitted to U22 breau.
2020-09-14 00:00:00 +00:00

39 lines
595 B
C

#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <msgpack.h>
typedef struct {
size_t next;
} locommon_counter_t;
void
locommon_counter_initialize(
locommon_counter_t* counter,
size_t first
);
void
locommon_counter_deinitialize(
locommon_counter_t* counter
);
size_t
locommon_counter_count(
locommon_counter_t* counter
);
void
locommon_counter_pack(
const locommon_counter_t* counter,
msgpack_packer* packer
);
bool
locommon_counter_unpack(
locommon_counter_t* counter,
const msgpack_object* obj /* NULLABLE */
);