Freeciv21
Develop your civilization from humble roots to a global empire
section_file.h File Reference
#include "registry_ini.h"
#include "support.h"
#include <QString>
#include <stddef.h>
+ Include dependency graph for section_file.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  section
 
struct  section_file
 

Macros

#define SECFILE_LOG(secfile, psection, format, ...)
 
#define SECFILE_RETURN_IF_FAIL(secfile, psection, condition)
 
#define SECFILE_RETURN_VAL_IF_FAIL(secfile, psection, condition, value)
 

Functions

void secfile_log (const struct section_file *secfile, const struct section *psection, const char *file, const char *function, int line, const char *format,...) fc__attribute((__format__(__printf__
 
bool entry_from_token (struct section *psection, const QString &name, const QString &tok)
 Add entry to section from token. More...
 

Macro Definition Documentation

◆ SECFILE_LOG

#define SECFILE_LOG (   secfile,
  psection,
  format,
  ... 
)
Value:
secfile_log(secfile, psection, __FILE__, __FUNCTION__, __LINE__, format, \
##__VA_ARGS__)
void secfile_log(const struct section_file *secfile, const struct section *psection, const char *file, const char *function, int line, const char *format,...) fc__attribute((__format__(__printf__

Definition at line 58 of file section_file.h.

◆ SECFILE_RETURN_IF_FAIL

#define SECFILE_RETURN_IF_FAIL (   secfile,
  psection,
  condition 
)
Value:
if (!(condition)) { \
SECFILE_LOG(secfile, psection, "Assertion '%s' failed.", #condition); \
return; \
}

Definition at line 61 of file section_file.h.

◆ SECFILE_RETURN_VAL_IF_FAIL

#define SECFILE_RETURN_VAL_IF_FAIL (   secfile,
  psection,
  condition,
  value 
)
Value:
if (!(condition)) { \
SECFILE_LOG(secfile, psection, "Assertion '%s' failed.", #condition); \
return value; \
}

Definition at line 66 of file section_file.h.

Function Documentation

◆ entry_from_token()

bool entry_from_token ( struct section psection,
const QString &  name,
const QString &  tok 
)

Add entry to section from token.

Definition at line 121 of file section_file.cpp.

Referenced by entry_from_inf_token().

◆ secfile_log()

void secfile_log ( const struct section_file secfile,
const struct section psection,
const char *  file,
const char *  function,
int  line,
const char *  format,
  ... 
)