Monado OpenXR Runtime
Data Structures | Macros | Functions
u_var.cpp File Reference

Variable tracking code. More...

#include "util/u_var.h"
#include "util/u_time.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include <string>
#include <sstream>
#include <vector>
#include <unordered_map>
Include dependency graph for u_var.cpp:

Data Structures

class  Var
 
class  Obj
 
class  Tracker
 

Macros

#define ADD_FUNC(SUFFIX, TYPE, ENUM)
 

Functions

void u_var_force_on (void)
 This forces the variable tracking code to on, it is disabled by default. More...
 
void u_var_add_root (void *root, const char *c_name, bool number)
 Add a named root object, the u_var subsystem is completely none-invasive to the object it's tracking. More...
 
void u_var_remove_root (void *root)
 Remove the root node. More...
 
void u_var_visit (u_var_root_cb enter_cb, u_var_root_cb exit_cb, u_var_elm_cb elem_cb, void *priv)
 Visit all root nodes and their variables. More...
 

Detailed Description

Variable tracking code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ ADD_FUNC

#define ADD_FUNC (   SUFFIX,
  TYPE,
  ENUM 
)
Value:
extern "C" void u_var_add_##SUFFIX(void *obj, TYPE *ptr, \
const char *c_name) \
{ \
if (!get_on()) { \
return; \
} \
add_var(obj, (void *)ptr, U_VAR_KIND_##ENUM, c_name); \
}

Function Documentation

◆ u_var_force_on()

void u_var_force_on ( void  )

This forces the variable tracking code to on, it is disabled by default.

◆ u_var_remove_root()

void u_var_remove_root ( void *  root)

Remove the root node.

Referenced by gui_sdl2_imgui_loop().

◆ u_var_visit()

void u_var_visit ( u_var_root_cb  enter_cb,
u_var_root_cb  exit_cb,
u_var_elm_cb  elem_cb,
void *  priv 
)

Visit all root nodes and their variables.