Monado OpenXR Runtime
u_var.cpp File Reference

Variable tracking code. More...

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

Data Structures

class  xrt::auxiliary::util::Var
 Simple container for the variable information. More...
 
class  xrt::auxiliary::util::Obj
 Object that has a series of tracked variables. More...
 
class  xrt::auxiliary::util::Tracker
 Object that has a series of tracked variables. More...
 

Macros

#define ADD_FUNC(SUFFIX, TYPE, ENUM)
 

Functions

static bool xrt::auxiliary::util::get_on ()
 
static void xrt::auxiliary::util::add_var (void *root, void *ptr, u_var_kind kind, const char *c_name)
 
void xrt::auxiliary::util::u_var_force_on (void)
 
void xrt::auxiliary::util::u_var_add_root (void *root, const char *c_name, bool suffix_with_number)
 
void xrt::auxiliary::util::u_var_remove_root (void *root)
 
void xrt::auxiliary::util::u_var_visit (u_var_root_cb enter_cb, u_var_root_cb exit_cb, u_var_elm_cb elem_cb, void *priv)
 

Variables

static class Tracker xrt::auxiliary::util::gTracker
 Global variable tracking state. 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); \
}

Variable Documentation

◆ gTracker

class Tracker xrt::auxiliary::util::gTracker
static

Global variable tracking state.