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


#include <glibmm.h>

/* $Id: columnindex.hg,v 1.2 2006/06/11 08:12:29 murrayc Exp $ */
// -*- C++ -*- // this is for the .hg, I realize gensig puts one in

/* datamodel.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 <libgda/gda-column-index.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaColumnIndex GdaColumnIndex;
typedef struct _GdaColumnIndexClass GdaColumnIndexClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class ColumnIndex_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{

namespace Gda
{

/** @addtogroup libgdammEnums Enums and Flags */

/**
 * @ingroup libgdammEnums
 */
enum Sorting
{
  SORTING_ASCENDING,
  SORTING_DESCENDING
};

} // namespace Gda

} // namespace Gnome


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{

template <>
class Value<Gnome::Gda::Sorting> : public Glib::Value_Enum<Gnome::Gda::Sorting>
{
public:
  static GType value_type() G_GNUC_CONST;
};

} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{


class Row;

/** DataModel column indexes — Management of DataModel column index attributes.
 *
 * @ingroup DataHandlers
 */

class ColumnIndex : public Glib::Object
{
   
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef ColumnIndex CppObjectType;
  typedef ColumnIndex_Class CppClassType;
  typedef GdaColumnIndex BaseObjectType;
  typedef GdaColumnIndexClass BaseClassType;

private:  friend class ColumnIndex_Class;
  static CppClassType columnindex_class_;

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

protected:
  explicit ColumnIndex(const Glib::ConstructParams& construct_params);
  explicit ColumnIndex(GdaColumnIndex* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~ColumnIndex();

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

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

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

private:

protected:
  ColumnIndex();
  

public:
  
  static Glib::RefPtr<ColumnIndex> create();


  //TODO: Is this usable?:
  
  
  /** Creates a new Gda::ColumnIndex object from an existing one.
   * @return A newly allocated Gda::ColumnIndex with a copy of the data
   * in @a dmcia.
   */
  Glib::RefPtr<ColumnIndex> copy() const;

  
  /** 
   * @return The column name of @a dmcia.
   */
  Glib::ustring get_column_name() const;
  
  /** Sets the name of @a dmcia to @a column_name.
   * @param column_name The new name of @a dmcia.
   */
  void set_column_name(const Glib::ustring& column_name);
  
  /** 
   * @return The defined size of @a dmcia.
   */
  long get_defined_size() const;
  
  /** Sets the defined size of a Gda::ColumnIndex.
   * @param size The defined size we want to set.
   */
  void set_defined_size(long size);
  
  /** 
   * @return The sorting of @a dmcia.
   */
  Sorting get_sorting() const;
  
  /** Sets the sorting of a Gda::ColumnIndex.
   * @param sorting The new sorting of @a dmcia.
   */
  void set_sorting(Sorting sorting);
  
  /** 
   * @return  @a dmcia's references.
   */
  Glib::ustring get_references() const;
  
  /** Sets @a dmcia's @a references.
   * @param ref References.
   */
  void set_references(const Glib::ustring& ref);


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 Gnome
{

namespace Gda
{

/** @relates Gnome::Gda::ColumnIndex
 * @param lhs The left-hand side
 * @param rhs The right-hand side
 * @result The result
 */
bool operator==(const ColumnIndex& lhs, const ColumnIndex& rhs);

/** @relates Gnome::Gda::ColumnIndex
 * @param lhs The left-hand side
 * @param rhs The right-hand side
 * @result The result
 */
bool operator!=(const ColumnIndex& lhs, const ColumnIndex& rhs);


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


#endif /* _LIBGDAMM_COLUMNINDEX_H */

