mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-16 22:17:02 +00:00
@@ -10,7 +10,9 @@ class CInputStream;
|
||||
class CDependencyGroup {
|
||||
public:
|
||||
explicit CDependencyGroup(CInputStream& in);
|
||||
~CDependencyGroup() {}
|
||||
void ReadFromStream(CInputStream& in);
|
||||
int GetCountForResType(FourCC type) const;
|
||||
|
||||
const rstl::vector< SObjectTag >& GetObjectTagVector() const { return x0_objectTags; }
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
|
||||
class CObjOwnerDerivedFromIObjUntyped : public IObj {
|
||||
public:
|
||||
~CObjOwnerDerivedFromIObjUntyped() {}
|
||||
template < typename T >
|
||||
CObjOwnerDerivedFromIObjUntyped(T* obj) : m_objPtr(obj) {}
|
||||
template < typename T >
|
||||
@@ -29,13 +30,17 @@ protected:
|
||||
template < typename T >
|
||||
class TObjOwnerDerivedFromIObj : public CObjOwnerDerivedFromIObjUntyped {
|
||||
public:
|
||||
~TObjOwnerDerivedFromIObj() override { delete Owned(); }
|
||||
~TObjOwnerDerivedFromIObj() {
|
||||
if (Owned()) {
|
||||
delete Owned();
|
||||
}
|
||||
}
|
||||
T* Owned() { return static_cast< T* >(m_objPtr); }
|
||||
|
||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetNewDerivedObject(T* obj) {
|
||||
static rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetNewDerivedObject(T* obj) {
|
||||
return new TObjOwnerDerivedFromIObj< T >(obj);
|
||||
}
|
||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||
static rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||
GetNewDerivedObject(const rstl::auto_ptr< T >& obj) {
|
||||
return new TObjOwnerDerivedFromIObj< T >(obj);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
T* operator*() { return GetT(); }
|
||||
T* operator->() { return GetT(); }
|
||||
|
||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||
static rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||
GetIObjObjectFor(const rstl::auto_ptr< T >& obj) {
|
||||
return TObjOwnerDerivedFromIObj< T >::GetNewDerivedObject(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user