TemporaryDirectory.h

Go to the documentation of this file.
00001 /*
00002  *   MAD-FLUTE-UNITTEST: FLUTE unit test.
00003  *   File: TemporaryDirectory.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 __TEMPORARYDIRECTORY__
00023 //#define __TEMPORARYDIRECTORY__
00024 
00025 #pragma once
00026 
00027 #include "TemporaryFile.h"
00028 
00029 #include <boost/utility.hpp>
00030 
00031 #include <string>
00032 #include <iostream>
00033 #include <map>
00034 #include <vector>
00035 
00040 class TemporaryDirectory : public boost::noncopyable
00041 {
00042 private:
00043 
00044     typedef std::map<std::string, TemporaryFile*> Files;
00045 
00046 public:
00050     TemporaryDirectory(std::vector<int>  aFileSizeVector);
00051 
00055     TemporaryDirectory(const std::string& aDirPath);
00056 
00057     ~TemporaryDirectory();
00058 
00062     std::string getDirPath() const
00063     {
00064         return theDirPath;
00065     }
00066 
00070     std::string getDirName() const;
00071 
00072     bool operator == (const TemporaryDirectory& aDir) const;
00073 
00074 private:
00075 
00076 
00077     std::string theDirPath;
00078 
00079     Files theFiles;
00080 
00081     void createAndAddFile(int aFileSize);
00082 };
00083 
00084 std::ostream& operator<<(std::ostream&, const TemporaryDirectory&);
00085 
00086 /*#endif */// defined __TEMPORARYDIRECTORY__

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