12 #pragma warning(disable : 4996)
35 virtual void SetName(
const std::string _name)
58 virtual const std::string &
GetName()
const
83 if (ptr) ++ptr->nReferences;
88 if (ptr) ++ptr->nReferences;
92 if (r.ptr) r.ptr->nReferences++;
93 if (ptr && --ptr->nReferences == 0)
delete ptr;
100 if (p) p->nReferences++;
101 if (ptr && --ptr->nReferences == 0)
delete ptr;
107 if (ptr && --ptr->nReferences == 0)
delete ptr;
123 operator bool()
const {
return ptr != 0;}
124 bool operator<(const Reference<T> &r)
const
131 void OpenURL(
const std::string urlString);
154 return ::tolower ( ch );
161 std::transform (str.begin (), str.end (), str.begin (),
to_lower());
169 for (
size_t i = 0; i < str.length(); ++i)
173 str[i] = (char)::toupper(str[i]);
178 str[i] = (char)::tolower(str[i]);
180 caps = str[i] ==
' ';
187 return ::toupper(c1) == ::toupper(c2);
191 bool inline cmpNoCase(
const std::string &s1,
const std::string &s2)
193 std::string::const_iterator pos;
194 pos = std::search (s1.begin(),s1.end(),
197 return (pos != s1.end());
202 #endif //LWPP_UTILITY