MyGUI::UserData Class Reference

`#include <MyGUI_WidgetUserData.h>`

Inheritance diagram for MyGUI::UserData:
[legend]

## Public Member Functions

virtual | ~UserData ()=default
void | setUserString (std::string_view _key, std::string_view _value)
std::string_view | getUserString (std::string_view _key) const
const MapString & | getUserStrings () const
bool | clearUserString (std::string_view _key)
bool | isUserString (std::string_view _key) const
void | clearUserStrings ()
void | setUserData (Any _data)
template<typename ValueType>
ValueType * | getUserData (bool _throw=true) const
void | _setInternalData (Any _data)
template<typename ValueType>
ValueType * | _getInternalData (bool _throw=true) const

## Detailed Description

UserData is parent of Widget class. Used to store any user data and strings inside widget

Definition at line 17 of file MyGUI_WidgetUserData.h.

## Constructor & Destructor Documentation

## ~UserData()

virtual MyGUI::UserData::~UserData | ( |  | ) |

virtual default

## Member Function Documentation

## _getInternalData()

template<typename ValueType>

ValueType * MyGUI::UserData::_getInternalData | ( | bool | _throw = true | ) | const

inline

Definition at line 54 of file MyGUI_WidgetUserData.h.

## _setInternalData()

void MyGUI::UserData::_setInternalData | ( | Any | _data | ) |

Definition at line 59 of file MyGUI_WidgetUserData.cpp.

## clearUserString()

bool MyGUI::UserData::clearUserString | ( | std::string_view | _key | ) |

Delete user string

Definition at line 33 of file MyGUI_WidgetUserData.cpp.

## clearUserStrings()

void MyGUI::UserData::clearUserStrings | ( |  | ) |

Delete all user strings

Definition at line 49 of file MyGUI_WidgetUserData.cpp.

## getUserData()

template<typename ValueType>

ValueType * MyGUI::UserData::getUserData | ( | bool | _throw = true | ) | const

inline

Get user data and cast it to ValueType

Definition at line 45 of file MyGUI_WidgetUserData.h.

## getUserString()

std::string_view MyGUI::UserData::getUserString | ( | std::string_view | _key | ) | const

Get user string or "" if not found

Definition at line 20 of file MyGUI_WidgetUserData.cpp.

## getUserStrings()

const MapString & MyGUI::UserData::getUserStrings | ( |  | ) | const

Get map of all user strings

Definition at line 28 of file MyGUI_WidgetUserData.cpp.

## isUserString()

bool MyGUI::UserData::isUserString | ( | std::string_view | _key | ) | const

Return true if user string with such key exist

Definition at line 44 of file MyGUI_WidgetUserData.cpp.

## setUserData()

void MyGUI::UserData::setUserData | ( | Any | _data | ) |

Set any user data to store inside widget

Definition at line 54 of file MyGUI_WidgetUserData.cpp.

## setUserString()

void MyGUI::UserData::setUserString | ( | std::string_view | _key,
|  | std::string_view | _value )

Set user string

Definition at line 14 of file MyGUI_WidgetUserData.cpp.

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

- MyGUI_WidgetUserData.h
- MyGUI_WidgetUserData.cpp