00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #pragma once 00011 00012 #include <string> 00013 00014 class TempDirectory 00015 { 00016 public: 00017 TempDirectory(const std::string& prefix, const std::string& parentDirectory); 00018 ~TempDirectory(); 00019 00020 void Delete(); 00021 00022 const std::string& GetDirectoryName() const; 00023 00024 private: 00025 TempDirectory(const TempDirectory&); 00026 TempDirectory& operator=(const TempDirectory&); 00027 00028 std::string GenerateDirectoryName(const std::string& prefix, const std::string& parentDirectory); 00029 00030 private: 00031 std::string m_directoryName; 00032 bool m_deleted; 00033 };