// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGDAMM_REFERER_H
#define _LIBGDAMM_REFERER_H


#include <glibmm.h>

// -*- C++ -*- // this is for the .hg, I realize gensig puts one in

/* referer.h
 *
 * Copyright 2003 libgdamm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/interface.h>
#include <libgda/gda-referer.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaReferer GdaReferer;
typedef struct _GdaRefererClass GdaRefererClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class Referer_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{

namespace Gda
{

class Object;

/** Base class to know when on object is completely defined.
 *
 * @ingroup Miscellaneous
 */

class Referer : public Glib::Interface
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Referer CppObjectType;
  typedef Referer_Class CppClassType;
  typedef GdaReferer BaseObjectType;
  typedef GdaRefererIface BaseClassType;

private:
  friend class Referer_Class;
  static CppClassType referer_class_;

  // noncopyable
  Referer(const Referer&);
  Referer& operator=(const Referer&);

protected:
  Referer(); // you must derive from this class

  /** Called by constructors of derived classes. Provide the result of 
   * the Class init() function to ensure that it is properly 
   * initialized.
   * 
   * @param interface_class The Class object for the derived type.
   */
  explicit Referer(const Glib::Interface_Class& interface_class);

public:
  // This is public so that C++ wrapper instances can be
  // created for C instances of unwrapped types.
  // For instance, if an unexpected C type implements the C interface. 
  explicit Referer(GdaReferer* castitem);

protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Referer();

  static void add_interface(GType gtype_implementer);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GdaReferer*       gobj()       { return reinterpret_cast<GdaReferer*>(gobject_); }

  ///Provides access to the underlying C GObject.  
  const GdaReferer* gobj() const { return reinterpret_cast<GdaReferer*>(gobject_); }

private:

public:

  
  /** Tries to activate the object, does nothing if the object is already active.
   * @return <tt>true</tt> if the object is active after the call.
   */
  bool activate();
  
  /** Deactivates the object. This is the opposite to function activate().
   * If the object is already non active, then nothing happens.
   */
  void deactivate();
  
  /** Get the status of an object
   * @return <tt>true</tt> if the object is active.
   */
  bool is_active() const;

   
  /** Get the list of objects which are referenced by @a iface. The returned list is a
   * new list. If @a iface is not active, then the returned list is incomplete.
   * @return A new list of referenced objects.
   */
  Glib::SListHandle<Glib::RefPtr<Object> > get_ref_objects();
  
  /** Get the list of objects which are referenced by @a iface. The returned list is a
   * new list. If @a iface is not active, then the returned list is incomplete.
   * @return A new list of referenced objects.
   */
  Glib::SListHandle<Glib::RefPtr<const Object> > get_ref_objects() const;

  // TODO: How to wrap GHashTable?
  //_WRAP_METHOD(void replace_refs(GHashTable* replacements), gda_referer_replace_refs)

  // TODO: Find out what the purpose of gda_referer_get_ref_objects and
  // gda_referer_replace_refs are for and wrap them appropriately.
  
  
  /**
   * @par Prototype:
   * <tt>void on_my_%activated()</tt>
   */

  Glib::SignalProxy0< void > signal_activated();

  
  /**
   * @par Prototype:
   * <tt>void on_my_%deactivated()</tt>
   */

  Glib::SignalProxy0< void > signal_deactivated();


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED

protected:
  //GTK+ Virtual Functions (override these to change behaviour):
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED

  //Default Signal Handlers::
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
  virtual void on_activated();
  virtual void on_deactivated();
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED


};

} // namespace Gda
} // namespace Gnome


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gnome::Gda::Referer
   */
  Glib::RefPtr<Gnome::Gda::Referer> wrap(GdaReferer* object, bool take_copy = false);

} // namespace Glib


#endif /* _LIBGDAMM_REFERER_H */

