Main Page - Header
Author: The Inti Development Team

Reference Manual

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

# base.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00024
    00025 #ifndef INTI_BASE_H
    00026 #define INTI_BASE_H
    00027
    00028 #ifndef INTI_POINTER_H
    00029 #include <inti/pointer.h>
    00030 #endif
    00031
    00032 #ifndef INTI_UTF_STRING_H
    00033 #include <inti/utf-string.h>
    00034 #endif
    00035
    00036 namespace Inti {
    00037
    00044
    00045 class ReferencedBase
    00046 {
    00047         template<typename T> friend class Pointer;
    00048
    00049         ReferencedBase(const ReferencedBase&);
    00050         ReferencedBase& operator=(const ReferencedBase&);
    00051
    00052         bool referenced;
    00053
    00054 protected:
    00055         ReferencedBase();
    00057
    00058         virtual ~ReferencedBase() = 0;
    00060
    00061         void set_referenced(bool reference);
    00071
    00072 public:
    00073         bool is_referenced() const;
    00076
    00077         virtual void ref();
    00079
    00080         virtual void unref();
    00085 };
    00086
    00087 } // namespace Inti
    00088
    00089 #endif // INTI_BASE_H
    00090

Main Page - Footer