]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/path.h
Add other comparison operators to FS::Path
[libs/core.git] / source / fs / path.h
index 6aa16f6d08191a9d7d4000f8f9be65ee4d6217a6..c701e60f7fb97dbf507cf0295ea13adefb32aec1 100644 (file)
@@ -30,7 +30,7 @@ public:
 
        private:
                const Path &path;
-               std::string::size_type start,end;
+               std::string::size_type start, end;
 
                Iterator(const Path &);
        public:
@@ -80,6 +80,12 @@ public:
        std::string operator[](int) const;
 
        bool operator==(const Path &) const;
+       bool operator<(const Path &) const;
+       bool operator>(const Path &) const;
+       bool operator<=(const Path &other) const { return !(*this>other); }
+       bool operator>=(const Path &other) const { return !(*this<other); }
+       bool operator!=(const Path &other) const { return !(*this==other); }
+
        Iterator begin() const;
        Iterator end() const;
 };