meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -1,85 +1,85 @@
#include <blue/core/iterator.h>
#include <fx/core/iterator.h>
/*** PRIVATE DATA *************************************************************/
struct b_iterator_p {
enum b_status it_status;
struct fx_iterator_p {
enum fx_status it_status;
};
/*** PRIVATE FUNCTIONS ********************************************************/
static enum b_status iterator_get_status(const struct b_iterator_p *it)
static enum fx_status iterator_get_status(const struct fx_iterator_p *it)
{
return it->it_status;
}
static enum b_status iterator_set_status(struct b_iterator_p *it, b_status status)
static enum fx_status iterator_set_status(struct fx_iterator_p *it, fx_status status)
{
it->it_status = status;
return B_SUCCESS;
return FX_SUCCESS;
}
/*** PUBLIC FUNCTIONS *********************************************************/
b_iterator *b_iterator_begin(b_iterable *it)
fx_iterator *fx_iterator_begin(fx_iterable *it)
{
B_CLASS_DISPATCH_VIRTUAL_0(b_iterable, B_TYPE_ITERABLE, NULL, it_begin, it);
FX_CLASS_DISPATCH_VIRTUAL_0(fx_iterable, FX_TYPE_ITERABLE, NULL, it_begin, it);
}
const b_iterator *b_iterator_cbegin(const b_iterable *it)
const fx_iterator *fx_iterator_cbegin(const fx_iterable *it)
{
B_CLASS_DISPATCH_VIRTUAL_0(b_iterable, B_TYPE_ITERABLE, NULL, it_cbegin, it);
FX_CLASS_DISPATCH_VIRTUAL_0(fx_iterable, FX_TYPE_ITERABLE, NULL, it_cbegin, it);
}
enum b_status b_iterator_get_status(const b_iterator *it)
enum fx_status fx_iterator_get_status(const fx_iterator *it)
{
B_CLASS_DISPATCH_STATIC_0(B_TYPE_ITERATOR, iterator_get_status, it);
FX_CLASS_DISPATCH_STATIC_0(FX_TYPE_ITERATOR, iterator_get_status, it);
}
enum b_status b_iterator_set_status(const b_iterator *it, b_status status)
enum fx_status fx_iterator_set_status(const fx_iterator *it, fx_status status)
{
B_CLASS_DISPATCH_STATIC(B_TYPE_ITERATOR, iterator_set_status, it, status);
FX_CLASS_DISPATCH_STATIC(FX_TYPE_ITERATOR, iterator_set_status, it, status);
}
enum b_status b_iterator_move_next(const b_iterator *it)
enum fx_status fx_iterator_move_next(const fx_iterator *it)
{
enum b_status status = B_ERR_NOT_SUPPORTED;
enum fx_status status = FX_ERR_NOT_SUPPORTED;
b_iterator_class *iface = b_object_get_interface(it, B_TYPE_ITERATOR);
fx_iterator_class *iface = fx_object_get_interface(it, FX_TYPE_ITERATOR);
if (iface && iface->it_move_next) {
status = iface->it_move_next(it);
}
struct b_iterator_p *p = b_object_get_private(it, B_TYPE_ITERATOR);
struct fx_iterator_p *p = fx_object_get_private(it, FX_TYPE_ITERATOR);
p->it_status = status;
return status;
}
b_iterator_value b_iterator_get_value(b_iterator *it)
fx_iterator_value fx_iterator_get_value(fx_iterator *it)
{
B_CLASS_DISPATCH_VIRTUAL_0(
b_iterator, B_TYPE_ITERATOR, B_ITERATOR_VALUE_NULL,
FX_CLASS_DISPATCH_VIRTUAL_0(
fx_iterator, FX_TYPE_ITERATOR, FX_ITERATOR_VALUE_NULL,
it_get_value, it);
}
const b_iterator_value b_iterator_get_cvalue(const b_iterator *it)
const fx_iterator_value fx_iterator_get_cvalue(const fx_iterator *it)
{
B_CLASS_DISPATCH_VIRTUAL_0(
b_iterator, B_TYPE_ITERATOR, B_ITERATOR_VALUE_NULL,
FX_CLASS_DISPATCH_VIRTUAL_0(
fx_iterator, FX_TYPE_ITERATOR, FX_ITERATOR_VALUE_NULL,
it_get_cvalue, it);
}
b_status b_iterator_erase(b_iterator *it)
fx_status fx_iterator_erase(fx_iterator *it)
{
enum b_status status = B_ERR_NOT_SUPPORTED;
enum fx_status status = FX_ERR_NOT_SUPPORTED;
b_iterator_class *iface = b_object_get_interface(it, B_TYPE_ITERATOR);
fx_iterator_class *iface = fx_object_get_interface(it, FX_TYPE_ITERATOR);
if (iface && iface->it_erase) {
status = iface->it_erase(it);
}
struct b_iterator_p *p = b_object_get_private(it, B_TYPE_ITERATOR);
struct fx_iterator_p *p = fx_object_get_private(it, FX_TYPE_ITERATOR);
p->it_status = status;
return status;
@@ -87,29 +87,29 @@ b_status b_iterator_erase(b_iterator *it)
/*** CLASS DEFINITION *********************************************************/
// ---- b_iterator DEFINITION
B_TYPE_CLASS_DEFINITION_BEGIN(b_iterator)
B_TYPE_CLASS_INTERFACE_BEGIN(b_object, B_TYPE_OBJECT)
B_INTERFACE_ENTRY(to_string) = NULL;
B_TYPE_CLASS_INTERFACE_END(b_object, B_TYPE_OBJECT)
B_TYPE_CLASS_DEFINITION_END(b_iterator)
// ---- fx_iterator DEFINITION
FX_TYPE_CLASS_DEFINITION_BEGIN(fx_iterator)
FX_TYPE_CLASS_INTERFACE_BEGIN(fx_object, FX_TYPE_OBJECT)
FX_INTERFACE_ENTRY(to_string) = NULL;
FX_TYPE_CLASS_INTERFACE_END(fx_object, FX_TYPE_OBJECT)
FX_TYPE_CLASS_DEFINITION_END(fx_iterator)
B_TYPE_DEFINITION_BEGIN(b_iterator)
B_TYPE_FLAGS(B_TYPE_F_ABSTRACT);
B_TYPE_ID(0xfd40b67f, 0x7087, 0x40a9, 0x8fd8, 0x8ae27bd58c9e);
B_TYPE_CLASS(b_iterator_class);
B_TYPE_INSTANCE_PRIVATE(struct b_iterator_p);
B_TYPE_DEFINITION_END(b_iterator)
FX_TYPE_DEFINITION_BEGIN(fx_iterator)
FX_TYPE_FLAGS(FX_TYPE_F_ABSTRACT);
FX_TYPE_ID(0xfd40b67f, 0x7087, 0x40a9, 0x8fd8, 0x8ae27bd58c9e);
FX_TYPE_CLASS(fx_iterator_class);
FX_TYPE_INSTANCE_PRIVATE(struct fx_iterator_p);
FX_TYPE_DEFINITION_END(fx_iterator)
// ---- b_iterable DEFINITION
B_TYPE_CLASS_DEFINITION_BEGIN(b_iterable)
B_TYPE_CLASS_INTERFACE_BEGIN(b_object, B_TYPE_OBJECT)
B_INTERFACE_ENTRY(to_string) = NULL;
B_TYPE_CLASS_INTERFACE_END(b_object, B_TYPE_OBJECT)
B_TYPE_CLASS_DEFINITION_END(b_iterable)
// ---- fx_iterable DEFINITION
FX_TYPE_CLASS_DEFINITION_BEGIN(fx_iterable)
FX_TYPE_CLASS_INTERFACE_BEGIN(fx_object, FX_TYPE_OBJECT)
FX_INTERFACE_ENTRY(to_string) = NULL;
FX_TYPE_CLASS_INTERFACE_END(fx_object, FX_TYPE_OBJECT)
FX_TYPE_CLASS_DEFINITION_END(fx_iterable)
B_TYPE_DEFINITION_BEGIN(b_iterable)
B_TYPE_FLAGS(B_TYPE_F_ABSTRACT);
B_TYPE_ID(0x4bbabf2d, 0xfc5d, 0x40cc, 0x89fc, 0x164085e47f73);
B_TYPE_CLASS(b_iterable_class);
B_TYPE_DEFINITION_END(b_iterable)
FX_TYPE_DEFINITION_BEGIN(fx_iterable)
FX_TYPE_FLAGS(FX_TYPE_F_ABSTRACT);
FX_TYPE_ID(0x4bbabf2d, 0xfc5d, 0x40cc, 0x89fc, 0x164085e47f73);
FX_TYPE_CLASS(fx_iterable_class);
FX_TYPE_DEFINITION_END(fx_iterable)