clan::UserDataOwner Class Reference - ClanLib SDK
Description: clan::UserDataOwner Class Reference

Public Member Functions | List of all members
clan::UserDataOwner Class Reference
clanCore System

Helper class to store any shared_ptr as user data on an object. More...

`#include <userdata.h>`

## Public Member Functions
| UserDataOwner ()
| ~UserDataOwner ()
template<typename T >
std::shared_ptr< T > | get_data ()
template<typename T >
void | set_data (const std::shared_ptr< T > &data)

## Detailed Description

Helper class to store any shared_ptr as user data on an object.

## Constructor & Destructor Documentation

## ◆ UserDataOwner()

clan::UserDataOwner::UserDataOwner | ( |  | ) |
| inline

## ◆ ~UserDataOwner()

clan::UserDataOwner::~UserDataOwner | ( |  | ) |
| inline

References clan::UserDataBase::~UserDataBase().

## Member Function Documentation

## ◆ get_data()

template<typename T >

std::shared_ptr< T > clan::UserDataOwner::get_data | ( |  | ) |
| inline

References clan::d, and clan::UserData< T >::data.

Referenced by clan::ResourceManager::get_cache().

## ◆ set_data()

template<typename T >

void clan::UserDataOwner::set_data | ( | const std::shared_ptr< T > & | data | ) |
| inline

References clan::UserDataBase::~UserDataBase().

Referenced by clan::ResourceManager::set_cache().

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

- userdata.h