summaryrefslogtreecommitdiff
path: root/include/mcld/Support/RealPath.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mcld/Support/RealPath.h')
-rw-r--r--include/mcld/Support/RealPath.h57
1 files changed, 27 insertions, 30 deletions
diff --git a/include/mcld/Support/RealPath.h b/include/mcld/Support/RealPath.h
index b630fd6..b5edc76 100644
--- a/include/mcld/Support/RealPath.h
+++ b/include/mcld/Support/RealPath.h
@@ -6,64 +6,61 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#ifndef MCLD_SUPPORT_REALPATH_H
-#define MCLD_SUPPORT_REALPATH_H
+#ifndef MCLD_SUPPORT_REALPATH_H_
+#define MCLD_SUPPORT_REALPATH_H_
#include "mcld/Support/Path.h"
+
#include <string>
namespace mcld {
-namespace sys {
-namespace fs {
+namespace sys {
+namespace fs {
/** \class RealPath
* \brief The canonicalized absolute pathname.
*
*/
-class RealPath : public Path
-{
-public:
- typedef Path::ValueType ValueType;
+class RealPath : public Path {
+ public:
+ typedef Path::ValueType ValueType;
typedef Path::StringType StringType;
-public:
+ public:
RealPath();
- explicit RealPath(const ValueType* s );
- explicit RealPath(const StringType &s );
+ explicit RealPath(const ValueType* s);
+ explicit RealPath(const StringType& s);
explicit RealPath(const Path& pPath);
~RealPath();
RealPath& assign(const Path& pPath);
-protected:
+ protected:
void initialize();
};
-} // namespace of fs
-} // namespace of sys
-} // namespace of mcld
+} // namespace fs
+} // namespace sys
+} // namespace mcld
-//-------------------------------------------------------------------------//
-// STL compatible functions //
-//-------------------------------------------------------------------------//
+//----------------------------------------------------------------------------//
+// STL compatible functions //
+//----------------------------------------------------------------------------//
namespace std {
-template<>
-struct less<mcld::sys::fs::RealPath> : public binary_function<
- mcld::sys::fs::RealPath,
- mcld::sys::fs::RealPath,
- bool>
-{
- bool operator() (const mcld::sys::fs::RealPath& pX,
- const mcld::sys::fs::RealPath& pY) const {
+template <>
+struct less<mcld::sys::fs::RealPath>
+ : public binary_function<mcld::sys::fs::RealPath,
+ mcld::sys::fs::RealPath,
+ bool> {
+ bool operator()(const mcld::sys::fs::RealPath& pX,
+ const mcld::sys::fs::RealPath& pY) const {
if (pX.native().size() < pY.native().size())
return true;
return (pX.native() < pY.native());
}
};
-} // namespace of std
-
-
-#endif
+} // namespace std
+#endif // MCLD_SUPPORT_REALPATH_H_