// FTTUPtr - [2020-04-13 11:57:47]
#ifndef _FTTUPTR_H_
#define _FTTUPTR_H_

#include <stdio.h>
#include <stdlib.h>

/*
00191918 FTTUPtr<CGfxAdboard>::~FTTUPtr()
00191970 FTTUPtr<CGfxAdboard>::operator=(CGfxAdboard*)
00196CA2 FTTUPtr<CrowdTextureCreationData>::~FTTUPtr()
00196D0E FTTUPtr<CFTTRenderHelper>::~FTTUPtr()
00196E7C FTTUPtr<CFTTRenderHelper>::operator=(CFTTRenderHelper*)

FTTUPtr_CFTTRenderHelper
0019BBCC FTTUPtr<CGfxCrowdFlagPhysics>::~FTTUPtr()
0019BFE8 FTTUPtr<CGfxCrowdCardGroup>::~FTTUPtr()
0019C2F0 FTTUPtr<CGfxCrowdFlagRender>::~FTTUPtr()
0019EAC4 FTTUPtr<CrowdTextureCreationData>::operator=(CrowdTextureCreationData*)
0019F674 FTTUPtr<FTTAtlasGenerator>::operator=(FTTAtlasGenerator*)
001A329C FTTUPtr<CGfxCloth>::operator=(CGfxCloth*)
001A4CC8 FTTUPtr<FTTAtlasGenerator>::~FTTUPtr()
001A67B0 FTTUPtr<CGfxCloth>::~FTTUPtr()
001AE1CC FTTUPtr<CGfxPostProcess>::~FTTUPtr()
001B92D0 FTTUPtr<CFTTTexture>::Delete()
001C3C68 FTTUPtr<CFTTBatchModelManager>::~FTTUPtr()
001C40D4 FTTUPtr<CFTTBatchModelManager>::operator=(CFTTBatchModelManager*)
FTTUPtr_CFTTTexture

001A4A74 FTTUPtr<FTTAtlasGeneratorNode []>::operator=(FTTAtlasGeneratorNode*)
*/

template <typename T>
class FTTUPtr {
public:
  FTTUPtr(T* p) {
    pType_0 = p;
  };

  FTTUPtr(){};

  ~FTTUPtr() {
    delete pType_0;
  };

  FTTUPtr<T>* operator=(T* other) {
    if (pType_0 != nullptr) {
      delete pType_0;
    }

    pType_0 = other;
    return this;
  }

  void Delete() {
    if (pType_0 != nullptr) {
      delete pType_0;
    }

    pType_0 = nullptr;
  }

  T* pType_0;
};

#endif  //_FTTUPTR_H_