libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::QueryCondition Class Reference

Represents a condition within a query. More...

Inheritance diagram for Gnome::Gda::QueryCondition:

[legend]
List of all members.

## Public Member Functions

Glib::RefPtr<const QueryCondition> | get_child_by_xml_id (const Glib::ustring& xml_id) const
| Get a pointer to a Gda::QueryCondition child from its XML Id.
Glib::RefPtr<QueryCondition> | get_child_by_xml_id (const Glib::ustring& xml_id)
| Get a pointer to a Gda::QueryCondition child from its XML Id.
Glib::SListHandle< Glib::RefPtr< const QueryCondition > > | get_children () const
| Get a list of Gda::QueryCondition objects which are children of condition.
Glib::SListHandle< Glib::RefPtr< QueryCondition > > | get_children ()
| Get a list of Gda::QueryCondition objects which are children of condition.
QueryConditionType | get_cond_type () const
| Get the type of condition.
Glib::SListHandle< Glib::RefPtr< const QueryCondition > > | get_main_conditions () const
| Makes a list of all the conditions which are always verified by condition when it returns `true` when evaluated.
Glib::SListHandle< Glib::RefPtr< QueryCondition > > | get_main_conditions ()
| Makes a list of all the conditions which are always verified by condition when it returns `true` when evaluated.
Glib::RefPtr<const QueryCondition> | get_parent () const
| Get the Gda::QueryCondition object which is parent of condition.
Glib::RefPtr<QueryCondition> | get_parent ()
| Get the Gda::QueryCondition object which is parent of condition.
const GdaQueryCondition* | gobj () const
| Provides access to the underlying C GObject.
GdaQueryCondition* | gobj ()
| Provides access to the underlying C GObject.
GdaQueryCondition* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool | is_ancestor (const Glib::RefPtr<QueryCondition>& ancestor) const
| Tests if ancestor is an ancestor of condition.
bool | is_leaf () const
| Tells if condition is a leaf condition (not AND, OR, NOT, etc).
Glib::RefPtr<const QueryField> | leaf_get_operator (QueryConditionOperator op) const
| Get one of condition's operators.
Glib::RefPtr<QueryField> | leaf_get_operator (QueryConditionOperator op)
| Get one of condition's operators.
void | leaf_set_operator (QueryConditionOperator op, const Glib::RefPtr<QueryField>& field)
bool | node_add_child (const Glib::RefPtr<QueryCondition>& child)
| Adds a child to condition; this is possible only if condition is a node type (AND, OR, etc).
void | node_del_child (const Glib::RefPtr<QueryCondition>& child)
| Removes a child from condition; this is possible only if condition is a node type (AND, OR, etc).
Glib::PropertyProxy_ReadOnly< QueryConditionType > | property_cond_type () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<QueryConditionType> | property_cond_type ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Query >> | property_query () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void | set_cond_type (QueryConditionType type)
| Sets the kind of condition condition represents.
virtual | ~QueryCondition ()

## Static Public Member Functions

static Glib::RefPtr<QueryCondition> | create (const Glib::RefPtr<Query>& query, QueryConditionType type)

## Protected Member Functions

| QueryCondition (const Glib::RefPtr<Query>& query, QueryConditionType type)

## Related Functions

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

## Detailed Description

Represents a condition within a query.

## Constructor & Destructor Documentation

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

Gnome::Gda::QueryCondition::QueryCondition | ( | const Glib::RefPtr<Query>& | query,
|  | QueryConditionType | type |
| ) |  |  | `[protected]`

## Member Function Documentation

static Glib::RefPtr<QueryCondition> Gnome::Gda::QueryCondition::create | ( | const Glib::RefPtr<Query>& | query,
|  | QueryConditionType | type |
| ) |  |  | `[static]`

Glib::RefPtr<const QueryCondition> Gnome::Gda::QueryCondition::get_child_by_xml_id | ( | const Glib::ustring & | xml_id | ) | const

Get a pointer to a Gda::QueryCondition child from its XML Id.

Parameters:

  | xml_id | The XML Id of the requested Gda::QueryCondition child.

Returns:
  The Gda::QueryCondition object, or `0` if not found.

Glib::RefPtr<QueryCondition> Gnome::Gda::QueryCondition::get_child_by_xml_id | ( | const Glib::ustring & | xml_id | ) |

Get a pointer to a Gda::QueryCondition child from its XML Id.

Parameters:

  | xml_id | The XML Id of the requested Gda::QueryCondition child.

Returns:
  The Gda::QueryCondition object, or `0` if not found.

Glib::SListHandle<Glib::RefPtr<const QueryCondition> > Gnome::Gda::QueryCondition::get_children | ( |  | ) | const

Get a list of Gda::QueryCondition objects which are children of condition.

Returns:
  A new list of Gda::QueryCondition objects.

Glib::SListHandle<Glib::RefPtr<QueryCondition> > Gnome::Gda::QueryCondition::get_children | ( |  | ) |

Get a list of Gda::QueryCondition objects which are children of condition.

Returns:
  A new list of Gda::QueryCondition objects.

QueryConditionType Gnome::Gda::QueryCondition::get_cond_type | ( |  | ) | const

Get the type of condition.

Returns:
  The type.

Glib::SListHandle<Glib::RefPtr<const QueryCondition> > Gnome::Gda::QueryCondition::get_main_conditions | ( |  | ) | const

Makes a list of all the conditions which are always verified by condition when it returns `true` when evaluated.

Basically the returned list lists the atomic conditions which are AND'ed together to form the complex condition.

Examples: if condition is: <itemizedlist> <listitem> "A and B" then the list will contains {A, B}</listitem> <listitem> "A and (B or C)" it will contain {A, B or C}</listitem> <listitem> "A and (B and not C)", it will contain {A, B, not C}</listitem> </itemizedlist>

Returns:
  A new list of Gda::QueryCondition objects.

Glib::SListHandle<Glib::RefPtr<QueryCondition> > Gnome::Gda::QueryCondition::get_main_conditions | ( |  | ) |

Makes a list of all the conditions which are always verified by condition when it returns `true` when evaluated.

Basically the returned list lists the atomic conditions which are AND'ed together to form the complex condition.

Examples: if condition is: <itemizedlist> <listitem> "A and B" then the list will contains {A, B}</listitem> <listitem> "A and (B or C)" it will contain {A, B or C}</listitem> <listitem> "A and (B and not C)", it will contain {A, B, not C}</listitem> </itemizedlist>

Returns:
  A new list of Gda::QueryCondition objects.

Glib::RefPtr<const QueryCondition> Gnome::Gda::QueryCondition::get_parent | ( |  | ) | const

Get the Gda::QueryCondition object which is parent of condition.

Returns:
  The parent object, or `0`.

Glib::RefPtr<QueryCondition> Gnome::Gda::QueryCondition::get_parent | ( |  | ) |

Get the Gda::QueryCondition object which is parent of condition.

Returns:
  The parent object, or `0`.

const GdaQueryCondition* Gnome::Gda::QueryCondition::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::QueryObject.

GdaQueryCondition* Gnome::Gda::QueryCondition::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::QueryObject.

GdaQueryCondition* Gnome::Gda::QueryCondition::gobj_copy | ( |  | ) |

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

Reimplemented from Gnome::Gda::QueryObject.

bool Gnome::Gda::QueryCondition::is_ancestor | ( | const Glib::RefPtr<QueryCondition>& | ancestor | ) | const

Tests if ancestor is an ancestor of condition.

Parameters:

  | ancestor | A Gda::QueryCondition object.

Returns:
  `true` if ancestor is an ancestor of condition.

bool Gnome::Gda::QueryCondition::is_leaf | ( |  | ) | const

Tells if condition is a leaf condition (not AND, OR, NOT, etc).

Returns:
  `true` if condition is a leaf condition.

Glib::RefPtr<const QueryField> Gnome::Gda::QueryCondition::leaf_get_operator | ( | QueryConditionOperator | op | ) | const

Get one of condition's operators.

Parameters:

  | op | Which oparetor is concerned.

Returns:
  The requested Gda::QueryField object.

Glib::RefPtr<QueryField> Gnome::Gda::QueryCondition::leaf_get_operator | ( | QueryConditionOperator | op | ) |

Get one of condition's operators.

Parameters:

  | op | Which oparetor is concerned.

Returns:
  The requested Gda::QueryField object.

void Gnome::Gda::QueryCondition::leaf_set_operator | ( | QueryConditionOperator | op,
|  | const Glib::RefPtr<QueryField>& | field |
| ) |  |  |

bool Gnome::Gda::QueryCondition::node_add_child | ( | const Glib::RefPtr<QueryCondition>& | child | ) |

Adds a child to condition; this is possible only if condition is a node type (AND, OR, etc).

Parameters:

  | child | A Gda::QueryCondition object.

Returns:
  `true` if no error occurred.

void Gnome::Gda::QueryCondition::node_del_child | ( | const Glib::RefPtr<QueryCondition>& | child | ) |

Removes a child from condition; this is possible only if condition is a node type (AND, OR, etc).

Parameters:

  | child | A Gda::QueryCondition object.

Glib::PropertyProxy_ReadOnly<QueryConditionType> Gnome::Gda::QueryCondition::property_cond_type | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  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<QueryConditionType> Gnome::Gda::QueryCondition::property_cond_type | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  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::RefPtr<Query>> Gnome::Gda::QueryCondition::property_query | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gnome::Gda::QueryCondition::set_cond_type | ( | QueryConditionType | type | ) |

Sets the kind of condition condition represents.

If type implies a node condition and condition currently represents a leaf, or if type implies a leaf condition and condition currently represents a node, then condition is changed without any error.

## Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::QueryCondition> wrap | ( | GdaQueryCondition * | 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:

- querycondition.h