Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FILE_H
00022 #define FILE_H
00023
00024 #include<string>
00025
00026 using namespace std;
00027
00028
00029
00030
00031 #ifdef _WIN32 //Windows
00032 #define DIR_SEPARATOR "\\"
00033 #else //*nix
00034 #define DIR_SEPARATOR "/"
00035 #endif
00036
00037
00038 namespace ColPack
00039 {
00046 class File
00047 {
00048 private:
00049
00050 string path;
00051 string name;
00052 string fileExtension;
00053
00054 public:
00055
00056 File();
00057
00058 File(string fileName);
00059
00060 void Parse(string newFileName);
00061
00062 string GetPath() const;
00063
00064 string GetName() const;
00065
00067 string GetFileExtension() const;
00068
00069 string GetFullName() const;
00070
00071 void SetPath(string newPath);
00072
00073 void SetName(string newName);
00074
00075 void SetFileExtension(string newFileExtension);
00076
00077 };
00078
00080 bool isMatrixMarketFormat(string s_fileExtension);
00081
00083 bool isHarwellBoeingFormat(string s_fileExtension);
00084
00086 bool isMeTiSFormat(string s_fileExtension);
00087 }
00088 #endif