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

#include <glibmm.h>

/* $Id: parameter.hg,v 1.3 2004/04/23 11:14:49 murrayc Exp $ */
// -*- C++ -*- //

/* parameter.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-parameter.h> //TODO: Patch libgda to use the struct _ technique.


namespace Gnome
{

namespace Gda
{

class Parameter
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef Parameter CppObjectType;
  typedef GdaParameter BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  Parameter();

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

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

  ~Parameter();

  GdaParameter*       gobj()       { return gobject_; }
  const GdaParameter* 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.
  GdaParameter* gobj_copy() const;

protected:
  GdaParameter* gobject_;

private:

  
public:

  //Parameter();
  Parameter(const Glib::ustring& name, const Value& value);
  
  Parameter(const Glib::ustring& name, bool value);
  
  Parameter(const Glib::ustring& name, gdouble value);
  
  Parameter(const Glib::ustring& name, const Glib::RefPtr<Glib::Object>& value);
  
  Parameter(const Glib::ustring& name, const Glib::ustring& value);
  

  Glib::ustring get_name() const;
  
  void set_name(const Glib::ustring& name);

   
  Value get_value() const;
  
  
  void set_value(const Value& value);


};

} // namespace Gda
} // namespace Gnome


namespace Glib
{

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

} // namespace Glib

#endif /* _LIBGDAMM_PARAMETER_H */

