22#include <kiwano/base/ObjectBase.h>
36 const Any& GetNative()
const;
39 _Ty GetNative()
const;
41 void SetNative(
const Any& native);
45 bool IsValid()
const override;
51inline const Any& NativeObject::GetNative()
const
57inline _Ty NativeObject::GetNative()
const
61 return native_.
Cast<_Ty>();
66inline void NativeObject::SetNative(
const Any& native)
71inline void NativeObject::ResetNative()
可储存单个任意对象的容器
Definition: Any.h:32
_Ty Cast()
转换为指定类型
Definition: Any.h:154
bool HasValue() const noexcept
是否含有对象
Definition: Any.h:88
void Clear() noexcept
销毁所含对象
Definition: Any.h:115
含有本地指针的对象
Definition: NativeObject.hpp:32
bool IsValid() const override
判断对象是否有效
Definition: NativeObject.hpp:76
基础对象
Definition: ObjectBase.h:138
virtual bool IsValid() const
判断对象是否有效
Definition: ObjectBase.cpp:177