]> git.tdb.fi Git - libs/core.git/blobdiff - source/path.h
Get rid of the Path namespace
[libs/core.git] / source / path.h
index 6662a8c20a875856c347d6488747f9c515ecdb5f..1da6a934cd800874107503ab0fea7d259061f951 100644 (file)
@@ -1,8 +1,10 @@
-/*
+/* $Id$
+
 This file is part of libmsppath
-Copyright © 2006  Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-2007  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
+
 #ifndef MSP_PATH_PATH_H_
 #define MSP_PATH_PATH_H_
 
@@ -10,7 +12,6 @@ Distributed under the LGPL
 #include <string>
 
 namespace Msp {
-namespace Path {
 
 enum
 {
@@ -24,19 +25,19 @@ enum
 class Path
 {
 public:
-       class iterator
+       class Iterator
        {
        public:
-               iterator    &operator++();
-               iterator    &operator--();
+               Iterator    &operator++();
+               Iterator    &operator--();
                std::string operator*() const;
-               bool        operator==(const iterator &i) const { return (start==i.start && end==i.end); }
-               bool        operator!=(const iterator &i) const { return !(*this==i); }
+               bool        operator==(const Iterator &i) const { return (start==i.start && end==i.end); }
+               bool        operator!=(const Iterator &i) const { return !(*this==i); }
        private:
                const Path &path;
                unsigned   start,end;
 
-               iterator(const Path &);
+               Iterator(const Path &);
 
                friend class Path;
        };
@@ -53,8 +54,8 @@ public:
        Path        &operator/=(const Path &);
        std::string operator[](int) const;
        bool        operator==(const Path &) const;
-       iterator    begin() const { return iterator(*this); }
-       iterator    end() const   { iterator i(*this); i.start=i.end=std::string::npos; return i; }
+       Iterator    begin() const { return Iterator(*this); }
+       Iterator    end() const   { Iterator i(*this); i.start=i.end=std::string::npos; return i; }
 private:
        std::string path;
 
@@ -64,7 +65,6 @@ private:
 
 inline std::ostream &operator<<(std::ostream &o, const Path &p) { o<<p.str(); return o; }
 
-} // namespace Path
 } // namespace Msp
 
 #endif