GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

relation.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC 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 GFC_ATK_RELATION_HH 00026 #define GFC_ATK_RELATION_HH 00027 00028 #ifndef GFC_G_OBJECT_HH 00029 #include <gfc/glib/object.hh> 00030 #endif 00031 00032 #ifndef GFC_ATK_UTIL_HH 00033 #include <gfc/atk/util.hh> 00034 #endif 00035 00036 #ifndef __ATK_RELATION_H__ 00037 #include <atk/atkrelationset.h> 00038 #endif 00039 00040 #ifndef _CPP_VECTOR 00041 #include <vector> 00042 #endif 00043 00044 namespace GFC { 00045 00046 namespace Atk { 00047 00048 class Object; 00049 00056 00057 class Relation : public G::Object 00058 { 00059 friend class G::Object; 00060 00061 Relation(const Relation&); 00062 Relation& operator=(const Relation&); 00063 00064 protected: 00067 00068 explicit Relation(AtkRelation *relation, bool owns_reference = true); 00075 00077 00078 public: 00081 00082 Relation(const std::vector<Atk::Object*>& targets, RelationType relationship); 00087 00088 virtual ~Relation(); 00090 00094 00095 AtkRelation* atk_relation() const; 00097 00098 operator AtkRelation* () const; 00100 00101 RelationType get_relation_type() const; 00104 00105 bool get_target(std::vector<Atk::Object*>& targets) const; 00109 00111 }; 00112 00117 00118 class RelationSet : public G::Object 00119 { 00120 friend class G::Object; 00121 00122 RelationSet(const RelationSet&); 00123 RelationSet& operator=(const RelationSet&); 00124 00125 protected: 00128 00129 explicit RelationSet(AtkRelationSet *set, bool owns_reference = true); 00136 00138 00139 public: 00142 00143 RelationSet(); 00145 00146 virtual ~RelationSet(); 00148 00152 00153 AtkRelationSet* atk_relation_set() const; 00155 00156 operator AtkRelationSet* () const; 00158 00159 bool contains(RelationType relationship) const; 00164 00165 int get_n_relations() const; 00168 00169 Relation* get_relation(int index) const; 00173 00174 Relation* get_relation(RelationType relationship) const; 00178 00182 00183 void add(Relation& relation); 00186 00187 void remove(Relation& relation); 00193 00195 }; 00196 00197 } // namespace Atk 00198 00199 } // namespace GFC 00200 00201 #include <gfc/atk/inline/relation.inl> 00202 00203 #endif // GFC_ATK_RELATION_HH 00204

Generated on Tue Aug 24 00:34:31 2004 for GFC-UI by doxygen 1.3.8