13#ifndef GDALRELATIONSHIP_H_INCLUDED
14#define GDALRELATIONSHIP_H_INCLUDED
41 std::string m_osName{};
42 std::string m_osLeftTableName{};
43 std::string m_osRightTableName{};
46 std::string m_osMappingTableName{};
47 std::vector<std::string> m_osListLeftTableFields{};
48 std::vector<std::string> m_osListRightTableFields{};
49 std::vector<std::string> m_osListLeftMappingTableFields{};
50 std::vector<std::string> m_osListRightMappingTableFields{};
52 std::string m_osForwardPathLabel{};
53 std::string m_osBackwardPathLabel{};
54 std::string m_osRelatedTableType{};
67 const std::string &osLeftTableName,
68 const std::string &osRightTableName,
71 : m_osName(osName), m_osLeftTableName(osLeftTableName),
72 m_osRightTableName(osRightTableName), m_eCardinality(eCardinality)
85 return m_eCardinality;
94 return m_osLeftTableName;
101 return m_osRightTableName;
110 return m_osMappingTableName;
119 m_osMappingTableName = osName;
130 return m_osListLeftTableFields;
141 return m_osListRightTableFields;
152 m_osListLeftTableFields = osListFields;
163 m_osListRightTableFields = osListFields;
174 return m_osListLeftMappingTableFields;
185 return m_osListRightMappingTableFields;
196 m_osListLeftMappingTableFields = osListFields;
208 m_osListRightMappingTableFields = osListFields;
246 return m_osForwardPathLabel;
266 m_osForwardPathLabel = osLabel;
286 return m_osBackwardPathLabel;
306 m_osBackwardPathLabel = osLabel;
321 return m_osRelatedTableType;
336 m_osRelatedTableType = osType;
const std::string & GetName() const
Get the name of the relationship.
Definition gdal_relationship.h:77
const std::vector< std::string > & GetLeftMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the left ...
Definition gdal_relationship.h:172
void SetType(GDALRelationshipType eType)
Sets the type of the relationship.
Definition gdal_relationship.h:224
void SetLeftMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the left...
Definition gdal_relationship.h:194
void SetMappingTableName(const std::string &osName)
Sets the name of the mapping table for many-to-many relationships.
Definition gdal_relationship.h:117
static GDALRelationshipH ToHandle(GDALRelationship *poRelationship)
Convert a GDALRelationship* to a GDALRelationshipH.
Definition gdal_relationship.h:341
const std::string & GetForwardPathLabel() const
Get the label of the forward path for the relationship.
Definition gdal_relationship.h:244
const std::string & GetLeftTableName() const
Get the name of the left (or base/origin) table in the relationship.
Definition gdal_relationship.h:92
const std::string & GetBackwardPathLabel() const
Get the label of the backward path for the relationship.
Definition gdal_relationship.h:284
const std::string & GetRelatedTableType() const
Get the type string of the related table.
Definition gdal_relationship.h:319
const std::string & GetMappingTableName() const
Get the name of the mapping table for many-to-many relationships.
Definition gdal_relationship.h:108
void SetLeftTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the left table in the relationship.
Definition gdal_relationship.h:150
GDALRelationshipCardinality GetCardinality() const
Get the cardinality of the relationship.
Definition gdal_relationship.h:83
void SetRightTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the right table in the relationship.
Definition gdal_relationship.h:161
void SetForwardPathLabel(const std::string &osLabel)
Sets the label of the forward path for the relationship.
Definition gdal_relationship.h:264
void SetBackwardPathLabel(const std::string &osLabel)
Sets the label of the backward path for the relationship.
Definition gdal_relationship.h:304
const std::vector< std::string > & GetRightTableFields() const
Get the names of the participating fields from the right table in the relationship.
Definition gdal_relationship.h:139
void SetRightMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the righ...
Definition gdal_relationship.h:206
static GDALRelationship * FromHandle(GDALRelationshipH hRelationship)
Convert a GDALRelationshipH to a GDALRelationship*.
Definition gdal_relationship.h:348
const std::vector< std::string > & GetRightMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the right...
Definition gdal_relationship.h:183
GDALRelationship(const std::string &osName, const std::string &osLeftTableName, const std::string &osRightTableName, GDALRelationshipCardinality eCardinality=GDALRelationshipCardinality::GRC_ONE_TO_MANY)
Constructor for a relationship between two tables.
Definition gdal_relationship.h:66
GDALRelationshipType GetType() const
Get the type of the relationship.
Definition gdal_relationship.h:215
const std::vector< std::string > & GetLeftTableFields() const
Get the names of the participating fields from the left table in the relationship.
Definition gdal_relationship.h:128
const std::string & GetRightTableName() const
Get the name of the right (or related/destination) table in the relationship.
Definition gdal_relationship.h:99
void SetRelatedTableType(const std::string &osType)
Sets the type string of the related table.
Definition gdal_relationship.h:334
Core portability definitions for CPL.
Public (C callable) GDAL entry points.
GDALRelationshipCardinality
Cardinality of relationship.
Definition gdal.h:2423
@ GRC_ONE_TO_MANY
One-to-many.
Definition gdal.h:2427
GDALRelationshipType
Type of relationship.
Definition gdal.h:2439
@ GRT_ASSOCIATION
Association relationship.
Definition gdal.h:2443
void * GDALRelationshipH
Opaque type used for the C bindings of the C++ GDALRelationship class.
Definition gdal_fwd.h:66