wxSharedClientDataContainer Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxSharedClientDataContainer Class Reference
Class List by Category » Containers

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/clntdata.h>`

Inheritance diagram for wxSharedClientDataContainer:
[legend]

## Detailed Description

This class is a replacement for wxClientDataContainer, and unlike wxClientDataContainer the wxSharedClientDataContainer client data is copiable, so it can be copied when objects containing it are cloned.

Like wxClientDataContainer, wxSharedClientDataContainer is a mixin that provides storage and management of "client data.". The client data is reference counted and managed by the container. As the client data is a shared object, changing the client data used by any object changes it for all other objects, too.

Note
  If your class has a Clone function and needs to store client data, use wxSharedClientDataContainer and not wxClientDataContainer!

##

Library: wxBase
Category: Containers

See also
  wxClientDataContainer, wxClientData

Since
  3.1.7

## Public Member Functions
void * | GetClientData () const
| Get the untyped client data.
wxClientData * | GetClientObject () const
| Get a pointer to the client data object.
void | SetClientData (void *data)
| Set the untyped client data.
void | SetClientObject (wxClientData *data)
| Set the client data object.

## Member Function Documentation

## ◆ GetClientData()

void * wxSharedClientDataContainer::GetClientData | ( |  | ) | const

Get the untyped client data.

## ◆ GetClientObject()

wxClientData * wxSharedClientDataContainer::GetClientObject | ( |  | ) | const

Get a pointer to the client data object.

## ◆ SetClientData()

void wxSharedClientDataContainer::SetClientData | ( | void * | data | ) |

Set the untyped client data.

## ◆ SetClientObject()

void wxSharedClientDataContainer::SetClientObject | ( | wxClientData * | data | ) |

Set the client data object.

Any previous object will be deleted.