CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
logsnapshot.h
1#pragma once
2// This header file is auto-generated!
3// Do not make changes to this file or they will be overwritten.
4// clang-format off
5#include <cx/obj.h>
6#include <cx/struct.h>
7#include <cx/format/formattable.h>
8
9CX_C_BEGIN
10
11typedef struct LogSnapshot LogSnapshot;
12typedef struct LogSnapshot_WeakRef LogSnapshot_WeakRef;
13saDeclarePtr(LogSnapshot);
14saDeclarePtr(LogSnapshot_WeakRef);
15#define _sti_LogSnapshot _sti_object
16#define SType_LogSnapshot LogSnapshot*
17#define STStorageType_LogSnapshot LogSnapshot*
18#define STypeArg_LogSnapshot(type, val) stgeneric(object, (ObjInst*)objInstCheckClass(LogSnapshot, val))
19#define STypeArgPtr_LogSnapshot(type, val) (stgeneric*)objInstCheckClassPtr(LogSnapshot, val)
20#define STypeCheckedArg_LogSnapshot(type, val) stType(type), stArg(type, val)
21#define STypeCheckedPtrArg_LogSnapshot(type, val) stType(type), stArgPtr(type, val)
22
23typedef struct LogSnapshot_ClassIf {
24 ObjIface* _implements;
25 ObjIface* _parent;
26 size_t _size;
27
28 bool (*format)(_In_ void* self, FMTVar* v, string* out);
29} LogSnapshot_ClassIf;
30extern LogSnapshot_ClassIf LogSnapshot_ClassIf_tmpl;
31
32typedef struct LogSnapshot {
33 union {
34 LogSnapshot_ClassIf* _;
35 void* _is_LogSnapshot;
36 void* _is_ObjInst;
37 };
38 ObjClassInfo* _clsinfo;
39 atomic(uintptr) _ref;
40 atomic(ptr) _weakref;
41
42 string text;
43} LogSnapshot;
44extern ObjClassInfo LogSnapshot_clsinfo;
45#define LogSnapshot(inst) objInstCheckClass(LogSnapshot, inst)
46#define LogSnapshotNone ((LogSnapshot*)NULL)
47
48typedef struct LogSnapshot_WeakRef {
49 union {
50 ObjInst* _inst;
51 void* _is_LogSnapshot_WeakRef;
52 void* _is_ObjInst_WeakRef;
53 };
54 atomic(uintptr) _ref;
55 RWLock _lock;
56} LogSnapshot_WeakRef;
57#define LogSnapshot_WeakRef(inst) objWeakRefCheckClass(LogSnapshot, inst)
58
59_objfactory_guaranteed LogSnapshot* LogSnapshot_create(string text);
60// LogSnapshot* logsnapshotCreate(string text);
61#define logsnapshotCreate(text) LogSnapshot_create(text)
62
63// bool logsnapshotFormat(LogSnapshot* self, FMTVar* v, string* out);
64#define logsnapshotFormat(self, v, out) (self)->_->format(LogSnapshot(self), v, out)
65
66CX_C_END
#define saDeclarePtr(name)
Definition sarray.h:100
#define _objfactory_guaranteed
Definition objimpl.h:106
CX Struct System - Introspectable, serializable POD structures in C.
CX Object System - Object-oriented programming in C.
Format variable descriptor for Formattable interface implementations.
Definition format.h:226