libglom-1.22  1.21.7
Public Member Functions
Glom::UsesRelationship Class Reference
Inheritance diagram for Glom::UsesRelationship:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 UsesRelationship ()
 UsesRelationship (const UsesRelationship& src)
UsesRelationshipoperator= (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 Relationshipget_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 Relationshipget_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 Glib::ustring& locale) 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 Glib::ustring& locale) 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


Member Function Documentation

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.

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

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.

Get a human-readable representation of th relationship.

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

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

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.

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

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_tableThe 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 Glib::ustring &  locale 
) 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_titleThe 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 Glib::ustring &  locale 
) const

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

Parameters:
parent_table_titleThe title of table to which the item (or its relatinoships) belong.
UsesRelationship& Glom::UsesRelationship::operator= ( const UsesRelationship src)
bool Glom::UsesRelationship::operator== ( const UsesRelationship src) const
void Glom::UsesRelationship::set_relationship ( const sharedptr< const Relationship >&  relationship)

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