xmltooling 3.0.4

Public Member Functions | Static Public Member Functions | List of all members
xmltooling::ThreadKey Class Referenceabstract

A class for managing Thread Local Storage values. More...

`#include <xmltooling/util/Threads.h>`

## Public Member Functions
virtual int | setData (void *data)=0
| Sets the value for a TLS key. More...
virtual void * | getData () const =0
| Returns the value for a TLS key. More...

## Static Public Member Functions
static ThreadKey * | create (void(*destroy_fn)(void *))
| Creates a new TLS key. More...

## Detailed Description

A class for managing Thread Local Storage values.

## Member Function Documentation

## ◆ create()

static ThreadKey * xmltooling::ThreadKey::create | ( | void(*)(void *) | destroy_fn | ) |
| static

Creates a new TLS key.

Parameters

  destroy_fn | a functon to cleanup key values

Returns
  the new key

## ◆ getData()

virtual void * xmltooling::ThreadKey::getData | ( |  | ) | const
| pure virtual

Returns the value for a TLS key.

Returns
  the value or nullptr

## ◆ setData()

virtual int xmltooling::ThreadKey::setData | ( | void * | data | ) |
| pure virtual

Sets the value for a TLS key.

Parameters

  data | the value to set

Returns
  0 for success, non-zero for failure

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

- xmltooling/util/Threads.h