2022-04-10 00:17:06 +00:00
|
|
|
#ifndef _IOBJECTSTORE_HPP
|
|
|
|
#define _IOBJECTSTORE_HPP
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
#include "rstl/auto_ptr.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
#include "rstl/rc_ptr.hpp"
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
#define kInvalidAssetId 0xFFFFFFFFu
|
|
|
|
|
2022-07-18 22:42:58 +00:00
|
|
|
typedef u32 CAssetId;
|
|
|
|
typedef u32 FourCC;
|
|
|
|
|
|
|
|
struct SObjectTag {
|
|
|
|
FourCC type;
|
|
|
|
CAssetId id;
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
SObjectTag() {}
|
|
|
|
SObjectTag(FourCC type, CAssetId id) : type(type), id(id) {}
|
2022-07-18 22:42:58 +00:00
|
|
|
SObjectTag(const SObjectTag& other) : type(other.type), id(other.id) {}
|
|
|
|
};
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
class IObjectStore;
|
|
|
|
class IObj;
|
|
|
|
class CVParamTransfer {
|
2022-08-13 01:26:00 +00:00
|
|
|
public:
|
|
|
|
static CVParamTransfer Null();
|
|
|
|
|
|
|
|
private:
|
2022-08-26 03:46:24 +00:00
|
|
|
rstl::rc_ptr< unkptr > x0_;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
class CObjectReference {
|
2022-08-13 01:26:00 +00:00
|
|
|
public:
|
|
|
|
CObjectReference(const rstl::auto_ptr< IObj >& obj);
|
|
|
|
// : x0_refCount(0)
|
|
|
|
// , x2_locked(false)
|
|
|
|
// , x2_lockCount(0)
|
|
|
|
// , xc_objectStore(nullptr)
|
|
|
|
// , x10_object(obj.release())
|
|
|
|
// , x14_params(CVParamTransfer::Null()) {}
|
|
|
|
|
|
|
|
CObjectReference(IObjectStore* store, const rstl::auto_ptr< IObj >& obj, SObjectTag tag, CVParamTransfer xfer);
|
|
|
|
|
|
|
|
private:
|
2022-04-10 00:17:06 +00:00
|
|
|
u16 x0_refCount;
|
2022-08-13 01:26:00 +00:00
|
|
|
bool x2_locked : 1;
|
|
|
|
u16 x2_lockCount : 15;
|
2022-04-10 00:17:06 +00:00
|
|
|
SObjectTag x4_objTag;
|
|
|
|
IObjectStore* xc_objectStore;
|
|
|
|
IObj* x10_object;
|
|
|
|
CVParamTransfer x14_params;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|