mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 02:52:39 +08:00
34 lines
419 B
C++
34 lines
419 B
C++
#pragma once
|
|
|
|
namespace se {
|
|
|
|
class Object;
|
|
|
|
class HandleObject
|
|
{
|
|
public:
|
|
HandleObject(Object* obj);
|
|
~HandleObject();
|
|
|
|
inline Object* operator->() const
|
|
{
|
|
return _obj;
|
|
}
|
|
|
|
inline Object* get() const
|
|
{
|
|
return _obj;
|
|
}
|
|
|
|
inline bool isEmpty() const
|
|
{
|
|
return (_obj == nullptr);
|
|
}
|
|
|
|
private:
|
|
Object* _obj;
|
|
friend class Object;
|
|
};
|
|
|
|
} // namespace se {
|