Flow-IPC 1.0.2
Flow-IPC project: Full implementation reference.
Public Member Functions | Private Attributes | List of all members
ipc::util::Use_counted_object Class Reference

Simple counter that manually tracks utilization. It is not thread-safe. More...

#include <use_counted_object.hpp>

Collaboration diagram for ipc::util::Use_counted_object:
[legend]

Public Member Functions

 Use_counted_object ()
 Constructor. More...
 
unsigned int get_use_count () const
 Returns the current usage. More...
 
void increment_use ()
 Increments the usage. More...
 
void decrement_use ()
 Decrements the usage. The current count must be greater than one. More...
 

Private Attributes

unsigned int m_use_count
 The current usage count. More...
 

Detailed Description

Simple counter that manually tracks utilization. It is not thread-safe.

Definition at line 27 of file use_counted_object.hpp.

Constructor & Destructor Documentation

◆ Use_counted_object()

ipc::util::Use_counted_object::Use_counted_object ( )

Constructor.

Definition at line 24 of file use_counted_object.cpp.

Member Function Documentation

◆ decrement_use()

void ipc::util::Use_counted_object::decrement_use ( )

Decrements the usage. The current count must be greater than one.

Definition at line 39 of file use_counted_object.cpp.

References m_use_count.

◆ get_use_count()

unsigned int ipc::util::Use_counted_object::get_use_count ( ) const

Returns the current usage.

Returns
See above.

Definition at line 29 of file use_counted_object.cpp.

References m_use_count.

◆ increment_use()

void ipc::util::Use_counted_object::increment_use ( )

Increments the usage.

Definition at line 34 of file use_counted_object.cpp.

References m_use_count.

Member Data Documentation

◆ m_use_count

unsigned int ipc::util::Use_counted_object::m_use_count
private

The current usage count.

Definition at line 54 of file use_counted_object.hpp.

Referenced by decrement_use(), get_use_count(), and increment_use().


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