25 #ifndef __DBUSXX_UTIL_H 26 #define __DBUSXX_UTIL_H 94 debug_log(
"%p: refcount dropped below zero!", __ref);
125 if (__cnt.one())
delete __ptr;
133 T &operator *()
const 138 T *operator ->()
const 140 if (__cnt.noref())
return 0;
147 if (__cnt.noref())
return 0;
169 if (__cnt.one())
delete __ptr;
176 if (__cnt.one())
delete __ptr;
184 T &operator *()
const 189 T *operator ->()
const 191 if (__cnt.noref())
return 0;
198 if (__cnt.noref())
return 0;
213 template <
class R,
class P>
218 virtual R call(P param)
const = 0;
224 template <
class R,
class P>
240 return _cb->call(param);
252 return _cb->call(param);
262 return _cb.get() == 0;
270 template <
class C,
class R,
class P>
283 return (_c->*_m)(param);
293 template <
typename T>
294 std::string
toString(
const T &thing,
int w = 0,
int p = 0)
296 std::ostringstream os;
297 os << std::setw(w) << std::setprecision(p) << thing;
303 #endif//__DBUSXX_UTIL_H
std::string toString(const T &thing, int w=0, int p=0)
create std::string from any number
DXXAPILOCAL void ref() const
DXXAPI LogFunction debug_log
DXXAPILOCAL void unref() const
RefPtr< Callback_Base< R, P > > _cb
R operator()(P param) const