prime/include/Kyoto/CToken.hpp

29 lines
545 B
C++
Raw Normal View History

#ifndef _CTOKEN_HPP
#define _CTOKEN_HPP
#include "types.h"
#include "Kyoto/IObj.hpp"
#include "Kyoto/CObjectReference.hpp"
class CObjectReference;
class CToken {
public:
2022-08-13 01:26:00 +00:00
CToken() {}
CToken(IObj* obj); // : x0_objRef(new CObjectReference(obj)), x4_lockHeld(false) {}
2022-08-13 01:26:00 +00:00
CToken(const CToken& other);
~CToken();
CToken& operator=(const CToken&);
CObjOwnerDerivedFromIObjUntyped* GetObj();
2022-08-13 01:26:00 +00:00
void Lock();
bool IsLoaded() const { return x0_objRef->IsLoaded(); }
private:
CObjectReference* x0_objRef;
bool x4_lockHeld;
};
#endif