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

#include <glibmm.h>

/* $Id: row.hg,v 1.5 2004/04/23 11:14:49 murrayc Exp $ */
// -*- C++ -*- // this is for the .hg, I realize gensig puts one in

/* row.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 <libgdamm/value.h>
//#include <glibmm/object.h>


#include <libgda/gda-data-model.h>

namespace Gnome
{

namespace Gda
{

class DataModel;
class Value;

class Row
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef Row CppObjectType;
  typedef GdaRow BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  Row();

  // Use make_a_copy=true when getting it directly from a struct.
  explicit Row(GdaRow* castitem, bool make_a_copy = false);

  Row(const Row& src);
  Row& operator=(const Row& src);

  ~Row();

  GdaRow*       gobj()       { return gobject_; }
  const GdaRow* gobj() const { return gobject_; }

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

protected:
  GdaRow* gobject_;

private:

  
public:

  Row(const Glib::RefPtr<DataModel>& model, int count);
  
  Row(const Glib::RefPtr<DataModel>& model, const GList *values);
  

  Glib::RefPtr<DataModel> get_model();
  
  Glib::RefPtr<const DataModel> get_model() const;

  
  int get_number() const;
  
  void set_number(int number);
  
  Glib::ustring get_id() const;
  
  void set_id(const Glib::ustring& id);

  //We use a custom conversion here, because we need to copy the value:
   

  Value get_value(int num) const;
  
  
  int get_length() const;


};

} // namespace Gda
} // namespace Gnome


namespace Glib
{

  /** @relates Gnome::Gda::Row
   * @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.
   */
Gnome::Gda::Row wrap(GdaRow* object, bool take_copy = false);

} // namespace Glib

#endif /* _LIBGDAMM_ROW_H */

