mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
move parts to new common component to avoid circular dependency of zonecommon and objcommon
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
#include "ObjContainerReferenceable.h"
|
||||
|
||||
void ObjContainerReferenceable::AddReference(Zone* referencer)
|
||||
void ObjContainerReferenceable::AddReference(void* referencer)
|
||||
{
|
||||
m_references.insert(referencer);
|
||||
}
|
||||
|
||||
bool ObjContainerReferenceable::RemoveReference(Zone* zone)
|
||||
bool ObjContainerReferenceable::RemoveReference(void* referencer)
|
||||
{
|
||||
return m_references.erase(zone) > 0;
|
||||
return m_references.erase(referencer) > 0;
|
||||
}
|
||||
|
||||
bool ObjContainerReferenceable::IsReferenced() const
|
||||
|
@ -1,16 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "IObjContainer.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
class ObjContainerReferenceable : public IObjContainer
|
||||
{
|
||||
std::set<Zone*> m_references;
|
||||
std::set<void*> m_references;
|
||||
|
||||
public:
|
||||
void AddReference(Zone* referencer);
|
||||
bool RemoveReference(Zone* zone);
|
||||
void AddReference(void* referencer);
|
||||
bool RemoveReference(void* referencer);
|
||||
bool IsReferenced() const;
|
||||
};
|
||||
|
Reference in New Issue
Block a user