2024-10-25 02:04:11 -07:00
|
|
|
// This file was generated automatially by gencpp's unreal.cpp (See: https://github.com/Ed94/gencpp)
|
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-12-14 05:46:22 -08: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"
|
|
|
|
# pragma clang diagnostic ignored "-Wbraced-scalar-init"
|
|
|
|
# pragma clang diagnostic ignored "-W#pragma-messages"
|
|
|
|
# pragma clang diagnostic ignored "-Wstatic-in-inline"
|
2024-10-25 02:04:11 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-12-14 05:46:22 -08: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-25 02:04:11 -07:00
|
|
|
#endif
|
2024-04-13 13:18:57 -07:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gen.hpp"
|
|
|
|
|
|
|
|
GEN_NS_BEGIN
|
|
|
|
|
2024-12-14 05:46:22 -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 );
|
|
|
|
void builder_print_fmt ( Builder* builder, char const* fmt, ... ) {
|
|
|
|
va_list va;
|
|
|
|
va_start( va, fmt );
|
|
|
|
builder_print_fmt_va( builder, fmt, va );
|
|
|
|
va_end( va );
|
|
|
|
}
|
|
|
|
void builder_write( Builder* builder );
|
|
|
|
|
2024-04-13 13:18:57 -07:00
|
|
|
struct Builder
|
|
|
|
{
|
|
|
|
FileInfo File;
|
2024-12-14 05:46:22 -08:00
|
|
|
StrBuilder Buffer;
|
2024-04-13 13:18:57 -07:00
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
#if GEN_COMPILER_CPP && ! GEN_C_LIKE_CPP
|
|
|
|
FORCEINLINE static Builder open( char const* path ) { return builder_open(path); }
|
2024-04-13 13:18:57 -07:00
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
FORCEINLINE void pad_lines( s32 num ) { return builder_pad_lines(this, num); }
|
2024-04-13 13:18:57 -07:00
|
|
|
|
2024-12-14 05:46:22 -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-04-13 13:18:57 -07:00
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
FORCEINLINE void write() { return builder_write(this); }
|
|
|
|
#endif
|
2024-04-13 13:18:57 -07:00
|
|
|
};
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
#if GEN_COMPILER_CPP && ! GEN_C_LIKE_CPP
|
|
|
|
void builder_pad_lines( Builder& builder, s32 num ) { return builder_pad_lines(& builder, num); }
|
|
|
|
void builder_print ( Builder& builder, Code code ) { return builder_print(& builder, code); }
|
|
|
|
void builder_write ( Builder& builder ) { return builder_write(& builder ); }
|
|
|
|
void builder_print_fmt( Builder& builder, char const* fmt, ...) {
|
|
|
|
va_list va;
|
|
|
|
va_start( va, fmt );
|
|
|
|
builder_print_fmt_va( & builder, fmt, va );
|
|
|
|
va_end( va );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#pragma endregion Builder
|
|
|
|
|
2024-04-13 13:18:57 -07:00
|
|
|
GEN_NS_END
|
2024-10-25 02:04:11 -07:00
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-12-14 05:46:22 -08:00
|
|
|
# pragma clang diagnostic pop
|
2024-10-25 02:04:11 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-12-14 05:46:22 -08:00
|
|
|
# pragma GCC diagnostic pop
|
2024-10-25 02:04:11 -07:00
|
|
|
#endif
|