- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# D:/Programmation/Sources/Tensor2/Utils/src/frost_utils_uint_impl.cpp

Go to the documentation of this file.

    00001 #include "frost_utils_types.h"
    00002
    00003 #include <cmath>
    00004
    00005 namespace Frost {
    00006
    00007 template <class T>
    00008 s_uint_t<T>::s_uint_t()
    00009 {
    00010     mType_ = INTEGER;
    00011     uiValue_ = 0u;
    00012 }
    00013
    00014 template <class T>
    00015 s_uint_t<T>::s_uint_t(const T& uiValue)
    00016 {
    00017     mType_ = INTEGER;
    00018     uiValue_ = uiValue;
    00019 }
    00020
    00021 template <class T>
    00022 s_uint_t<T>::s_uint_t(const Type& mType)
    00023 {
    00024     mType_ = mType;
    00025     uiValue_ = 0u;
    00026 }
    00027
    00028 template <class T>
    00029 s_uint_t<T>::s_uint_t(const float& fValue)
    00030 {
    00031     mType_ = INTEGER;
    00032     uiValue_ = static_cast<T>(round(fValue));
    00033 }
    00034
    00035 template <class T>
    00036 s_uint_t<T>::s_uint_t(const double& dValue)
    00037 {
    00038     mType_ = INTEGER;
    00039     uiValue_ = static_cast<T>(round(dValue));
    00040 }
    00041
    00042 template <class T>
    00043 s_uint_t<T>::s_uint_t(const s_bool& bValue)
    00044 {
    00045     mType_ = INTEGER;
    00046     if (bValue)
    00047         uiValue_ = 1;
    00048     else
    00049         uiValue_ = 0;
    00050 }
    00051
    00052 template <class T>
    00053 void s_uint_t<T>::Clamp(const s_uint_t& uiMin, const s_uint_t& uiMax)
    00054 {
    00055     uiValue_ = (*this < uiMax) ? ((*this > uiMin) ? uiValue_ : uiMin.uiValue_) : uiMax.uiValue_;
    00056 }
    00057
    00058 template <class T>
    00059 s_uint_t<T> s_uint_t<T>::GetNearestPowerOfTwo() const
    00060 {
    00061     if (IsValid())
    00062     {
    00063         uint i = 1;
    00064         while (uiValue_ > i)
    00065         {
    00066             i = i << 1;
    00067         }
    00068
    00069         return i;
    00070     }
    00071     else
    00072         return s_uint_t(INTEGER_NAN);
    00073 }
    00074
    00075 template <class T>
    00076 typename s_uint_t<T>::Type s_uint_t<T>::GetType() const
    00077 {
    00078     return mType_;
    00079 }
    00080
    00081 template <class T>
    00082 s_bool s_uint_t<T>::IsInfinite() const
    00083 {
    00084     return (mType_ == INTEGER_INF);
    00085 }
    00086
    00087 template <class T>
    00088 s_bool s_uint_t<T>::IsInRange(const s_uint_t<T>& uiMin, const s_uint_t<T>& uiMax) const
    00089 {
    00090     return ( (uiMin <= (*this)) && ((*this) <= uiMax) );
    00091 }
    00092
    00093 template <class T>
    00094 s_bool s_uint_t<T>::IsNaN() const
    00095 {
    00096     return (mType_ == INTEGER_NAN);
    00097 }
    00098
    00099 template <class T>
    00100 s_bool s_uint_t<T>::IsNull() const
    00101 {
    00102     return ( IsValid() && (uiValue_ == 0u) );
    00103 }
    00104
    00105 template <class T>
    00106 s_bool s_uint_t<T>::IsValid() const
    00107 {
    00108     return (mType_ == INTEGER);
    00109 }
    00110
    00111 template <class T>
    00112 void s_uint_t<T>::Pow(const s_uint_t& uiPower)
    00113 {
    00114     if (IsValid() && uiPower.IsValid())
    00115     {
    00116         uiValue_ = static_cast<uint>(pow(
    00117             static_cast<float>(uiValue_),
    00118             static_cast<int>(uiPower.Get())
    00119         ));
    00120     }
    00121 }
    00122
    00123 template <class T>
    00124 void s_uint_t<T>::Randomize(const s_uint_t& uiMin, const s_uint_t& uiMax)
    00125 {
    00126     if (uiMin.IsValid() && uiMax.IsValid())
    00127     {
    00128         mType_ = INTEGER;
    00129         if (uiMax.uiValue_ < uiMin.uiValue_)
    00130             uiValue_ = uiMin.uiValue_;
    00131         else
    00132         {
    00133             T uiRange = uiMax.uiValue_ - uiMin.uiValue_ + 1;
    00134             uiValue_ = static_cast<T>(uiRange*(rand()/(RAND_MAX+1.0))) + uiMin.uiValue_;
    00135         }
    00136     }
    00137 }
    00138
    00139 template <class T>
    00140 void s_uint_t<T>::SetInfinite()
    00141 {
    00142     mType_ = INTEGER_INF;
    00143     uiValue_ = 0u;
    00144 }
    00145
    00146 template <class T>
    00147 void s_uint_t<T>::SetNaN()
    00148 {
    00149     mType_ = INTEGER_NAN;
    00150     uiValue_ = 0u;
    00151 }
    00152
    00153 template <class T>
    00154 s_uint_t<T>& s_uint_t<T>::operator ++ ()
    00155 {
    00156     if (IsValid())
    00157     {
    00158         ++uiValue_;
    00159     }
    00160     return *this;
    00161 }
    00162
    00163 template <class T>
    00164 s_uint_t<T> s_uint_t<T>::operator ++ (int)
    00165 {
    00166     if (IsValid())
    00167     {
    00168         return uiValue_++;
    00169     }
    00170     else
    00171         return *this;
    00172 }
    00173
    00174 template <class T>
    00175 s_int_t<typename TypeTraits<T>::SignedType> s_uint_t<T>::operator - () const
    00176 {
    00177     if (!IsNaN())
    00178     {
    00179         if (IsInfinite())
    00180             return s_int_t<typename TypeTraits<T>::SignedType>::INFMINUS;
    00181         else
    00182             return -static_cast<typename TypeTraits<T>::SignedType>(uiValue_);
    00183     }
    00184     else
    00185         return s_int_t<typename TypeTraits<T>::SignedType>::NaN;
    00186 }
    00187
    00188 template <class T>
    00189 s_uint_t<T>& s_uint_t<T>::operator -- ()
    00190 {
    00191     if (IsValid())
    00192     {
    00193         --uiValue_;
    00194     }
    00195     return *this;
    00196 }
    00197
    00198 template <class T>
    00199 s_uint_t<T> s_uint_t<T>::operator -- (int)
    00200 {
    00201     if (IsValid())
    00202     {
    00203         return uiValue_--;
    00204     }
    00205     else
    00206         return *this;
    00207 }
    00208
    00209 template <class T>
    00210 s_uint_t<T> s_uint_t<T>::operator + (const s_uint_t& uiValue) const
    00211 {
    00212     if (uiValue.IsNaN() || IsNaN())
    00213         return s_uint_t::NaN;
    00214
    00215     if (!uiValue.IsValid() || !this->IsValid())
    00216         return s_uint_t::INF;
    00217     else
    00218     {
    00219         return uiValue_ + uiValue.uiValue_;
    00220     }
    00221 }
    00222
    00223 template <class T>
    00224 s_uint_t<T> s_uint_t<T>::operator - (const s_uint_t& uiValue) const
    00225 {
    00226     if (uiValue.IsNaN() || IsNaN())
    00227         return s_uint_t::NaN;
    00228
    00229     if (!uiValue.IsValid() || !this->IsValid())
    00230         return s_uint_t::INF;
    00231     else
    00232     {
    00233         return uiValue_ - uiValue.uiValue_;
    00234     }
    00235 }
    00236
    00237 template <class T>
    00238 s_uint_t<T> s_uint_t<T>::operator * (const s_uint_t& uiValue) const
    00239 {
    00240     if (uiValue.IsNaN() || IsNaN())
    00241         return s_uint_t::NaN;
    00242
    00243     if (!uiValue.IsValid())
    00244     {
    00245         if (this->IsNull())
    00246             return s_uint_t::NaN;
    00247         else
    00248             return s_uint_t::INF;
    00249     }
    00250     else if (!this->IsValid())
    00251     {
    00252         if (uiValue.IsNull())
    00253             return s_uint_t::NaN;
    00254         else
    00255             return s_uint_t::INF;
    00256     }
    00257     else
    00258     {
    00259         return uiValue_ * uiValue.uiValue_;
    00260     }
    00261 }
    00262
    00263 template <class T>
    00264 s_uint_t<T> s_uint_t<T>::operator / (const s_uint_t& uiValue) const
    00265 {
    00266     if (uiValue.IsNaN() || IsNaN() || uiValue.IsNull())
    00267         return s_uint_t::NaN;
    00268
    00269     if (!uiValue.IsValid())
    00270     {
    00271         if (!this->IsValid())
    00272             return s_uint_t::NaN;
    00273         else
    00274             return 0u;
    00275     }
    00276     else if (!this->IsValid())
    00277     {
    00278         return s_uint_t::INF;
    00279     }
    00280     else
    00281     {
    00282         return uiValue_ / uiValue.uiValue_;
    00283     }
    00284 }
    00285
    00286 template <class T>
    00287 s_uint_t<T> s_uint_t<T>::operator % (const s_uint_t& uiValue) const
    00288 {
    00289     if (uiValue.IsNaN() || IsNaN() || uiValue.IsNull())
    00290         return s_uint_t::NaN;
    00291
    00292     if (!uiValue.IsValid())
    00293     {
    00294         if (!this->IsValid())
    00295             return 0u;
    00296         else
    00297             return *this;
    00298     }
    00299     else if (!this->IsValid())
    00300     {
    00301         return 0u;
    00302     }
    00303     else
    00304     {
    00305         return uiValue_ % uiValue.uiValue_;
    00306     }
    00307 }
    00308
    00309 template <class T>
    00310 void s_uint_t<T>::operator += (const s_uint_t& uiValue)
    00311 {
    00312     *this = *this + uiValue;
    00313 }
    00314
    00315 template <class T>
    00316 void s_uint_t<T>::operator -= (const s_uint_t& uiValue)
    00317 {
    00318     *this = *this - uiValue;
    00319 }
    00320
    00321 template <class T>
    00322 void s_uint_t<T>::operator *= (const s_uint_t& uiValue)
    00323 {
    00324     *this = *this * uiValue;
    00325 }
    00326
    00327 template <class T>
    00328 void s_uint_t<T>::operator /= (const s_uint_t& uiValue)
    00329 {
    00330     *this = *this / uiValue;
    00331 }
    00332
    00333 template <class T>
    00334 void s_uint_t<T>::operator %= (const s_uint_t& uiValue)
    00335 {
    00336     *this = *this % uiValue;
    00337 }
    00338
    00339 template <class T>
    00340 s_uint_t<T>& s_uint_t<T>::operator << (const s_uint_t& uiValue)
    00341 {
    00342     if (IsValid())
    00343     {
    00344         uiValue_ = uiValue_ << uiValue.uiValue_;
    00345     }
    00346     return *this;
    00347 }
    00348
    00349 template <class T>
    00350 s_bool s_uint_t<T>::operator == (const s_uint_t& uiValue) const
    00351 {
    00352     if (uiValue.IsNaN() || IsNaN())
    00353         return false;
    00354     else
    00355     {
    00356         if ( (mType_ == uiValue.mType_) && (mType_ != INTEGER) )
    00357             return true;
    00358
    00359         return (uiValue_ == uiValue.uiValue_);
    00360     }
    00361 }
    00362
    00363 template <class T>
    00364 s_bool s_uint_t<T>::operator != (const s_uint_t& uiValue) const
    00365 {
    00366     if (uiValue.IsNaN() || IsNaN())
    00367         return false;
    00368     else
    00369     {
    00370         if (mType_ != uiValue.mType_)
    00371             return true;
    00372
    00373         return (uiValue_ != uiValue.uiValue_);
    00374     }
    00375 }
    00376
    00377 template <class T>
    00378 s_bool s_uint_t<T>::operator < (const s_uint_t& uiValue) const
    00379 {
    00380     if (uiValue.IsNaN() || IsNaN())
    00381         return false;
    00382     else
    00383     {
    00384         if ( (mType_ == uiValue.mType_) && (mType_ != INTEGER) )
    00385             return false;
    00386
    00387         if (mType_ == INTEGER_INF)
    00388             return false;
    00389
    00390         if (uiValue.mType_ == INTEGER_INF)
    00391             return true;
    00392
    00393         return (uiValue_ < uiValue.uiValue_);
    00394     }
    00395 }
    00396
    00397 template <class T>
    00398 s_bool s_uint_t<T>::operator > (const s_uint_t& uiValue) const
    00399 {
    00400     if (uiValue.IsNaN() || IsNaN())
    00401         return false;
    00402     else
    00403     {
    00404         if ( (mType_ == uiValue.mType_) && (mType_ != INTEGER) )
    00405             return false;
    00406
    00407         if (mType_ == INTEGER_INF)
    00408             return true;
    00409
    00410         if (uiValue.mType_ == INTEGER_INF)
    00411             return false;
    00412
    00413         return (uiValue_ > uiValue.uiValue_);
    00414     }
    00415 }
    00416
    00417 template <class T>
    00418 s_bool s_uint_t<T>::operator <= (const s_uint_t& uiValue) const
    00419 {
    00420     if (uiValue.IsNaN() || IsNaN())
    00421         return false;
    00422     else
    00423     {
    00424         if ( (mType_ == uiValue.mType_) && (mType_ != INTEGER) )
    00425             return true;
    00426
    00427         if (mType_ == INTEGER_INF)
    00428             return false;
    00429
    00430         if (uiValue.mType_ == INTEGER_INF)
    00431             return true;
    00432
    00433         return (uiValue_ <= uiValue.uiValue_);
    00434     }
    00435 }
    00436
    00437 template <class T>
    00438 s_bool s_uint_t<T>::operator >= (const s_uint_t& uiValue) const
    00439 {
    00440     if (uiValue.IsNaN() || IsNaN())
    00441         return false;
    00442     else
    00443     {
    00444         if ( (mType_ == uiValue.mType_) && (mType_ != INTEGER) )
    00445             return true;
    00446
    00447         if (mType_ == INTEGER_INF)
    00448             return true;
    00449
    00450         if (uiValue.mType_ == INTEGER_INF)
    00451             return false;
    00452
    00453         return (uiValue_ >= uiValue.uiValue_);
    00454     }
    00455 }
    00456
    00457 template <class T>
    00458 s_uint_t<T> s_uint_t<T>::Min(const s_uint_t& uiLeft, const s_uint_t& uiRight)
    00459 {
    00460     return (uiLeft >= uiRight) ? uiRight : uiLeft;
    00461 }
    00462
    00463 template <class T>
    00464 s_uint_t<T> s_uint_t<T>::Max(const s_uint_t& uiLeft, const s_uint_t& uiRight)
    00465 {
    00466     return (uiLeft <= uiRight) ? uiRight : uiLeft;
    00467 }
    00468
    00469 template <class T>
    00470 s_uint_t<T> s_uint_t<T>::Clamp(const s_uint_t& uiValue, const s_uint_t& uiMin, const s_uint_t& uiMax)
    00471 {
    00472     return (uiValue < uiMax) ? ((uiValue > uiMin) ? uiValue : uiMin) : uiMax;
    00473 }
    00474
    00475 template <class T>
    00476 s_uint_t<T> s_uint_t<T>::Random(const s_uint_t& uiMin, const s_uint_t& uiMax)
    00477 {
    00478     if (uiMin.IsValid() && uiMax.IsValid())
    00479     {
    00480         if (uiMax.uiValue_ < uiMin.uiValue_)
    00481             return uiMin;
    00482         else
    00483         {
    00484             T uiRange = uiMax.uiValue_ - uiMin.uiValue_ + 1;
    00485             return static_cast<T>(uiRange*(rand()/(RAND_MAX+1.0))) + uiMin.uiValue_;
    00486         }
    00487     }
    00488     else
    00489         return s_uint_t::NaN;
    00490 }
    00491
    00492 template<class T>
    00493 const s_uint_t<T> s_uint_t<T>::NaN = s_uint_t<T>(INTEGER_NAN);
    00494 template<class T>
    00495 const s_uint_t<T> s_uint_t<T>::INF = s_uint_t<T>(INTEGER_INF);
    00496
    00497 template<class T>
    00498 s_uint_t<T> operator + (const T& uiLeft, const s_uint_t<T>& uiRight)
    00499 {
    00500     return s_uint_t<T>(uiLeft) + uiRight;
    00501 }
    00502
    00503 template<class T>
    00504 s_uint_t<T> operator - (const T& uiLeft, const s_uint_t<T>& uiRight)
    00505 {
    00506     return s_uint_t<T>(uiLeft) - uiRight;
    00507 }
    00508
    00509 template<class T>
    00510 s_uint_t<T> operator * (const T& uiLeft, const s_uint_t<T>& uiRight)
    00511 {
    00512     return s_uint_t<T>(uiLeft) * uiRight;
    00513 }
    00514
    00515 template<class T>
    00516 s_uint_t<T> operator / (const T& uiLeft, const s_uint_t<T>& uiRight)
    00517 {
    00518     return s_uint_t<T>(uiLeft) / uiRight;
    00519 }
    00520
    00521 template<class T>
    00522 s_uint_t<T> operator % (const T& uiLeft, const s_uint_t<T>& uiRight)
    00523 {
    00524     return s_uint_t<T>(uiLeft) % uiRight;
    00525 }
    00526
    00527 template<class T>
    00528 s_uint_t<T> operator + (const typename TypeTraits<T>::SignedType& iLeft, const s_uint_t<T>& uiRight)
    00529 {
    00530     return s_uint_t<T>(s_int_t<typename TypeTraits<T>::SignedType>(iLeft)) + uiRight;
    00531 }
    00532
    00533 template<class T>
    00534 s_uint_t<T> operator - (const typename TypeTraits<T>::SignedType& iLeft, const s_uint_t<T>& uiRight)
    00535 {
    00536     return s_uint_t<T>(s_int_t<typename TypeTraits<T>::SignedType>(iLeft)) - uiRight;
    00537 }
    00538
    00539 template<class T>
    00540 s_uint_t<T> operator * (const typename TypeTraits<T>::SignedType& iLeft, const s_uint_t<T>& uiRight)
    00541 {
    00542     return s_uint_t<T>(s_int_t<typename TypeTraits<T>::SignedType>(iLeft)) * uiRight;
    00543 }
    00544
    00545 template<class T>
    00546 s_uint_t<T> operator / (const typename TypeTraits<T>::SignedType& iLeft, const s_uint_t<T>& uiRight)
    00547 {
    00548     return s_uint_t<T>(s_int_t<typename TypeTraits<T>::SignedType>(iLeft)) / uiRight;
    00549 }
    00550
    00551 template<class T>
    00552 s_uint_t<T> operator % (const typename TypeTraits<T>::SignedType& iLeft, const s_uint_t<T>& uiRight)
    00553 {
    00554     return s_uint_t<T>(s_int_t<typename TypeTraits<T>::SignedType>(iLeft)) % uiRight;
    00555 }
    00556
    00557 template class s_uint_t<uchar>;
    00558 template class s_uint_t<ushort>;
    00559 template class s_uint_t<uint>;
    00560 template class s_uint_t<ulong>;
    00561 template class s_uint_t<unsigned long long>;
    00562
    00563 template s_uint_t<uchar> operator + (const uchar& uiLeft, const s_uint_t<uchar>& uiRight);
    00564 template s_uint_t<uchar> operator - (const uchar& uiLeft, const s_uint_t<uchar>& uiRight);
    00565 template s_uint_t<uchar> operator * (const uchar& uiLeft, const s_uint_t<uchar>& uiRight);
    00566 template s_uint_t<uchar> operator / (const uchar& uiLeft, const s_uint_t<uchar>& uiRight);
    00567 template s_uint_t<uchar> operator % (const uchar& uiLeft, const s_uint_t<uchar>& uiRight);
    00568
    00569 template s_uint_t<uchar> operator + (const char& uiLeft, const s_uint_t<uchar>& uiRight);
    00570 template s_uint_t<uchar> operator - (const char& uiLeft, const s_uint_t<uchar>& uiRight);
    00571 template s_uint_t<uchar> operator * (const char& uiLeft, const s_uint_t<uchar>& uiRight);
    00572 template s_uint_t<uchar> operator / (const char& uiLeft, const s_uint_t<uchar>& uiRight);
    00573 template s_uint_t<uchar> operator % (const char& uiLeft, const s_uint_t<uchar>& uiRight);
    00574
    00575 template s_uint_t<ushort> operator + (const ushort& uiLeft, const s_uint_t<ushort>& uiRight);
    00576 template s_uint_t<ushort> operator - (const ushort& uiLeft, const s_uint_t<ushort>& uiRight);
    00577 template s_uint_t<ushort> operator * (const ushort& uiLeft, const s_uint_t<ushort>& uiRight);
    00578 template s_uint_t<ushort> operator / (const ushort& uiLeft, const s_uint_t<ushort>& uiRight);
    00579 template s_uint_t<ushort> operator % (const ushort& uiLeft, const s_uint_t<ushort>& uiRight);
    00580
    00581 template s_uint_t<ushort> operator + (const short& uiLeft, const s_uint_t<ushort>& uiRight);
    00582 template s_uint_t<ushort> operator - (const short& uiLeft, const s_uint_t<ushort>& uiRight);
    00583 template s_uint_t<ushort> operator * (const short& uiLeft, const s_uint_t<ushort>& uiRight);
    00584 template s_uint_t<ushort> operator / (const short& uiLeft, const s_uint_t<ushort>& uiRight);
    00585 template s_uint_t<ushort> operator % (const short& uiLeft, const s_uint_t<ushort>& uiRight);
    00586
    00587 template s_uint_t<uint> operator + (const uint& uiLeft, const s_uint_t<uint>& uiRight);
    00588 template s_uint_t<uint> operator - (const uint& uiLeft, const s_uint_t<uint>& uiRight);
    00589 template s_uint_t<uint> operator * (const uint& uiLeft, const s_uint_t<uint>& uiRight);
    00590 template s_uint_t<uint> operator / (const uint& uiLeft, const s_uint_t<uint>& uiRight);
    00591 template s_uint_t<uint> operator % (const uint& uiLeft, const s_uint_t<uint>& uiRight);
    00592
    00593 template s_uint_t<uint> operator + (const int& uiLeft, const s_uint_t<uint>& uiRight);
    00594 template s_uint_t<uint> operator - (const int& uiLeft, const s_uint_t<uint>& uiRight);
    00595 template s_uint_t<uint> operator * (const int& uiLeft, const s_uint_t<uint>& uiRight);
    00596 template s_uint_t<uint> operator / (const int& uiLeft, const s_uint_t<uint>& uiRight);
    00597 template s_uint_t<uint> operator % (const int& uiLeft, const s_uint_t<uint>& uiRight);
    00598
    00599 template s_uint_t<ulong> operator + (const ulong& uiLeft, const s_uint_t<ulong>& uiRight);
    00600 template s_uint_t<ulong> operator - (const ulong& uiLeft, const s_uint_t<ulong>& uiRight);
    00601 template s_uint_t<ulong> operator * (const ulong& uiLeft, const s_uint_t<ulong>& uiRight);
    00602 template s_uint_t<ulong> operator / (const ulong& uiLeft, const s_uint_t<ulong>& uiRight);
    00603 template s_uint_t<ulong> operator % (const ulong& uiLeft, const s_uint_t<ulong>& uiRight);
    00604
    00605 template s_uint_t<ulong> operator + (const long& uiLeft, const s_uint_t<ulong>& uiRight);
    00606 template s_uint_t<ulong> operator - (const long& uiLeft, const s_uint_t<ulong>& uiRight);
    00607 template s_uint_t<ulong> operator * (const long& uiLeft, const s_uint_t<ulong>& uiRight);
    00608 template s_uint_t<ulong> operator / (const long& uiLeft, const s_uint_t<ulong>& uiRight);
    00609 template s_uint_t<ulong> operator % (const long& uiLeft, const s_uint_t<ulong>& uiRight);
    00610
    00611 template s_uint_t<ullong> operator + (const ullong& uiLeft, const s_uint_t<ullong>& uiRight);
    00612 template s_uint_t<ullong> operator - (const ullong& uiLeft, const s_uint_t<ullong>& uiRight);
    00613 template s_uint_t<ullong> operator * (const ullong& uiLeft, const s_uint_t<ullong>& uiRight);
    00614 template s_uint_t<ullong> operator / (const ullong& uiLeft, const s_uint_t<ullong>& uiRight);
    00615 template s_uint_t<ullong> operator % (const ullong& uiLeft, const s_uint_t<ullong>& uiRight);
    00616
    00617 template s_uint_t<ullong> operator + (const long long& uiLeft, const s_uint_t<ullong>& uiRight);
    00618 template s_uint_t<ullong> operator - (const long long& uiLeft, const s_uint_t<ullong>& uiRight);
    00619 template s_uint_t<ullong> operator * (const long long& uiLeft, const s_uint_t<ullong>& uiRight);
    00620 template s_uint_t<ullong> operator / (const long long& uiLeft, const s_uint_t<ullong>& uiRight);
    00621 template s_uint_t<ullong> operator % (const long long& uiLeft, const s_uint_t<ullong>& uiRight);
    00622
    00623 }