00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __COMMON_H__
00022 #define __COMMON_H__
00023
00024 #include <map>
00025 #include <algorithm>
00026 #include <string>
00027 #include <boost/filesystem/path.hpp>
00028
00032 template <class T> struct equalKey : public std::binary_function<std::pair<std::string, T>, std::string, bool>
00033 {
00034 bool operator() (std::pair<std::string, T> pair,
00035 const std::string & otherKey) const
00036 {
00037 return pair.first == otherKey;
00038 }
00039 };
00040
00045 bool equalEndOfLine (char c);
00046
00051 bool equalComma (char c);
00052
00057 bool equalBlank (char c);
00058
00063 bool equalDot (char c);
00064
00069 bool equalDollar (char c);
00070
00075 bool equalPathSeparator (char c);
00076
00081 struct equalPath : public std::binary_function<boost::filesystem::path,
00082 boost::filesystem::path,
00083 bool>
00084 {
00085 bool operator() (boost::filesystem::path path1,
00086 const boost::filesystem::path & path2) const;
00087 };
00088
00093 struct equivalentPath : public std::binary_function<boost::filesystem::path,
00094 boost::filesystem::path,
00095 bool>
00096 {
00097 bool operator() (boost::filesystem::path path1,
00098 const boost::filesystem::path & path2) const;
00099 };
00100 #endif