Loading...
Searching...
No Matches
LockableDObject Class Reference

Wrapper for DObject with thread-safe access. More...

`#include <LockableDObject.h>`

## Public Member Functions

| LockableDObject ()=default
| Default constructor.
DObject & | get ()
| Access the underlying DObject.
void | lock ()
| Locks the mutex to ensure thread-safe access.
void | unlock ()
| Unlocks the mutex after thread-safe access.

## Private Attributes

DObject | object_
| The underlying DObject instance.
std::mutex | mutex_
| Mutex for thread-safe access.

## Detailed Description

Wrapper for DObject with thread-safe access.

Definition at line 39 of file LockableDObject.h.

## Constructor & Destructor Documentation

## LockableDObject()

LockableDObject::LockableDObject | ( |  | ) |

default

Default constructor.

## Member Function Documentation

## get()

DObject & LockableDObject::get | ( |  | ) |

Access the underlying DObject.

Returns
  A reference to the wrapped DObject.

Definition at line 26 of file LockableDObject.cpp.

## lock()

void LockableDObject::lock | ( |  | ) |

Locks the mutex to ensure thread-safe access.

Definition at line 33 of file LockableDObject.cpp.

## unlock()

void LockableDObject::unlock | ( |  | ) |

Unlocks the mutex after thread-safe access.

Definition at line 40 of file LockableDObject.cpp.

## Member Data Documentation

## mutex_

std::mutex LockableDObject::mutex_

private

Mutex for thread-safe access.

Definition at line 64 of file LockableDObject.h.

## object_

DObject LockableDObject::object_

private

The underlying DObject instance.

Definition at line 63 of file LockableDObject.h.

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

- src/dobj/public/LockableDObject.h
- src/dobj/private/LockableDObject.cpp