30 #ifndef _UCOMMON_OBJECT_H_
31 #define _UCOMMON_OBJECT_H_
33 #ifndef _UCOMMON_CPR_H_
37 #ifndef _UCOMMON_GENERICS_H_
41 #ifndef _UCOMMON_PROTOCOLS_H_
59 volatile unsigned count;
80 virtual void dealloc(
void);
118 void retain(
void) __OVERRIDE;
124 void release(
void) __OVERRIDE;
155 AutoObject(
const AutoObject &
pointer);
183 bool operator!()
const;
189 operator bool()
const;
244 virtual ~SparseObjects();
251 unsigned count(
void);
267 __DELETE_DEFAULTS(
sarray);
282 inline T *
get(
unsigned offset) {
293 return reference_cast<T>(
get(offset));
296 inline T& at(
unsigned offset) {
300 inline const T* operator()(
unsigned offset)
const {
304 inline void operator()(
unsigned offset, T value) {
310 __LOCAL ObjectProtocol *create(
void) __FINAL {
349 return protocol_cast<T*>(object);
357 return reference_cast<T>(object);
365 return protocol_cast<T*>(object);
372 inline T*
get(void)
const {
373 return protocol_cast<T*>(object);
393 inline operator bool()
const {
394 return object != NULL;
401 return object == NULL;