2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-22 10:11:50 +00:00

feat: report on unlinking progress

This commit is contained in:
Jan Laupetin
2025-10-14 23:20:56 +01:00
parent 9fa41ca0d3
commit c6e9cbedda
159 changed files with 686 additions and 802 deletions

View File

@@ -41,6 +41,32 @@ public:
}
};
class CIterator
{
typename std::map<std::string, XAssetInfo<T>*>::const_iterator m_iterator;
public:
explicit CIterator(typename std::map<std::string, XAssetInfo<T>*>::const_iterator i)
{
m_iterator = i;
}
bool operator!=(CIterator rhs)
{
return m_iterator != rhs.m_iterator;
}
const XAssetInfo<T>* operator*()
{
return m_iterator.operator*().second;
}
void operator++()
{
++m_iterator;
}
};
AssetPool()
{
m_asset_lookup = std::map<std::string, XAssetInfo<T>*>();
@@ -70,4 +96,14 @@ public:
{
return Iterator(m_asset_lookup.end());
}
CIterator begin() const
{
return CIterator(m_asset_lookup.cbegin());
}
CIterator end() const
{
return CIterator(m_asset_lookup.cend());
}
};