00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00048 #ifndef PLATFORMSTL_INCL_PLATFORMSTL_FILESYSTEM_HPP_PATH
00049 #define PLATFORMSTL_INCL_PLATFORMSTL_FILESYSTEM_HPP_PATH
00050
00051
00052 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00053 # define PLATFORMSTL_VER_PLATFORMSTL_FILESYSTEM_HPP_PATH_MAJOR 2
00054 # define PLATFORMSTL_VER_PLATFORMSTL_FILESYSTEM_HPP_PATH_MINOR 1
00055 # define PLATFORMSTL_VER_PLATFORMSTL_FILESYSTEM_HPP_PATH_REVISION 2
00056 # define PLATFORMSTL_VER_PLATFORMSTL_FILESYSTEM_HPP_PATH_EDIT 28
00057 #endif
00058
00059
00060
00061
00062
00063 #ifndef PLATFORMSTL_INCL_PLATFORMSTL_FILESYSTEM_HPP_PLATFORMSTL
00064 # include <platformstl/platformstl.hpp>
00065 #endif
00066
00067 #if defined(PLATFORMSTL_OS_IS_UNIX)
00068 # ifndef UNIXSTL_INCL_UNIXSTL_FILESYSTEM_HPP_PATH
00069 # include <unixstl/filesystem/path.hpp>
00070 # endif
00071 #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
00072 # ifndef WINSTL_INCL_WINSTL_FILESYSTEM_HPP_PATH
00073 # include <winstl/filesystem/path.hpp>
00074 # endif
00075 #else
00076 # error Operating system not discriminated
00077 #endif
00078
00079
00080
00081
00082
00083 #if defined(_STLSOFT_NO_NAMESPACE) || \
00084 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00085
00086 namespace platformstl
00087 {
00088 #else
00089
00090
00091 namespace stlsoft
00092 {
00093
00094 namespace platformstl_project
00095 {
00096 #endif
00097
00098
00099
00100 #if defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00101
00117 template< ss_typename_param_k C
00118 , ss_typename_param_k T = filesystem_traits<C>
00119 , ss_typename_param_k A = ss_typename_type_def_k stlsoft::allocator_selector<C>::allocator_type
00120 >
00121 class basic_path
00122 {};
00123
00125 typedef basic_path<char, filesystem_traits<char> > path_a;
00127 typedef basic_path<wchar_t, filesystem_traits<wchar_t> > path_w;
00129 typedef basic_path<tchar, filesystem_traits<tchar> > path;
00130
00131 #elif defined(PLATFORMSTL_OS_IS_UNIX)
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 # if defined(STLSOFT_COMPILER_IS_MSVC) && \
00145 _MSC_VER < 1310
00146
00147 template< ss_typename_param_k C
00148 # ifdef STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
00149 , ss_typename_param_k T = unixstl_ns_qual(filesystem_traits)<C>
00150 , ss_typename_param_k A = ss_typename_type_def_k stlsoft::allocator_selector<C>::allocator_type
00151 # else
00152 , ss_typename_param_k T
00153 , ss_typename_param_k A
00154 # endif
00155 >
00156 class basic_path
00157 : public unixstl_ns_qual(basic_path__)<C, T, A>
00158 {
00159 private:
00160 typedef unixstl_ns_qual(basic_path__)<C, T, A> parent_class_type;
00161 typedef basic_path<C, T, A> class_type;
00162 public:
00163 typedef ss_typename_type_k parent_class_type::char_type char_type;
00164 typedef ss_typename_type_k parent_class_type::traits_type traits_type;
00165 typedef ss_typename_type_k parent_class_type::allocator_type allocator_type;
00166 typedef ss_typename_type_k parent_class_type::size_type size_type;
00167
00168 public:
00169 basic_path()
00170 : parent_class_type()
00171 {}
00172 ss_explicit_k basic_path(char_type const* path)
00173 : parent_class_type(path)
00174 {}
00175 basic_path(parent_class_type const& s)
00176 : parent_class_type(s)
00177 {}
00178 # ifdef STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
00180 template<ss_typename_param_k S>
00181 basic_path(S const& s)
00182 : parent_class_type(s)
00183 {}
00184 # endif
00185 basic_path(char_type const* path, size_type cch)
00186 : parent_class_type(path, cch)
00187 {}
00188 basic_path(class_type const& rhs)
00189 : parent_class_type(rhs)
00190 {}
00191
00192 class_type& operator =(class_type const& rhs)
00193 {
00194 parent_class_type::operator =(rhs);
00195
00196 return *this;
00197 }
00198 class_type& operator =(parent_class_type const& rhs)
00199 {
00200 parent_class_type::operator =(rhs);
00201
00202 return *this;
00203 }
00204 class_type& operator =(char_type const* rhs)
00205 {
00206 parent_class_type::operator =(rhs);
00207
00208 return *this;
00209 }
00210 # ifdef STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
00211 template<ss_typename_param_k S>
00212 class_type& operator =(S const& s)
00213 {
00214 parent_class_type::operator =(s);
00215
00216 return *this;
00217 }
00218 # endif
00219 };
00220
00221 typedef basic_path<char> path;
00222
00223 # else
00224
00225 # ifdef _UNIXSTL_NO_NAMESPACE
00226 using ::basic_path;
00227 # else
00228 using ::unixstl::basic_path;
00229 using ::unixstl::path;
00230 # endif
00231
00232 # endif
00233
00234 #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247 # if defined(STLSOFT_COMPILER_IS_MSVC) && \
00248 _MSC_VER < 1310
00249
00250 template< ss_typename_param_k C
00251 # ifdef STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
00252 , ss_typename_param_k T = winstl_ns_qual(filesystem_traits)<C>
00253 , ss_typename_param_k A = winstl_ns_qual(processheap_allocator)<C>
00254 # else
00255 , ss_typename_param_k T
00256 , ss_typename_param_k A
00257 # endif
00258 >
00259 class basic_path
00260 : public winstl_ns_qual(basic_path__)<C, T, A>
00261 {
00262 private:
00263 typedef winstl_ns_qual(basic_path__)<C, T, A> parent_class_type;
00264 typedef basic_path<C, T, A> class_type;
00265 public:
00266 typedef ss_typename_type_k parent_class_type::char_type char_type;
00267 typedef ss_typename_type_k parent_class_type::traits_type traits_type;
00268 typedef ss_typename_type_k parent_class_type::allocator_type allocator_type;
00269 typedef ss_typename_type_k parent_class_type::size_type size_type;
00270
00271 public:
00272 basic_path()
00273 : parent_class_type()
00274 {}
00275 ss_explicit_k basic_path(char_type const* path)
00276 : parent_class_type(path)
00277 {}
00278 basic_path(parent_class_type const& s)
00279 : parent_class_type(s)
00280 {}
00281 # ifdef STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
00283 template<ss_typename_param_k S>
00284 basic_path(S const& s)
00285 : parent_class_type(s)
00286 {}
00287 # endif
00288 basic_path(char_type const* path, size_type cch)
00289 : parent_class_type(path, cch)
00290 {}
00291 basic_path(class_type const& rhs)
00292 : parent_class_type(rhs)
00293 {}
00294
00295 class_type& operator =(class_type const& rhs)
00296 {
00297 parent_class_type::operator =(rhs);
00298
00299 return *this;
00300 }
00301 class_type& operator =(parent_class_type const& rhs)
00302 {
00303 parent_class_type::operator =(rhs);
00304
00305 return *this;
00306 }
00307 class_type& operator =(char_type const* rhs)
00308 {
00309 parent_class_type::operator =(rhs);
00310
00311 return *this;
00312 }
00313 # ifdef STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
00314 template<ss_typename_param_k S>
00315 class_type& operator =(S const& s)
00316 {
00317 parent_class_type::operator =(s);
00318
00319 return *this;
00320 }
00321 # endif
00322 };
00323
00324 typedef basic_path<TCHAR> path;
00325
00326 # else
00327
00328 # ifdef _WINSTL_NO_NAMESPACE
00329 using ::basic_path;
00330 # else
00331 using ::winstl::basic_path;
00332 using ::winstl::path;
00333 # endif
00334
00335 # endif
00336
00337 #else
00338 # error Operating system not discriminated
00339 #endif
00340
00341
00342
00343 #if defined(_STLSOFT_NO_NAMESPACE) || \
00344 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00345 }
00346 #else
00347 }
00348 }
00349 #endif
00350
00351
00352
00353 #endif
00354
00355