libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::Row Class Reference

Inheritance diagram for Gnome::Gda::Row:

[legend]
List of all members.

## Public Member Functions

Glib::RefPtr<Row> | copy () const
| Copy constructor.
Glib::ustring | get_id () const
| Returns: the unique identifier for this row.
bool | get_is_default (int num) const
| Tells if the value at column num in row must be considered as a default value.
int | get_length () const

Returns:
  The number of columns that the row has.

Glib::RefPtr<const DataModel> | get_model () const
| Gets the Gda::DataModel the given Gda::Row belongs to.
Glib::RefPtr<DataModel> | get_model ()
| Gets the Gda::DataModel the given Gda::Row belongs to.
int | get_number () const
| Gets the number of the given row, that is, its position in its containing data model.
Value | get_value (int num) const
const GdaRow* | gobj () const
| Provides access to the underlying C GObject.
GdaRow* | gobj ()
| Provides access to the underlying C GObject.
GdaRow* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | set_id (const Glib::ustring& id)
| Assigns a new identifier to the given row.
void | set_is_default (int num, bool is_default=true)
void | set_model (const Glib::RefPtr<DataModel>& model)
| Set the Gda::DataModel the given Gda::Row belongs to.
void | set_number (int number)
| Sets the row number for the given row.
bool | set_value (int num, const Value& value)
| Sets the value stored at position num in row to be a copy of value.
virtual | ~Row ()

## Static Public Member Functions

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

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr<Gnome::Gda::Row> | wrap (GdaRow* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Constructor & Destructor Documentation

virtual Gnome::Gda::Row::~Row | ( |  | ) | `[virtual]`

## Member Function Documentation

Glib::RefPtr<Row> Gnome::Gda::Row::copy | ( |  | ) | const

Copy constructor.

Returns:
  A new Gda::Row.

static Glib::RefPtr<Row> Gnome::Gda::Row::create | ( | const Glib::RefPtr<DataModel>& | model,
|  | const GList * | values |
| ) |  |  | `[static]`

static Glib::RefPtr<Row> Gnome::Gda::Row::create | ( | const Glib::RefPtr<DataModel>& | model,
|  | int | count |
| ) |  |  | `[static]`

Glib::ustring Gnome::Gda::Row::get_id | ( |  | ) | const

Returns: the unique identifier for this row.

Returns:
  The unique identifier for this row.

bool Gnome::Gda::Row::get_is_default | ( | int | num | ) | const

Tells if the value at column num in row must be considered as a default value.

Parameters:

  | num | Field index.

int Gnome::Gda::Row::get_length | ( |  | ) | const

Returns:
  The number of columns that the row has.

Glib::RefPtr<const DataModel> Gnome::Gda::Row::get_model | ( |  | ) | const

Gets the Gda::DataModel the given Gda::Row belongs to.

Returns:
  A Gda::DataModel.

Glib::RefPtr<DataModel> Gnome::Gda::Row::get_model | ( |  | ) |

Gets the Gda::DataModel the given Gda::Row belongs to.

Returns:
  A Gda::DataModel.

int Gnome::Gda::Row::get_number | ( |  | ) | const

Gets the number of the given row, that is, its position in its containing data model.

Returns:
  The row number, or -1 if there was an error.

Value Gnome::Gda::Row::get_value | ( | int | num | ) | const

const GdaRow* Gnome::Gda::Row::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaRow* Gnome::Gda::Row::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaRow* Gnome::Gda::Row::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

void Gnome::Gda::Row::set_id | ( | const Glib::ustring & | id | ) |

Assigns a new identifier to the given row.

This function is usually called by providers.

Parameters:

  | id | New identifier for the row.

void Gnome::Gda::Row::set_is_default | ( | int | num,
|  | bool | is_default = `true` |
| ) |  |  |

void Gnome::Gda::Row::set_model | ( | const Glib::RefPtr<DataModel>& | model | ) |

Set the Gda::DataModel the given Gda::Row belongs to.

Note that calling this method should be reserved to GdaDataModel implementations and should therefore not be called by the user.

Parameters:

  | model | A Gda::DataModel this row belongs to, or `0` if the row is outside any data model.

void Gnome::Gda::Row::set_number | ( | int | number | ) |

Sets the row number for the given row.

Parameters:

  | number | The new row number.

bool Gnome::Gda::Row::set_value | ( | int | num,
|  | const Value& | value |
| ) |  |  |

Sets the value stored at position num in row to be a copy of value.

Parameters:

  | num | Field index.
  | value | A Value to insert into row at the num position, or `0`.

Returns:
  `true` if no error occurred.

## Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::Row> wrap | ( | GdaRow * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- row.h