μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
ConstructorStats Class Reference

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/tests/constructor_stats.h>

Public Member Functions

void copy_created (void *inst)
 
void move_created (void *inst)
 
void default_created (void *inst)
 
void created (void *inst)
 
void destroyed (void *inst)
 
int alive ()
 
void value ()
 
template<typename T , typename... Tmore>
void value (const T &v, Tmore &&...args)
 
py::list values ()
 
void copy_created (void *inst)
 
void move_created (void *inst)
 
void default_created (void *inst)
 
void created (void *inst)
 
void destroyed (void *inst)
 
int alive ()
 
void value ()
 
template<typename T , typename... Tmore>
void value (const T &v, Tmore &&...args)
 
py::list values ()
 

Static Public Member Functions

static void gc ()
 
static ConstructorStatsget (std::type_index type)
 
template<typename T >
static ConstructorStatsget ()
 
static ConstructorStatsget (py::object class_)
 
static void gc ()
 
static ConstructorStatsget (std::type_index type)
 
template<typename T >
static ConstructorStatsget ()
 
static ConstructorStatsget (py::object class_)
 

Public Attributes

int default_constructions = 0
 
int copy_constructions = 0
 
int move_constructions = 0
 
int copy_assignments = 0
 
int move_assignments = 0
 

Protected Attributes

std::unordered_map< void *, int > _instances
 
std::list< std::string > _values
 

Detailed Description

Definition at line 75 of file constructor_stats.h.

Member Function Documentation

◆ alive() [1/2]

int ConstructorStats::alive ( )
inline

Definition at line 131 of file constructor_stats.h.

References _instances, and gc().

Referenced by bind_ConstructorStats(), and TEST_SUBMODULE().

◆ alive() [2/2]

int ConstructorStats::alive ( )
inline

Definition at line 131 of file constructor_stats.h.

References _instances, and gc().

◆ copy_created() [1/2]

void ConstructorStats::copy_created ( void *  inst)
inline

Definition at line 88 of file constructor_stats.h.

References copy_constructions, and created().

◆ copy_created() [2/2]

void ConstructorStats::copy_created ( void *  inst)
inline

Definition at line 88 of file constructor_stats.h.

References copy_constructions, and created().

◆ created() [1/2]

void ConstructorStats::created ( void *  inst)
inline

Definition at line 103 of file constructor_stats.h.

References _instances.

Referenced by copy_created(), default_created(), and move_created().

◆ created() [2/2]

void ConstructorStats::created ( void *  inst)
inline

Definition at line 103 of file constructor_stats.h.

References _instances.

◆ default_created() [1/2]

void ConstructorStats::default_created ( void *  inst)
inline

Definition at line 98 of file constructor_stats.h.

References created(), and default_constructions.

◆ default_created() [2/2]

void ConstructorStats::default_created ( void *  inst)
inline

Definition at line 98 of file constructor_stats.h.

References created(), and default_constructions.

◆ destroyed() [1/2]

void ConstructorStats::destroyed ( void *  inst)
inline

Definition at line 105 of file constructor_stats.h.

References _instances.

◆ destroyed() [2/2]

void ConstructorStats::destroyed ( void *  inst)
inline

Definition at line 105 of file constructor_stats.h.

References _instances.

◆ gc() [1/2]

static void ConstructorStats::gc ( )
inlinestatic

Definition at line 113 of file constructor_stats.h.

References globals().

Referenced by alive(), bind_ConstructorStats(), get(), and TEST_SUBMODULE().

◆ gc() [2/2]

static void ConstructorStats::gc ( )
inlinestatic

Definition at line 113 of file constructor_stats.h.

References globals().

◆ get() [1/6]

template<typename T >
static ConstructorStats & ConstructorStats::get ( )
inlinestatic

Definition at line 170 of file constructor_stats.h.

References gc(), and get().

Referenced by bind_ConstructorStats(), and get().

◆ get() [2/6]

template<typename T >
static ConstructorStats & ConstructorStats::get ( )
inlinestatic

Definition at line 170 of file constructor_stats.h.

References gc(), and get().

◆ get() [3/6]

static ConstructorStats & ConstructorStats::get ( py::object  class_)
inlinestatic

◆ get() [4/6]

static ConstructorStats & ConstructorStats::get ( py::object  class_)
inlinestatic

◆ get() [5/6]

static ConstructorStats & ConstructorStats::get ( std::type_index  type)
inlinestatic

◆ get() [6/6]

static ConstructorStats & ConstructorStats::get ( std::type_index  type)
inlinestatic

Definition at line 163 of file constructor_stats.h.

◆ move_created() [1/2]

void ConstructorStats::move_created ( void *  inst)
inline

Definition at line 93 of file constructor_stats.h.

References created(), and move_constructions.

◆ move_created() [2/2]

void ConstructorStats::move_created ( void *  inst)
inline

Definition at line 93 of file constructor_stats.h.

References created(), and move_constructions.

◆ value() [1/4]

void ConstructorStats::value ( )
inline

Definition at line 142 of file constructor_stats.h.

Referenced by value().

◆ value() [2/4]

void ConstructorStats::value ( )
inline

Definition at line 142 of file constructor_stats.h.

◆ value() [3/4]

template<typename T , typename... Tmore>
void ConstructorStats::value ( const T &  v,
Tmore &&...  args 
)
inline

Definition at line 145 of file constructor_stats.h.

References _values, and value().

◆ value() [4/4]

template<typename T , typename... Tmore>
void ConstructorStats::value ( const T &  v,
Tmore &&...  args 
)
inline

Definition at line 145 of file constructor_stats.h.

References _values, and value().

◆ values() [1/2]

py::list ConstructorStats::values ( )
inline

Definition at line 153 of file constructor_stats.h.

References _values.

Referenced by bind_ConstructorStats().

◆ values() [2/2]

py::list ConstructorStats::values ( )
inline

Definition at line 153 of file constructor_stats.h.

References _values.

Member Data Documentation

◆ _instances

std::unordered_map< void *, int > ConstructorStats::_instances
protected

Definition at line 77 of file constructor_stats.h.

Referenced by alive(), created(), and destroyed().

◆ _values

std::list< std::string > ConstructorStats::_values
protected

Definition at line 79 of file constructor_stats.h.

Referenced by value(), and values().

◆ copy_assignments

int ConstructorStats::copy_assignments = 0

Definition at line 85 of file constructor_stats.h.

Referenced by bind_ConstructorStats().

◆ copy_constructions

int ConstructorStats::copy_constructions = 0

Definition at line 83 of file constructor_stats.h.

Referenced by bind_ConstructorStats(), and copy_created().

◆ default_constructions

int ConstructorStats::default_constructions = 0

Definition at line 82 of file constructor_stats.h.

Referenced by bind_ConstructorStats(), and default_created().

◆ move_assignments

int ConstructorStats::move_assignments = 0

Definition at line 86 of file constructor_stats.h.

Referenced by bind_ConstructorStats().

◆ move_constructions

int ConstructorStats::move_constructions = 0

Definition at line 84 of file constructor_stats.h.

Referenced by bind_ConstructorStats(), and move_created().


The documentation for this class was generated from the following files: