libglom-1.30  1.30.0
Public Member Functions | List of all members
Glom::UsesRelationship Class Reference
Inheritance diagram for Glom::UsesRelationship:
Inheritance graph
[legend]

Public Member Functions

 UsesRelationship ()
 
 UsesRelationship (const UsesRelationship& src)
 
 UsesRelationship (UsesRelationship&& src)=delete
 
UsesRelationshipoperator= (const UsesRelationship& src)
 
UsesRelationshipoperator= (UsesRelationship&& src)=delete
 
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(). More...
 
Glib::ustring get_related_relationship_name () const
 Convenience function, equivalent to get_relationship()->get_name(). More...
 
std::shared_ptr< const Relationshipget_relationship () const
 Return the relationship used by this item, if any, or a null std::shared_ptr. More...
 
void set_relationship (const std::shared_ptr< const Relationship >& relationship)
 
std::shared_ptr< const Relationshipget_related_relationship () const
 Return the related relationship used by this item, if any, or a null std::shared_ptr. More...
 
void set_related_relationship (const std::shared_ptr< 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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool get_relationship_used_allows_edit () const
 Discover whether the relationship used allows the user to edit values in its to table. More...
 
Glib::ustring get_sql_join_alias_name () const
 Get a name to use as an alias in SQL statements. More...
 
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. More...
 
Glib::ustring get_relationship_display_name () const
 Get a human-readable representation of th relationship. More...
 

Constructor & Destructor Documentation

Glom::UsesRelationship::UsesRelationship ( )
Glom::UsesRelationship::UsesRelationship ( const UsesRelationship src)
Glom::UsesRelationship::UsesRelationship ( UsesRelationship&&  src)
delete
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
std::shared_ptr<const Relationship> Glom::UsesRelationship::get_related_relationship ( ) const

Return the related relationship used by this item, if any, or a null std::shared_ptr.

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

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

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

std::shared_ptr<const Relationship> Glom::UsesRelationship::get_relationship ( ) const

Return the relationship used by this item, if any, or a null std::shared_ptr.

See also get_has_relationship_name() which can prevent the need for your own null std::shared_ptr 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_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.
Glib::ustring Glom::UsesRelationship::get_to_field_used ( ) const
UsesRelationship& Glom::UsesRelationship::operator= ( const UsesRelationship src)
UsesRelationship& Glom::UsesRelationship::operator= ( UsesRelationship&&  src)
delete
bool Glom::UsesRelationship::operator== ( const UsesRelationship src) const
void Glom::UsesRelationship::set_related_relationship ( const std::shared_ptr< const Relationship >&  relationship)
void Glom::UsesRelationship::set_relationship ( const std::shared_ptr< const Relationship >&  relationship)

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