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
00041
00042
00043
00051 #ifndef UNIXSTL_INCL_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT
00052 #define UNIXSTL_INCL_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT
00053
00054 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00055 # define UNIXSTL_VER_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT_MAJOR 4
00056 # define UNIXSTL_VER_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT_MINOR 0
00057 # define UNIXSTL_VER_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT_REVISION 2
00058 # define UNIXSTL_VER_UNIXSTL_SHIMS_ACCESS_STRING_HPP_DIRENT_EDIT 56
00059 #endif
00060
00061
00062
00063
00064
00065 #ifndef UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
00066 # include <unixstl/unixstl.h>
00067 #endif
00068 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00069 # include <stlsoft/shims/access/string/fwd.h>
00070 #endif
00071 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_STD_H_C_STRING
00072 # include <stlsoft/shims/access/string/std/c_string.h>
00073 #endif
00074
00075 #ifndef STLSOFT_INCL_H_DIRENT
00076 # define STLSOFT_INCL_H_DIRENT
00077 # include <dirent.h>
00078 #endif
00079
00080
00081
00082
00083
00084 #ifndef _UNIXSTL_NO_NAMESPACE
00085 # if defined(_STLSOFT_NO_NAMESPACE) || \
00086 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00087
00088 namespace unixstl
00089 {
00090 # else
00091
00092
00093 namespace stlsoft
00094 {
00095
00096 namespace unixstl_project
00097 {
00098
00099 # endif
00100 #endif
00101
00102
00103
00104
00105
00106
00107
00108
00117 inline us_char_a_t const* c_str_data_a(struct dirent const* d)
00118 {
00119 return (NULL == d) ? "" : d->d_name;
00120 }
00121
00129 inline us_char_a_t const* c_str_data(struct dirent const* d)
00130 {
00131 return (NULL == d) ? "" : d->d_name;
00132 }
00133
00134
00143 inline us_char_a_t const* c_str_data_a(struct dirent const& d)
00144 {
00145 return d.d_name;
00146 }
00147
00155 inline us_char_a_t const* c_str_data(struct dirent const& d)
00156 {
00157 return d.d_name;
00158 }
00159
00160
00161
00162
00163
00164
00165
00166
00174 inline us_size_t c_str_len_a(struct dirent const* d)
00175 {
00176 return stlsoft_ns_qual(c_str_len)(c_str_data(d));
00177 }
00178
00186 inline us_size_t c_str_len(struct dirent const* d)
00187 {
00188 return c_str_len_a(d);
00189 }
00190
00191
00199 inline us_size_t c_str_len_a(struct dirent const& d)
00200 {
00201 return c_str_len_a(&d);
00202 }
00203
00211 inline us_size_t c_str_len(struct dirent const& d)
00212 {
00213 return c_str_len(&d);
00214 }
00215
00216
00217
00218
00219
00220
00221
00222
00231 inline us_char_a_t const* c_str_ptr_a(struct dirent const* d)
00232 {
00233 return (NULL == d) ? "" : d->d_name;
00234 }
00235
00244 inline us_char_a_t const* c_str_ptr(struct dirent const* d)
00245 {
00246 return (NULL == d) ? "" : d->d_name;
00247 }
00248
00249
00258 inline us_char_a_t const* c_str_ptr_a(struct dirent const& d)
00259 {
00260 return d.d_name;
00261 }
00262
00271 inline us_char_a_t const* c_str_ptr(struct dirent const& d)
00272 {
00273 return d.d_name;
00274 }
00275
00276
00277
00278
00279
00280
00281
00282
00291 inline us_char_a_t const* c_str_ptr_null_a(struct dirent const* d)
00292 {
00293 return (NULL == d || 0 == d->d_name[0]) ? static_cast<us_char_a_t const*>(NULL) : d->d_name;
00294 }
00295
00304 inline us_char_a_t const* c_str_ptr_null(struct dirent const* d)
00305 {
00306 return (NULL == d || 0 == d->d_name[0]) ? static_cast<us_char_a_t const*>(NULL) : d->d_name;
00307 }
00308
00309
00318 inline us_char_a_t const* c_str_ptr_null_a(struct dirent const& d)
00319 {
00320 return 0 == d.d_name[0] ? static_cast<us_char_a_t const*>(NULL) : d.d_name;
00321 }
00322
00331 inline us_char_a_t const* c_str_ptr_null(struct dirent const& d)
00332 {
00333 return 0 == d.d_name[0] ? static_cast<us_char_a_t const*>(NULL) : d.d_name;
00334 }
00335
00337
00338
00339 #ifdef STLSOFT_UNITTEST
00340 # include "./unittest/dirent_unittest_.h"
00341 #endif
00342
00343
00344
00345 #ifndef _UNIXSTL_NO_NAMESPACE
00346 # if defined(_STLSOFT_NO_NAMESPACE) || \
00347 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00348 }
00349 # else
00350 }
00351 }
00352 # endif
00353 #endif
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363 #ifndef _UNIXSTL_NO_NAMESPACE
00364 # if !defined(_STLSOFT_NO_NAMESPACE) && \
00365 !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00366 namespace stlsoft
00367 {
00368 # else
00369
00370 # endif
00371
00372 using ::unixstl::c_str_data;
00373 using ::unixstl::c_str_data_a;
00374
00375
00376 using ::unixstl::c_str_len;
00377 using ::unixstl::c_str_len_a;
00378
00379
00380 using ::unixstl::c_str_ptr;
00381 using ::unixstl::c_str_ptr_a;
00382
00383
00384 using ::unixstl::c_str_ptr_null;
00385 using ::unixstl::c_str_ptr_null_a;
00386
00387
00388 # if !defined(_STLSOFT_NO_NAMESPACE) && \
00389 !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00390 }
00391 # else
00392
00393 # endif
00394 #endif
00395
00396
00397
00398 #endif
00399
00400