TemporaryFile.h

Go to the documentation of this file.
00001 /*
00002  *   MAD-FLUTE-UNITTEST: FLUTE unit test.
00003  *   File: TemporaryFile.h
00004  *   Copyright (c) 2006-2007 M.B.I. www.mbigroup.it
00005  *   main authors/contacts: gmendola@mbigroup.it and lpoderico@mbigroup.it
00006  *
00007  *   This program is free software; you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation; either version 2 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program; if not, write to the Free Software
00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 #ifndef __TEMPORARYFILE__
00023 #define __TEMPORARYFILE__
00024 
00025 
00026 
00027 #include <boost/utility.hpp>
00028 
00029 #include <string>
00030 #include <iostream>
00031 
00036 class TemporaryFile :public boost::noncopyable
00037 {
00038 public:
00042     TemporaryFile(int aFileSize, const std::string& aCreationPath = "");
00043 
00047     TemporaryFile(const std::string& aFilePath);
00048 
00049     ~TemporaryFile();
00050 
00054     std::string getFilePath() const
00055     {
00056         return theFilePath;
00057     }
00058 
00062     std::string getFileName() const;
00063 
00067     bool operator==(const TemporaryFile& aRHS) const;
00068 
00069 private:
00070     std::string theFilePath;
00071 
00072     void CreateAndFill(int aFileSize);
00073 
00074 };
00075 
00076 std::ostream& operator<<(std::ostream&, const TemporaryFile&);
00077 
00078 #endif

Generated on Fri Mar 9 19:59:55 2007 for MAD-FCL by  doxygen 1.5.0