Blender V4.3
msgfmt.cc File Reference
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <string>
#include <utility>
#include "BLI_fileops.h"
#include "BLI_linklist.h"
#include "BLI_map.hh"
#include "BLI_string_ref.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  Message
 
struct  Offset
 

Enumerations

enum  eSectionType { SECTION_NONE = 0 , SECTION_CTX = 1 , SECTION_ID = 2 , SECTION_STR = 3 }
 

Functions

static blender::StringRef unescape (std::string &str)
 
BLI_INLINE size_t uint32_to_bytes (const int value, char *bytes)
 
BLI_INLINE size_t msg_to_bytes (const std::string &msg, char *bytes, uint32_t size)
 
static char * generate (blender::Map< std::string, std::string > &messages, size_t *r_output_size)
 
static void clear (Message &msg)
 
static void add (blender::Map< std::string, std::string > &messages, Message &msg)
 
static int make (const char *input_file_name, const char *output_file_name)
 
int main (int argc, char **argv)
 

Enumeration Type Documentation

◆ eSectionType

Enumerator
SECTION_NONE 
SECTION_CTX 
SECTION_ID 
SECTION_STR 

Definition at line 44 of file msgfmt.cc.

Function Documentation

◆ add()

◆ clear()

◆ generate()

◆ main()

int main ( int argc,
char ** argv )

Definition at line 393 of file msgfmt.cc.

References make(), and printf.

◆ make()

static int make ( const char * input_file_name,
const char * output_file_name )
static

◆ msg_to_bytes()

BLI_INLINE size_t msg_to_bytes ( const std::string & msg,
char * bytes,
uint32_t size )

Definition at line 110 of file msgfmt.cc.

References BLI_assert, and size().

Referenced by generate().

◆ uint32_to_bytes()

BLI_INLINE size_t uint32_to_bytes ( const int value,
char * bytes )

Definition at line 101 of file msgfmt.cc.

Referenced by generate().

◆ unescape()

static blender::StringRef unescape ( std::string & str)
static

Definition at line 59 of file msgfmt.cc.

References BLI_assert, next, str, and blender::StringRefBase::substr().

Referenced by make().