Home Libraries Author Links

divaids.hpp

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the SysToMath C++ Libraries package (LibStmCpp).
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Tom Michaelis, SysToMath.
00018  * Portions created by the Initial Developer are Copyright (C) 2003-2006
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 /******************************************************************************
00038  *                       First Release 2003-03-15
00039  ******************************************************************************/
00040 
00041 
00090 #ifndef STM_DIVAIDS_HPP
00091 #define STM_DIVAIDS_HPP
00092 
00093 
00094 // Include header files for implementation.
00095 #include <stm/impl/divxaids.hpp>
00096 
00097 
00101 namespace stm
00102 {
00103 
00104 
00109 
00110 
00111 
00112 typedef boost::uint8_t byte;
00113 typedef boost::uint16_t word;
00114 typedef boost::uint32_t dword;
00115 typedef boost::uint64_t qword;
00116 typedef boost::int8_t int8;
00117 typedef boost::int16_t int16;
00118 typedef boost::int32_t int32;
00119 typedef boost::int64_t int64;
00120 
00121 
00124 typedef boost::uint_t<sizeof (void *) * CHAR_BIT>::least addrword;
00126 
00127 
00131 
00134 typedef boost::mpl::bool_<__BYTE_ORDER == __LITTLE_ENDIAN> littleendian;
00135 
00136 
00139 typedef boost::mpl::bool_<__BYTE_ORDER == __BIG_ENDIAN> bigendian;
00140 
00141 
00146 StmDllSpec
00147 bool hostlittleendian ();
00148 
00149 
00154 StmDllSpec
00155 bool hostbigendian ();
00157 
00158 
00162 template <typename T> struct has_pow2size;
00163 
00164 
00168 
00169 
00170 
00171 namespace buffer
00172 {
00173 
00174 
00179 
00180 
00181     template <typename T>
00182     T &get (byte *ptr);
00183 
00187     template <typename T>
00188     const T &get (const byte *ptr);
00189 
00193     template <typename T>
00194     T &fetch (T &obj, const byte *ptr);
00195 
00200     template <typename T>
00201     T &swap
00202     (
00203         T &obj,
00204         typename boost::enable_if<boost::is_pod<T>, const byte *>::type ptr
00205     );
00206 
00212     template <typename T>
00213     T &endianConvertIf
00214     (
00215         T &obj,
00216         typename boost::enable_if<boost::is_pod<T>, const byte *>::type ptr,
00217         bool convert
00218     );
00219 
00224     template <typename T>
00225     T &endianConvertIf
00226     (
00227         T &obj,
00228         typename boost::enable_if<boost::is_pod<T>, const byte *>::type ptr,
00229         boost::mpl::false_
00230     );
00231 
00236     template <typename T>
00237     T &endianConvertIf
00238     (
00239         T &obj,
00240         typename boost::enable_if<boost::is_pod<T>, const byte *>::type ptr,
00241         boost::mpl::true_
00242     );
00243 
00250     template <typename T>
00251     T &networkByteOrderConvert
00252     (
00253         T &obj,
00254         typename boost::enable_if<boost::is_pod<T>, const byte *>::type ptr
00255     );
00256 
00260     template <typename T>
00261     T swapped (typename boost::enable_if<boost::is_pod<T>, T>::type value);
00262 
00267     template <typename T>
00268     T endianConvertedIf
00269     (
00270         typename boost::enable_if<boost::is_pod<T>, T>::type value,
00271         bool convert
00272     );
00273 
00277     template <typename T>
00278     T endianConvertedIf
00279     (
00280         typename boost::enable_if<boost::is_pod<T>, T>::type value,
00281         boost::mpl::false_
00282     );
00283 
00287     template <typename T>
00288     T endianConvertedIf
00289     (
00290         typename boost::enable_if<boost::is_pod<T>, T>::type value,
00291         boost::mpl::true_
00292     );
00293 
00299     template <typename T>
00300     T networkByteOrderConverted
00301     (
00302         typename boost::enable_if<boost::is_pod<T>, T>::type value
00303     );
00304 
00308     template <typename T>
00309     size_t pad
00310     (
00311         typename boost::enable_if<has_pow2size<T>, size_t>::type offset
00312     );
00313 
00316     template <typename T>
00317     byte *put (byte *ptr, const T &value);
00318 
00319 
00323 }  // namespace buffer.
00324 
00325 
00330 
00331 
00332 
00333 using buffer::swapped;
00334 using buffer::endianConvertedIf;
00335 using buffer::networkByteOrderConverted;
00336 using buffer::pad;
00338 
00339 
00342 class StmDllSpec byte_iterator_range : public boost::iterator_range<byte *>
00343 {
00344 public:
00346     byte_iterator_range ();
00347 
00350     byte_iterator_range (const byte *first, const byte *last);
00351 
00353     template <class ForwardRange>
00354     byte_iterator_range (ForwardRange &that);
00355 
00357     template <class ForwardRange>
00358     byte_iterator_range (const ForwardRange &that);
00359 
00366     template <typename T>
00367     const T &safe_get
00368     (
00369         const byte *ptr
00370     ) const throw (std::logic_error, std::range_error);
00371 };
00372 
00373 
00377 }  // namespace stm
00378 
00379 
00380 // Include rectrl implementation.
00381 #include <stm/impl/divxaids.hpp>
00382 
00383 
00384 namespace stm
00385 {
00386 
00387 
00391 namespace rectrl
00392 {
00393 
00394 
00399 
00400 
00401 
00402 
00403 
00408 extern StmDllSpec StmReCtrl identity;
00409 
00410 
00414 extern StmDllSpec StmReCtrl tolower;
00416 
00417 
00421 }  // namespace rectrl
00422 
00423 
00424 }  // namespace stm
00425 
00426 
00431 
00432 
00433 
00434 
00435 
00436 
00437 
00438 
00439 
00440 
00441 
00442 
00443 
00444 
00445 
00446 #define StmRectrlTry(envbuf) StmRectrlTryImpl_ (envbuf)
00447 
00448 
00452 // Include integral range base class implementation.
00453 #include <stm/impl/divxaids.hpp>
00454 
00455 
00457 namespace stm
00458 {
00459 
00460 
00465 
00466 
00467 
00468 
00469 
00470 template
00471 <
00472     typename IntegralT,
00473     IntegralT minVal = boost::integer_traits<IntegralT>::const_min,
00474     IntegralT maxVal = boost::integer_traits<IntegralT>::const_max
00475 >
00476 class integral_range :
00477     private local::xIntegral_range<IntegralT, minVal, maxVal>
00478 {
00480     typedef local::xIntegral_range<IntegralT, minVal, maxVal> impl;
00481 
00482 public:
00484     typedef IntegralT integral_type;
00485 
00487     typedef integral_range<IntegralT, minVal, maxVal> range_type;
00488 
00490     static const integral_type MinVal = minVal;
00491 
00493     static const integral_type MaxVal = maxVal;
00494 
00496     static const size_t EmptyAllowed = impl::EmptyAllowed;
00497 
00500     integral_range (bool fullRange = false);
00501 
00504     integral_range (integral_type number);
00505 
00509     integral_range (integral_type fromNumber, integral_type toNumber);
00510 
00525     range_type &assign (const std::string &valSpec, size_t fmtFlags = 0);
00526 
00541     range_type &assign (const char *valSpec, size_t fmtFlags = 0);
00542 
00544     void swap (range_type &other) throw ();
00545 
00548     integral_type from () const;
00549 
00552     integral_type last () const;
00553 
00557     integral_type to () const;
00558 
00562     size_t size () const;
00563 
00565     bool empty () const;
00566 
00568     bool full () const;
00569 
00572     range_type operator& (integral_type number) const;
00573 
00576     range_type operator& (const range_type &other) const;
00577 
00580     range_type &operator&= (const range_type &other);
00581 
00583     static range_type emptyrange ();
00584 
00586     range_type &clear ();
00587 
00589     static range_type fullrange ();
00590 
00592     range_type &fill ();
00593 
00596     bool operator< (const range_type &other) const;
00597 
00599     bool operator<= (integral_type number) const;
00600 
00603     bool operator<= (const range_type &other) const;
00604 
00606     bool operator>= (integral_type number) const;
00607 
00609     bool operator>= (const range_type &other) const;
00610 
00612     bool operator== (integral_type number) const;
00613 
00616     bool operator== (const range_type &other) const;
00617 
00620     bool operator!= (integral_type number) const;
00621 
00624     bool operator!= (const range_type &other) const;
00625 };
00626 
00630 template <class IStreamT, typename IntegralT, IntegralT minVal, IntegralT maxVal>
00631 IStreamT &operator>> (IStreamT &is, integral_range<IntegralT, minVal, maxVal> &range);
00632 
00635 template <class OStreamT, typename IntegralT, IntegralT minVal, IntegralT maxVal>
00636 OStreamT &operator<< (OStreamT &os, const integral_range<IntegralT, minVal, maxVal> &range);
00637 
00638 
00642 }  // namespace stm
00643 
00644 
00645 // Include integral set base class implementation.
00646 #include <stm/impl/divxaids.hpp>
00647 
00648 
00650 namespace stm
00651 {
00652 
00653 
00658 
00659 
00660 
00661 
00662 
00663 
00664 
00665 
00666 
00667 template
00668 <
00669     class IntegralRangeT,
00670     class RangeSetT = std::set<IntegralRangeT>
00671 >
00672 class integral_set :
00673     private local::xIntegral_set<IntegralRangeT, RangeSetT>
00674 {
00676     typedef local::xIntegral_set<IntegralRangeT, RangeSetT> impl;
00677 
00678 public:
00680     typedef IntegralRangeT range_type;
00681 
00683     typedef RangeSetT rangeset_type;
00684 
00686     typedef typename IntegralRangeT::integral_type integral_type;
00687 
00693     typedef typename impl::integral_iterator iterator;
00694     typedef std::reverse_iterator<iterator> reverse_iterator;
00695     typedef iterator const_iterator;
00696     typedef reverse_iterator const_reverse_iterator;
00697 
00698     iterator begin () const;
00699     iterator end () const;
00700     reverse_iterator rbegin () const;
00701     reverse_iterator rend () const;
00703 
00709     typedef typename impl::const_iterator range_iterator;
00710     typedef typename impl::const_reverse_iterator reverse_range_iterator;
00711 
00712     range_iterator beginrange () const;
00713     range_iterator endrange () const;
00714     reverse_range_iterator rbeginrange () const;
00715     reverse_range_iterator rendrange () const;
00717 
00720     static const integral_type MinVal = range_type::MinVal;
00721 
00724     static const integral_type MaxVal = range_type::MaxVal;
00725 
00727     integral_set (integral_type number);
00728 
00730     integral_set (const range_type &range);
00731 
00734     integral_set (const rangeset_type &rangeset = rangeset_type ());
00735 
00738     integral_set<IntegralRangeT, RangeSetT> &operator= (integral_type number);
00739 
00742     integral_set<IntegralRangeT, RangeSetT> &operator= (const range_type &range);
00743 
00746     integral_set<IntegralRangeT, RangeSetT> &operator= (const rangeset_type &rangeset);
00747 
00756     integral_set<IntegralRangeT, RangeSetT> &assign
00757     (
00758         const std::string &valSpecList,
00759         size_t fmtFlags = 0
00760     );
00761 
00770     integral_set<IntegralRangeT, RangeSetT> &assign
00771     (
00772         const char *valSpecList,
00773         size_t fmtFlags = 0
00774     );
00775 
00777     void swap (integral_set<IntegralRangeT, RangeSetT> &other) throw ();
00778 
00780     void swap (rangeset_type &rangeset) throw ();
00781 
00783     operator const RangeSetT & () const;
00784 
00787     iterator find (integral_type number) const;
00788 
00791     reverse_iterator rfind (integral_type number) const;
00792 
00795     range_iterator findrange (integral_type number) const;
00796 
00799     reverse_range_iterator rfindrange (integral_type number) const;
00800 
00804     size_t size () const;
00805 
00807     size_t ranges () const;
00808 
00810     bool empty () const;
00811 
00813     bool full () const;
00814 
00816     range_type hull () const;
00817 
00820     integral_type min () const;
00821 
00824     integral_type max () const;
00825 
00828     integral_set<IntegralRangeT, RangeSetT> operator| (integral_type number) const;
00829 
00832     integral_set<IntegralRangeT, RangeSetT> operator| (const range_type &range) const;
00833 
00836     integral_set<IntegralRangeT, RangeSetT> operator| (const rangeset_type &rangeset) const;
00837 
00839     integral_set<IntegralRangeT, RangeSetT> &operator|= (integral_type number);
00840 
00843     integral_set<IntegralRangeT, RangeSetT> &operator|= (const range_type &range);
00844 
00847     integral_set<IntegralRangeT, RangeSetT> &operator|= (const rangeset_type &rangeset);
00848 
00851     integral_set<IntegralRangeT, RangeSetT> operator& (integral_type number) const;
00852 
00855     integral_set<IntegralRangeT, RangeSetT> operator& (const range_type &range) const;
00856 
00859     integral_set<IntegralRangeT, RangeSetT> operator& (const rangeset_type &rangeset) const;
00860 
00863     integral_set<IntegralRangeT, RangeSetT> &operator&= (integral_type number);
00864 
00867     integral_set<IntegralRangeT, RangeSetT> &operator&= (const range_type &range);
00868 
00871     integral_set<IntegralRangeT, RangeSetT> &operator&= (const rangeset_type &rangeset);
00872 
00875     integral_set<IntegralRangeT, RangeSetT> operator- (integral_type number) const;
00876 
00879     integral_set<IntegralRangeT, RangeSetT> operator- (const range_type &range) const;
00880 
00883     integral_set<IntegralRangeT, RangeSetT> operator- (const rangeset_type &rangeset) const;
00884 
00886     integral_set<IntegralRangeT, RangeSetT> &operator-= (integral_type number);
00887 
00890     integral_set<IntegralRangeT, RangeSetT> &operator-= (const range_type &range);
00891 
00894     integral_set<IntegralRangeT, RangeSetT> &operator-= (const rangeset_type &rangeset);
00895 
00898     integral_set<IntegralRangeT, RangeSetT> operator^ (integral_type number) const;
00899 
00902     integral_set<IntegralRangeT, RangeSetT> operator^ (const range_type &range) const;
00903 
00906     integral_set<IntegralRangeT, RangeSetT> operator^ (const rangeset_type &rangeset) const;
00907 
00910     integral_set<IntegralRangeT, RangeSetT> &operator^= (integral_type number);
00911 
00914     integral_set<IntegralRangeT, RangeSetT> &operator^= (const range_type &range);
00915 
00918     integral_set<IntegralRangeT, RangeSetT> &operator^= (const rangeset_type &rangeset);
00919 
00921     integral_set<IntegralRangeT, RangeSetT> operator~ () const;
00922 
00924     integral_set<IntegralRangeT, RangeSetT> &invert ();
00925 
00927     static integral_set<IntegralRangeT, RangeSetT> emptyset ();
00928 
00930     integral_set<IntegralRangeT, RangeSetT> &clear ();
00931 
00933     static integral_set<IntegralRangeT, RangeSetT> fullset ();
00934 
00936     integral_set<IntegralRangeT, RangeSetT> &fill ();
00937 
00939     bool operator<= (integral_type number) const;
00940 
00943     bool operator<= (const range_type &range) const;
00944 
00947     bool operator<= (const rangeset_type &rangeset) const;
00948 
00950     bool operator>= (integral_type number) const;
00951 
00954     bool operator>= (const range_type &range) const;
00955 
00958     bool operator>= (const rangeset_type &rangeset) const;
00959 
00961     bool operator== (integral_type number) const;
00962 
00965     bool operator== (const range_type &range) const;
00966 
00969     bool operator== (const rangeset_type &rangeset) const;
00970 
00973     bool operator!= (integral_type number) const;
00974 
00977     bool operator!= (const range_type &range) const;
00978 
00981     bool operator!= (const rangeset_type &rangeset) const;
00982 };
00983 
00988 template <class IStreamT, class IntegralRangeT, class RangeSetT>
00989 IStreamT &operator>> (IStreamT &is, integral_set<IntegralRangeT, RangeSetT> &set);
00990 
00994 template <class OStreamT, class IntegralRangeT, class RangeSetT>
00995 OStreamT &operator<< (OStreamT &os, const integral_set<IntegralRangeT, RangeSetT> &set);
00996 
00997 
01001 }  // namespace stm
01002 
01003 
01004 // Include condition and system_condition base class implementations.
01005 #include <stm/impl/divxaids.hpp>
01006 
01007 
01009 namespace stm
01010 {
01011 
01012 
01017 // Forward reference.
01018 class scoped_lock;
01019     
01020 
01023 class StmDllSpec condition :
01024     private local::xcondition
01025 {
01026 public:
01029     explicit condition ();
01030 
01031     ~condition ();
01032 
01033     // notification
01036     void signal ();
01037 
01040     void broadcast ();
01041 
01042     // waiting
01045     void wait (scoped_lock &lock);
01046 
01049     bool timed_wait (scoped_lock &lock, int64 absTimeMs);
01050 };
01051 
01052 
01053 // Forward reference.
01054 class system_scoped_lock;
01055     
01056 
01059 class StmDllSpec system_condition :
01060     private local::xsystem_condition
01061 {
01062 public:
01065     explicit system_condition (const std::string &name);
01066 
01067     ~system_condition ();
01068 
01069     // notification.
01072     void signal ();
01073 
01076     void broadcast ();
01077 
01078     // waiting
01081     void wait (system_scoped_lock &lock);
01082 
01085     bool timed_wait (system_scoped_lock &lock, int64 absTimeMs);
01086 };
01087 
01088 
01092 }  // namespace stm
01093 
01094 
01095 // Include scoped_lock and system_scoped_lock base class implementations.
01096 #include <stm/impl/divxaids.hpp>
01097 
01098 
01100 namespace stm
01101 {
01102 
01103 
01108 
01109 
01110 
01111 class StmDllSpec scoped_lock :
01112     private local::xscoped_lock
01113 {
01114     // Implementation
01115     friend bool local::xcondition::wait_ (scoped_lock &, int64);
01116 
01117 public:
01120     explicit scoped_lock (StmMutex mutex);
01121 
01126     scoped_lock (StmMutex mutex, int64 absTimeMs);
01127 
01128     ~scoped_lock ();
01129 };
01130 
01131 
01135 class StmDllSpec system_scoped_lock :
01136     private local::xsystem_scoped_lock
01137 {
01138     // Implementation
01139     friend bool local::xsystem_condition::wait_ (system_scoped_lock &, int64);
01140 
01141 public:
01144     explicit system_scoped_lock (StmNamedMutex mutex);
01145 
01150     system_scoped_lock (StmNamedMutex mutex, int64 absTimeMs);
01151 
01152     ~system_scoped_lock ();
01153 };
01154 
01155 
01159 }  // namespace stm
01160 
01161 
01162 // Include number format base class implementation.
01163 #include <stm/impl/divxaids.hpp>
01164 
01165 
01167 namespace stm
01168 {
01169 
01170 
01175 
01176 
01177 struct fmtflags
01178 {
01180     enum
01181     {
01182         NoFlags   = 0x00000000,  
01183         NoPrefix  = 0x00000001,  
01184         LowerCase = 0x00000002   
01185     };
01186 };
01187 
01188 
01192 template <typename UnsignedT, dword DefaultFlags = fmtflags::NoFlags>
01193 class hexfmt :
01194     public fmtflags,
01195     private local::xhexfmt<UnsignedT>
01196 {
01198     typedef local::xhexfmt<UnsignedT> impl;
01199 
01200 public:
01202     static const dword defaultFlags = DefaultFlags;
01203 
01205     typedef UnsignedT value_type;
01206 
01211     hexfmt (value_type val = 0, dword flags = defaultFlags);
01212 
01215     hexfmt (value_type val, bool noprefix);
01216 
01218     operator UnsignedT () const;
01219 
01221     dword flags () const;
01222 
01224     dword flags (dword newFlags);
01225 
01227     bool noprefix () const;
01228 
01230     bool noprefix (bool nopr);
01231 
01234     template <class StringT> operator StringT () const;
01235 
01238     template <class StringT, class IteratorT>
01239     static StringT dump (IteratorT first, IteratorT last);
01240 };
01241 
01244 template <class OStreamT, typename UnsignedT, dword DefaultFlags>
01245 OStreamT &operator<< (OStreamT &os, const hexfmt<UnsignedT, DefaultFlags> &val);
01246 
01247 
01251 template <typename ElemT, dword DefaultFlags>
01252 class hexfmt<ElemT *, DefaultFlags> :
01253     public fmtflags,
01254     private local::xhexfmt<ElemT *>
01255 {
01257     typedef local::xhexfmt<ElemT *> impl;
01258 
01259 public:
01261     static const dword defaultFlags = DefaultFlags;
01262 
01264     typedef ElemT value_type;
01265 
01270     hexfmt (value_type *ptr = NULL, dword flags = defaultFlags);
01271 
01274     hexfmt (value_type *ptr, bool noprefix);
01275 
01277     operator ElemT * () const;
01278 
01280     dword flags () const;
01281 
01283     dword flags (dword newFlags);
01284 
01286     bool noprefix () const;
01287 
01289     bool noprefix (bool nopr);
01290 
01293     template <class StringT> operator StringT () const;
01294 };
01295 
01298 template <class OStreamT, typename ElemT, dword DefaultFlags>
01299 OStreamT &operator<< (OStreamT &os, const hexfmt<ElemT *, DefaultFlags> &ptr);
01300 
01301 
01306 template <typename FloatT>
01307 class fixedfmt : private local::xfixedfmt<FloatT>
01308 {
01310     typedef local::xfixedfmt<FloatT> impl;
01311 
01312 public:
01314     typedef FloatT value_type;
01315 
01318     fixedfmt (dword precision, value_type val = 0);
01319 
01321     operator FloatT () const;
01322 
01324     dword precision () const;
01325 
01327     dword precision (dword prec);
01328 };
01329 
01332 template <class OStreamT, typename FloatT>
01333 OStreamT &operator<< (OStreamT &os, const fixedfmt<FloatT> &val);
01334 
01335 
01339 template <typename CharT>
01340 struct space : public std::unary_function<CharT, bool>
01341 {
01343     bool operator() (CharT c) const;
01344 };
01345 
01346 
01350 template <typename CharT>
01351 struct nospace : public std::unary_function<CharT, bool>
01352 {
01354     bool operator() (CharT c) const;
01355 };
01356 
01357 
01360 template <typename ScalarT>
01361 dword nrOfSetBits (ScalarT value);
01362 
01363 
01367 template <class StringT>
01368 typename StringT::size_type clamped_offset
01369 (
01370     const StringT &str,
01371     typename StringT::size_type pos
01372 );
01373 
01374 
01378 template <class StringT>
01379 typename StringT::size_type clamped_rest
01380 (
01381     const StringT &str,
01382     typename StringT::size_type pos
01383 );
01384 
01385 
01389 template <class StringT>
01390 StringT trim_back
01391 (
01392     const StringT &str
01393 );
01394 
01395 
01399 template <class StringT>
01400 StringT trim_back
01401 (
01402     const StringT &str,
01403     typename StringT::size_type pos
01404 );
01405 
01406 
01409 template <class StringT>
01410 typename StringT::size_type find_trim_back
01411 (
01412     const StringT &str
01413 );
01414 
01415 
01418 template <class StringT>
01419 typename StringT::size_type find_trim_back
01420 (
01421     const StringT &str,
01422     typename StringT::size_type pos
01423 );
01424 
01425 
01429 template <class StringT>
01430 typename StringT::size_type find_token_end
01431 (
01432     const StringT &str,
01433     typename StringT::size_type pos = 0
01434 );
01435 
01436 
01440 template <class StringT>
01441 StringT trim_back
01442 (
01443     const StringT &str,
01444     const StringT &sepchars
01445 );
01446 
01447 
01451 template <class StringT>
01452 StringT trim_back
01453 (
01454     const StringT &str,
01455     const StringT &sepchars,
01456     typename StringT::size_type pos
01457 );
01458 
01459 
01462 template <class StringT>
01463 typename StringT::size_type find_trim_back
01464 (
01465     const StringT &str,
01466     const StringT &sepchars
01467 );
01468 
01469 
01472 template <class StringT>
01473 typename StringT::size_type find_trim_back
01474 (
01475     const StringT &str,
01476     const StringT &sepchars,
01477     typename StringT::size_type pos
01478 );
01479 
01480 
01484 template <class StringT>
01485 typename StringT::size_type find_token_end
01486 (
01487     const StringT &str,
01488     const StringT &sepchars,
01489     typename StringT::size_type pos = 0
01490 );
01491 
01492 
01496 template <class StringT>
01497 StringT trim_front
01498 (
01499     const StringT &str,
01500     typename StringT::size_type pos = 0
01501 );
01502 
01503 
01506 template <class StringT>
01507 typename StringT::size_type find_trim_front
01508 (
01509     const StringT &str,
01510     typename StringT::size_type pos = 0
01511 );
01512 
01513 
01517 template <class StringT>
01518 StringT trim_front
01519 (
01520     const StringT &str,
01521     const StringT &sepchars,
01522     typename StringT::size_type pos = 0
01523 );
01524 
01525 
01529 template <class StringT>
01530 typename StringT::size_type find_trim_front
01531 (
01532     const StringT &str,
01533     const StringT &sepchars,
01534     typename StringT::size_type pos = 0
01535 );
01536 
01537 
01541 template <class StringT>
01542 StringT trim (const StringT &str);
01543 
01544 
01548 template <class StringT>
01549 StringT trim (const StringT &str, const StringT &sepchars);
01550 
01551 
01555 }  // namespace stm
01556 
01557 
01558 // Include inline and template implementation.
01559 #include <stm/impl/divxaids.hpp>
01560 
01561 
01562 #endif  // STM_DIVAIDS_HPP

© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).