#include <sharedref.h>
详细描述
template<typename REFCLASS, typename WRAPPER = SharedObject<REFCLASS>>
class maxon::SharedRef< REFCLASS, WRAPPER >
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.
成员函数文档编制
◆
Create()
[1/2]
Result
<void> Create
|
(
|
const REFCLASS &
|
ref
|
)
|
|
创建新的
SharedRef
object from the REFCLASS object.
◆
Create()
[2/2]
Result
<void> Create
|
(
|
REFCLASS &&
|
ref
|
)
|
|
创建新的
SharedRef
object from the REFCLASS object.
◆
GetRef()
[1/2]
const REFCLASS& GetRef
|
(
|
|
)
|
const
|
Acquire access to the REFCLASS object.
◆
GetRef()
[2/2]
Acquire access to the REFCLASS object.
◆
Cast()
Casts the
SharedRef
into another compatible object. e.g.:
ImageBaseSharedRef i = _imageTexture.AddChildren(imageLayer,
nullptr
)
iferr_return
;
entry->_loadingLayer = i.Cast<ImageLayer>()
iferr_return
;