Containee classes

Name

Containee classes -- 

Synopsis


#include <gts.h>


#define     GTS_CONTAINEE_CLASS             (klass)
#define     GTS_CONTAINEE                   (obj)
#define     GTS_IS_CONTAINEE                (obj)
            GtsContaineeClass;
            GtsContainee;

GtsContaineeClass* gts_containee_class      (void);
GtsContainee* gts_containee_new             (GtsContaineeClass *klass);
gboolean    gts_containee_is_contained      (GtsContainee *item,
                                             GtsContainer *c);
void        gts_containee_replace           (GtsContainee *item,
                                             GtsContainee *with);

#define     GTS_SLIST_CONTAINEE_CLASS       (klass)
#define     GTS_SLIST_CONTAINEE             (obj)
#define     GTS_IS_SLIST_CONTAINEE          (obj)
            GtsSListContaineeClass;
            GtsSListContainee;

GtsSListContaineeClass* gts_slist_containee_class
                                            (void);

Description

Details

GTS_CONTAINEE_CLASS()

#define     GTS_CONTAINEE_CLASS(klass)

klass :


GTS_CONTAINEE()

#define     GTS_CONTAINEE(obj)

obj :


GTS_IS_CONTAINEE()

#define     GTS_IS_CONTAINEE(obj)

obj :


GtsContaineeClass

typedef struct {
  GtsObjectClass parent_class;

  void     (* add_container)    (GtsContainee *, GtsContainer *);
  void     (* remove_container) (GtsContainee *, GtsContainer *);
  void     (* foreach)          (GtsContainee *, GtsFunc, gpointer);
  gboolean (* is_contained)     (GtsContainee *, GtsContainer *);
  void     (* replace)          (GtsContainee *, GtsContainee *);
} GtsContaineeClass;


GtsContainee

typedef struct {
  GtsObject object;
} GtsContainee;

The containee object.

GtsObject object;

The parent object.


gts_containee_class ()

GtsContaineeClass* gts_containee_class      (void);

Returns :


gts_containee_new ()

GtsContainee* gts_containee_new             (GtsContaineeClass *klass);

klass :

Returns :


gts_containee_is_contained ()

gboolean    gts_containee_is_contained      (GtsContainee *item,
                                             GtsContainer *c);

item :

c :

Returns :


gts_containee_replace ()

void        gts_containee_replace           (GtsContainee *item,
                                             GtsContainee *with);

item :

with :


GTS_SLIST_CONTAINEE_CLASS()

#define     GTS_SLIST_CONTAINEE_CLASS(klass)

klass :


GTS_SLIST_CONTAINEE()

#define     GTS_SLIST_CONTAINEE(obj)

obj :


GTS_IS_SLIST_CONTAINEE()

#define     GTS_IS_SLIST_CONTAINEE(obj)

obj :


GtsSListContaineeClass

typedef struct {
  GtsContaineeClass parent_class;
} GtsSListContaineeClass;


GtsSListContainee

typedef struct {
  GtsContainee containee;

  GSList * containers;
} GtsSListContainee;

The singly-linked list containee object.

GtsContainee containee;

The parent object.

GSList *containers;

A list of GtsContainer containing this object.


gts_slist_containee_class ()

GtsSListContaineeClass* gts_slist_containee_class
                                            (void);

Returns :