libglom-1.20 1.19.12

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# Glom::UsesRelationship Class Reference

Inheritance diagram for Glom::UsesRelationship:
[legend]
Collaboration diagram for Glom::UsesRelationship:
[legend]

List of all members.

## Public Member Functions
| UsesRelationship ()
| UsesRelationship (const UsesRelationship& src)
UsesRelationship& | operator= (const UsesRelationship& src)
virtual | ~UsesRelationship ()
bool | operator== (const UsesRelationship& src) const
bool | get_has_relationship_name () const
bool | get_has_related_relationship_name () const
Glib::ustring | get_relationship_name () const
| Convenience function, equivalent to get_relationship()->get_name().
Glib::ustring | get_related_relationship_name () const
| Convenience function, equivalent to get_relationship()->get_name().
sharedptr< const Relationship > | get_relationship () const
| Return the relationship used by this item, if any, or a null sharedptr.
void | set_relationship (const sharedptr< const Relationship >& relationship)
sharedptr< const Relationship > | get_related_relationship () const
| Return the related relationship used by this item, if any, or a null sharedptr.
void | set_related_relationship (const sharedptr< const Relationship >& relationship)
Glib::ustring | get_table_used (const Glib::ustring& parent_table) const
| Returns either the parent_table, related to table, or doubly-related to-table.
Glib::ustring | get_title_used (const Glib::ustring& parent_table_title) const
| Get the title of the relationship that is actually used, falling back to the relationship's name.
Glib::ustring | get_title_singular_used (const Glib::ustring& parent_table_title) const
| Get the singular title of the relationship that is actually used, falling back to the regular (plural) title, and then to the relationship's name.
Glib::ustring | get_to_field_used () const
Glib::ustring | get_relationship_name_used () const
| Get the name of the related relationship used, if any, or the relationship if there is no related relationship, or an empty string if neither are used by this item.
bool | get_relationship_used_allows_edit () const
| Discover whether the relationship used allows the user to edit values in its to table.
Glib::ustring | get_sql_join_alias_name () const
| Get a name to use as an alias in SQL statements.
Glib::ustring | get_sql_table_or_join_alias_name (const Glib::ustring& parent_table) const
| Get the item's alias name, if it uses a relationship, or just get its table name.
Glib::ustring | get_relationship_display_name () const
| Get a human-readable representation of th relationship.

## Constructor & Destructor Documentation

Glom::UsesRelationship::UsesRelationship | ( |  | ) |

Glom::UsesRelationship::UsesRelationship | ( | const UsesRelationship& | src | ) |

virtual Glom::UsesRelationship::~UsesRelationship | ( |  | ) | `[virtual]`

## Member Function Documentation

bool Glom::UsesRelationship::get_has_related_relationship_name | ( |  | ) | const

bool Glom::UsesRelationship::get_has_relationship_name | ( |  | ) | const

sharedptr<const Relationship> Glom::UsesRelationship::get_related_relationship | ( |  | ) | const

Return the related relationship used by this item, if any, or a null sharedptr.

See also get_has_related_relationship_name() which can prevent the need for your own null sharedptr check.

Glib::ustring Glom::UsesRelationship::get_related_relationship_name | ( |  | ) | const

Convenience function, equivalent to get_relationship()->get_name().

sharedptr<const Relationship> Glom::UsesRelationship::get_relationship | ( |  | ) | const

Return the relationship used by this item, if any, or a null sharedptr.

See also get_has_relationship_name() which can prevent the need for your own null sharedptr check.

Glib::ustring Glom::UsesRelationship::get_relationship_display_name | ( |  | ) | const

Get a human-readable representation of th relationship.

This just concatenates the chain of relationships, separating them by ":".

Glib::ustring Glom::UsesRelationship::get_relationship_name | ( |  | ) | const

Convenience function, equivalent to get_relationship()->get_name().

Glib::ustring Glom::UsesRelationship::get_relationship_name_used | ( |  | ) | const

Get the name of the related relationship used, if any, or the relationship if there is no related relationship, or an empty string if neither are used by this item.

bool Glom::UsesRelationship::get_relationship_used_allows_edit | ( |  | ) | const

Discover whether the relationship used allows the user to edit values in its to table.

Glib::ustring Glom::UsesRelationship::get_sql_join_alias_name | ( |  | ) | const

Get a name to use as an alias in SQL statements.

This will always be the same string for items that have the same definition.

Glib::ustring Glom::UsesRelationship::get_sql_table_or_join_alias_name | ( | const Glib::ustring & | parent_table | ) | const

Get the item's alias name, if it uses a relationship, or just get its table name.

Parameters:

  parent_table | The table to which the item (or its relatinoships) belong.

Glib::ustring Glom::UsesRelationship::get_table_used | ( | const Glib::ustring & | parent_table | ) | const

Returns either the parent_table, related to table, or doubly-related to-table.

Glib::ustring Glom::UsesRelationship::get_title_singular_used | ( | const Glib::ustring & | parent_table_title | ) | const

Get the singular title of the relationship that is actually used, falling back to the regular (plural) title, and then to the relationship's name.

Parameters:

  parent_table_title | The title of table to which the item (or its relatinoships) belong.

Glib::ustring Glom::UsesRelationship::get_title_used | ( | const Glib::ustring & | parent_table_title | ) | const

Get the title of the relationship that is actually used, falling back to the relationship's name.

Parameters:

  parent_table_title | The title of table to which the item (or its relatinoships) belong.

Glib::ustring Glom::UsesRelationship::get_to_field_used | ( |  | ) | const

UsesRelationship& Glom::UsesRelationship::operator= | ( | const UsesRelationship& | src | ) |

bool Glom::UsesRelationship::operator== | ( | const UsesRelationship& | src | ) | const

void Glom::UsesRelationship::set_related_relationship | ( | const sharedptr< const Relationship >& | relationship | ) |

void Glom::UsesRelationship::set_relationship | ( | const sharedptr< const Relationship >& | relationship | ) |

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

- libglom/data_structure/layout/usesrelationship.h