ucommon

ucommon/object.h File Reference

A common object base class with auto-pointer support. More...

#include <ucommon/platform.h>
#include <ucommon/generics.h>
#include <stdlib.h>
Include dependency graph for object.h:

Go to the source code of this file.

Data Structures

class  auto_object
 A general purpose smart pointer helper class. More...
class  CountedObject
 A base class for reference counted objects. More...
class  Object
 A common base class for all managed objects. More...
class  object_pointer< T, P >
 Typed smart pointer class. More...
class  object_value< T, O >
 Template for embedding a data structure into a reference counted object. More...
class  sarray< T >
 Generate a typed sparse managed object array. More...
class  sparse_array
 A sparse array of managed objects. More...

Functions

Objectcopy (Object *object)
 Convenience function to access object copy.
void release (Object *object)
 Convenience function to access object release.
void retain (Object *object)
 Convenience function to access object retention.

Detailed Description

A common object base class with auto-pointer support.

A common object class is used which may be referenced counted and associated with a smart auto-pointer class. A lot of the things found here were inspired by working with Objective-C. Many of the classes are designed to offer automatic heap management through smart pointers and temporary objects controlled through the scope of the stack frame of method calls.

Definition in file object.h.


Function Documentation

Object* copy ( Object object) [inline]

Convenience function to access object copy.

Parameters:
objectwe are copying.

Definition at line 507 of file object.h.

Here is the call graph for this function:

void release ( Object object) [inline]

Convenience function to access object release.

Parameters:
objectwe are releasing.

Definition at line 500 of file object.h.

void retain ( Object object) [inline]

Convenience function to access object retention.

Parameters:
objectwe are retaining.

Definition at line 493 of file object.h.