Public Member Functions | Private Member Functions | Private Attributes | List of all members
pal_statistics::RegistrationsRAII Class Reference

The RegistrationsRAII class holds handles to registered variables and when it is destroyed, unregisters them automatically. More...

#include <pal_statistics_utils.h>

Public Member Functions

void add (Registration &&registration)
 
bool disable (const std::string &name)
 
bool disable (IdType id)
 
bool disableAll ()
 
bool enable (const std::string &name)
 
bool enable (IdType id)
 
bool enableAll ()
 
 RegistrationsRAII ()
 
bool remove (const std::string &name)
 
bool remove (IdType id)
 
void removeAll ()
 

Private Member Functions

std::vector< Registration >::iterator find (const std::string &name)
 
std::vector< Registration >::iterator find (IdType id)
 
RegistrationsRAIIoperator= (const RegistrationsRAII &)=delete
 
 RegistrationsRAII (const RegistrationsRAII &)=delete
 

Private Attributes

boost::mutex mutex_
 
std::vector< Registrationregistrations_
 

Detailed Description

The RegistrationsRAII class holds handles to registered variables and when it is destroyed, unregisters them automatically.

Definition at line 117 of file pal_statistics_utils.h.

Constructor & Destructor Documentation

◆ RegistrationsRAII() [1/2]

pal_statistics::RegistrationsRAII::RegistrationsRAII ( )

Definition at line 267 of file pal_statistics_utils.cpp.

◆ RegistrationsRAII() [2/2]

pal_statistics::RegistrationsRAII::RegistrationsRAII ( const RegistrationsRAII )
privatedelete

Member Function Documentation

◆ add()

void pal_statistics::RegistrationsRAII::add ( Registration &&  registration)

Definition at line 272 of file pal_statistics_utils.cpp.

◆ disable() [1/2]

bool pal_statistics::RegistrationsRAII::disable ( const std::string &  name)

Definition at line 334 of file pal_statistics_utils.cpp.

◆ disable() [2/2]

bool pal_statistics::RegistrationsRAII::disable ( IdType  id)

Definition at line 340 of file pal_statistics_utils.cpp.

◆ disableAll()

bool pal_statistics::RegistrationsRAII::disableAll ( )

Definition at line 346 of file pal_statistics_utils.cpp.

◆ enable() [1/2]

bool pal_statistics::RegistrationsRAII::enable ( const std::string &  name)

Definition at line 312 of file pal_statistics_utils.cpp.

◆ enable() [2/2]

bool pal_statistics::RegistrationsRAII::enable ( IdType  id)

Definition at line 318 of file pal_statistics_utils.cpp.

◆ enableAll()

bool pal_statistics::RegistrationsRAII::enableAll ( )

Definition at line 324 of file pal_statistics_utils.cpp.

◆ find() [1/2]

std::vector< Registration >::iterator pal_statistics::RegistrationsRAII::find ( const std::string &  name)
private

Definition at line 242 of file pal_statistics_utils.cpp.

◆ find() [2/2]

std::vector< Registration >::iterator pal_statistics::RegistrationsRAII::find ( IdType  id)
private

Definition at line 254 of file pal_statistics_utils.cpp.

◆ operator=()

RegistrationsRAII& pal_statistics::RegistrationsRAII::operator= ( const RegistrationsRAII )
privatedelete

◆ remove() [1/2]

bool pal_statistics::RegistrationsRAII::remove ( const std::string &  name)

Definition at line 278 of file pal_statistics_utils.cpp.

◆ remove() [2/2]

bool pal_statistics::RegistrationsRAII::remove ( IdType  id)

Definition at line 293 of file pal_statistics_utils.cpp.

◆ removeAll()

void pal_statistics::RegistrationsRAII::removeAll ( )

Definition at line 307 of file pal_statistics_utils.cpp.

Member Data Documentation

◆ mutex_

boost::mutex pal_statistics::RegistrationsRAII::mutex_
private

Definition at line 142 of file pal_statistics_utils.h.

◆ registrations_

std::vector<Registration> pal_statistics::RegistrationsRAII::registrations_
private

Definition at line 143 of file pal_statistics_utils.h.


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


pal_statistics
Author(s):
autogenerated on Fri Aug 2 2024 08:29:35