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


#include <glibmm.h>

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

/* datamodelrow.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/object.h>
#include <libgdamm/object.h>
#include <libgdamm/datamodel.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaDataModelRow GdaDataModelRow;
typedef struct _GdaDataModelRowClass GdaDataModelRowClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class DataModelRow_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{

namespace Gda
{

/** Base implementation for other objects to implement the DataModel interface based on the use of rows.
 * This object is not intended to be instantiated directly, but to be used as a base class.
 *
 * @ingroup DataModels
 */

class DataModelRow
 : public Object,
   public DataModel
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef DataModelRow CppObjectType;
  typedef DataModelRow_Class CppClassType;
  typedef GdaDataModelRow BaseObjectType;
  typedef GdaDataModelRowClass BaseClassType;

private:  friend class DataModelRow_Class;
  static CppClassType datamodelrow_class_;

private:
  // noncopyable
  DataModelRow(const DataModelRow&);
  DataModelRow& operator=(const DataModelRow&);

protected:
  explicit DataModelRow(const Glib::ConstructParams& construct_params);
  explicit DataModelRow(GdaDataModelRow* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~DataModelRow();

#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.
  GdaDataModelRow*       gobj()       { return reinterpret_cast<GdaDataModelRow*>(gobject_); }

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

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GdaDataModelRow* gobj_copy();

private:

  
protected:
  // There is no create() method because there is no _new function in the C API either.

public:
  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_command_text() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_command_text() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<int> property_command_type() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<int> property_command_type() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<bool> property_read_only() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** 
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<bool> property_read_only() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  /** Finds the Gda::Row object corresponding to the @a row row number.
   * @param row The row number to fetch.
   * @return The Gda::Row, or <tt>0</tt> if not found.
   */
#ifdef GLIBMM_EXCEPTIONS_ENABLED
  const Glib::RefPtr<Row> get_row(int row);
#else
  const Glib::RefPtr<Row> get_row(int row, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED

  // TODO: This is not constversion because the generated code does not pass
  // error to the non-const function if exceptions are disabled.
  
  /** Finds the Gda::Row object corresponding to the @a row row number.
   * @param row The row number to fetch.
   * @return The Gda::Row, or <tt>0</tt> if not found.
   */
#ifdef GLIBMM_EXCEPTIONS_ENABLED
  const Glib::RefPtr<const Row> get_row(int row) const;
#else
  const Glib::RefPtr<const Row> get_row(int row, std::auto_ptr<Glib::Error>& error) const;
#endif //GLIBMM_EXCEPTIONS_ENABLED


/* TODO: 
  _WRAP_VFUNC(int get_n_rows() const, get_n_rows)
  _WRAP_VFUNC(int get_n_columns) const, get_n_columns)
*/

 // TODO: Vfuncs:
  /*
	GdaRow             *(* get_row)         (GdaDataModelRow *model, gint row, GError **error);
	const GValue       *(* get_value_at)    (GdaDataModelRow *model, gint col, gint row);
	
	gboolean            (* is_updatable)    (GdaDataModelRow *model);

	GdaRow             *(* append_values)   (GdaDataModelRow *model, const GList *values, GError **error);
	gboolean            (* append_row)      (GdaDataModelRow *model, GdaRow *row, GError **error);
	gboolean            (* update_row)      (GdaDataModelRow *model, GdaRow *row, GError **error);
	gboolean            (* remove_row)      (GdaDataModelRow *model, GdaRow *row, GError **error);
  */


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
#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::DataModelRow
   */
  Glib::RefPtr<Gnome::Gda::DataModelRow> wrap(GdaDataModelRow* object, bool take_copy = false);
}


#endif /* _LIBGDAMM_DATAMODELROW_H */

