Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::ReferencedBase Class Reference

The primary base class. More...

`#include <inti/base.h>`

Inheritance diagram for Inti::ReferencedBase:

List of all members.

## Public Member Functions

- bool is_referenced () const
    The referenced flag setting.
- virtual void ref ()
    Increase an object's reference count by one.
- virtual void unref ()
    Decrease an object's reference count by one.

## Protected Member Functions

- ReferencedBase ()
    Constructor.
- virtual ~ReferencedBase ()=0
    Destructor.
- void set_referenced (bool reference)
    Set the internal referenced flag.

## Detailed Description

The primary base class.

ReferencedBase is a reference counting base class. It implements the reference counting features required by the Inti smart pointer, Inti::Pointer<>.

## Member Function Documentation

bool Inti::ReferencedBase::is_referenced | ( |  | ) | const

| The referenced flag setting. Returns: true if unref() must be explicitly called on this object.

void Inti::ReferencedBase::set_referenced | ( | bool | reference | ) | `[protected]`

  | Set the internal referenced flag. Parameters:
  reference | Set true if the initial reference count must be removed by owner.
Called by derived classes to set the referenced flag. A G::Object sets this flag to true , indicating that it owns the initial reference count and unref() must be called. As a general rule a Gtk::Object sets this flag to false, indicating that the initial reference count is floating and unref() only needs to be called if you take ownership. If you pass a Gtk::Object to an owner or add a Gtk::Widget to a container you only need to call unref() if you called ref().

virtual void Inti::ReferencedBase::unref | ( |  | ) | `[virtual]`

| Decrease an object's reference count by one. After this call, if the object reference is zero and the object was allocated on the heap, delete is automatically called. You don't need to call delete on objects derived from ReferenceBase. Reimplemented in Inti::G::AsyncQueue, Inti::G::IOChannel, Inti::G::Object, and Inti::ReferencedObject.

The documentation for this class was generated from the following file:

- base.h

Main Page - Footer