#include <sharedref.h>
SharedRef encapsulates a REFCLASS (e.g. String, Url, ImageLayer, ImageTexture...) to access it from multiple SharedRefs. With this technique it is possible to store COW objects in structures and allow the modification of the objects from outside.
Public Member Functions | |
Result< void > | Create (const REFCLASS &ref) |
Result< void > | Create (REFCLASS &&ref) |
const REFCLASS & | GetRef () const |
REFCLASS & | GetRef () |
template<typename REFCLASSOUT > | |
const SharedRef< REFCLASSOUT, typename SharedRefHelper< WRAPPER >::template Rebind< REFCLASSOUT > > & | Cast () const |
operator Bool () const | |
auto | PrivateGetRef () const -> const decltype(this->_ref)& |
auto | PrivateGetRef () -> decltype(this->_ref)& |
Private Member Functions | |
WRAPPER * | GetWrapper () const |
Result<void> Create | ( | const REFCLASS & | ref | ) |
Creates a new SharedRef object from the REFCLASS object.
const REFCLASS& GetRef | ( | ) | const |
Acquire access to the REFCLASS object.
REFCLASS& GetRef | ( | ) |
Acquire access to the REFCLASS object.
const SharedRef<REFCLASSOUT, typename SharedRefHelper<WRAPPER>::template Rebind<REFCLASSOUT> >& Cast | ( | ) | const |
Casts the SharedRef into another compatible object. e.g.:
|
explicit |
auto PrivateGetRef | ( | ) | const -> const decltype(this->_ref)& |
auto PrivateGetRef | ( | ) | -> decltype(this->_ref)& |
|
private |