2024-10-25 02:04:11 -07:00
|
|
|
// This file was generated automatially by gencpp's unreal.cpp (See: https://github.com/Ed94/gencpp)
|
2024-10-21 19:39:40 -07:00
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma clang diagnostic push
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-const-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wswitch"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
|
|
|
# pragma clang diagnostic ignored "-Wvarargs"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-function"
|
2024-12-15 11:14:02 -08:00
|
|
|
# pragma clang diagnostic ignored "-Wbraced-scalar-init"
|
|
|
|
# pragma clang diagnostic ignored "-W#pragma-messages"
|
|
|
|
# pragma clang diagnostic ignored "-Wstatic-in-inline"
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma GCC diagnostic push
|
|
|
|
# pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
|
|
|
# pragma GCC diagnostic ignored "-Wcomment"
|
|
|
|
# pragma GCC diagnostic ignored "-Wswitch"
|
|
|
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
2024-10-25 02:04:11 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gen.hpp"
|
|
|
|
|
2024-10-21 19:39:40 -07:00
|
|
|
GEN_NS_BEGIN
|
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
#pragma region Builder
|
|
|
|
|
|
|
|
struct Builder;
|
|
|
|
typedef struct Builder Builder;
|
|
|
|
|
|
|
|
Builder builder_open ( char const* path );
|
|
|
|
void builder_pad_lines ( Builder* builder, s32 num );
|
|
|
|
void builder_print ( Builder* builder, Code code );
|
|
|
|
void builder_print_fmt_va( Builder* builder, char const* fmt, va_list va );
|
2024-12-15 15:22:59 -08:00
|
|
|
void builder_write ( Builder* builder );
|
|
|
|
|
|
|
|
FORCEINLINE void builder_print_fmt ( Builder* builder, char const* fmt, ... ) {
|
2024-12-15 11:14:02 -08:00
|
|
|
va_list va;
|
|
|
|
va_start( va, fmt );
|
|
|
|
builder_print_fmt_va( builder, fmt, va );
|
|
|
|
va_end( va );
|
|
|
|
}
|
|
|
|
|
2024-10-21 19:39:40 -07:00
|
|
|
struct Builder
|
|
|
|
{
|
|
|
|
FileInfo File;
|
2024-12-15 11:14:02 -08:00
|
|
|
StrBuilder Buffer;
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
#if GEN_COMPILER_CPP && ! GEN_C_LIKE_CPP
|
|
|
|
FORCEINLINE static Builder open( char const* path ) { return builder_open(path); }
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
FORCEINLINE void pad_lines( s32 num ) { return builder_pad_lines(this, num); }
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
FORCEINLINE void print( Code code ) { return builder_print(this, code); }
|
|
|
|
FORCEINLINE void print_fmt( char const* fmt, ... ) {
|
|
|
|
va_list va;
|
|
|
|
va_start( va, fmt );
|
|
|
|
builder_print_fmt_va( this, fmt, va );
|
|
|
|
va_end( va );
|
|
|
|
}
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
FORCEINLINE void write() { return builder_write(this); }
|
|
|
|
#endif
|
2024-10-21 19:39:40 -07:00
|
|
|
};
|
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
#if GEN_COMPILER_CPP && ! GEN_C_LIKE_CPP
|
2024-12-15 15:22:59 -08:00
|
|
|
FORCEINLINE void builder_pad_lines( Builder& builder, s32 num ) { return builder_pad_lines(& builder, num); }
|
|
|
|
FORCEINLINE void builder_print ( Builder& builder, Code code ) { return builder_print(& builder, code); }
|
|
|
|
FORCEINLINE void builder_write ( Builder& builder ) { return builder_write(& builder ); }
|
|
|
|
FORCEINLINE void builder_print_fmt( Builder& builder, char const* fmt, ...) {
|
2024-12-15 11:14:02 -08:00
|
|
|
va_list va;
|
|
|
|
va_start( va, fmt );
|
|
|
|
builder_print_fmt_va( & builder, fmt, va );
|
|
|
|
va_end( va );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#pragma endregion Builder
|
|
|
|
|
2024-10-21 19:39:40 -07:00
|
|
|
GEN_NS_END
|
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma clang diagnostic pop
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma GCC diagnostic pop
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|