GDAL
Public Member Functions | Static Public Member Functions | List of all members
OGRCodedFieldDomain Class Reference

Definition of a coded / enumerated field domain. More...

#include <ogr_feature.h>

Inheritance diagram for OGRCodedFieldDomain:
OGRFieldDomain

Public Member Functions

 OGRCodedFieldDomain (const std::string &osName, const std::string &osDescription, OGRFieldType eFieldType, OGRFieldSubType eFieldSubType, std::vector< OGRCodedValue > &&asValues)
 Constructor. More...
 
OGRCodedFieldDomainClone () const override
 Clone. More...
 
const OGRCodedValueGetEnumeration () const
 Get the enumeration as (code, value) pairs. More...
 
const std::string & GetName () const
 Get the name of the field domain. More...
 
const std::string & GetDescription () const
 Get the description of the field domain. More...
 
OGRFieldDomainType GetDomainType () const
 Get the type of the field domain. More...
 
OGRFieldType GetFieldType () const
 Get the field type. More...
 
OGRFieldSubType GetFieldSubType () const
 Get the field subtype. More...
 
OGRFieldDomainSplitPolicy GetSplitPolicy () const
 Get the split policy. More...
 
void SetSplitPolicy (OGRFieldDomainSplitPolicy policy)
 Set the split policy. More...
 
OGRFieldDomainMergePolicy GetMergePolicy () const
 Get the merge policy. More...
 
void SetMergePolicy (OGRFieldDomainMergePolicy policy)
 Set the merge policy. More...
 

Static Public Member Functions

static OGRFieldDomainH ToHandle (OGRFieldDomain *poFieldDomain)
 Convert a OGRFieldDomain* to a OGRFieldDomainH.
 
static OGRFieldDomainFromHandle (OGRFieldDomainH hFieldDomain)
 Convert a OGRFieldDomainH to a OGRFieldDomain*.
 

Detailed Description

Definition of a coded / enumerated field domain.

A code field domain is a domain for which only a limited set of codes, associated with their expanded value, are allowed. The type of the code should be the one of the field domain.

Constructor & Destructor Documentation

◆ OGRCodedFieldDomain()

OGRCodedFieldDomain::OGRCodedFieldDomain ( const std::string &  osName,
const std::string &  osDescription,
OGRFieldType  eFieldType,
OGRFieldSubType  eFieldSubType,
std::vector< OGRCodedValue > &&  asValues 
)

Constructor.

This is the same as the C function OGR_CodedFldDomain_Create() (except that the C function copies the enumeration, whereas the C++ method moves it)

Parameters
osNameDomain name.
osDescriptionDomain description.
eFieldTypeField type. Generally numeric. Potentially OFTDateTime
eFieldSubTypeField subtype.
asValuesEnumeration as (code, value) pairs. Each code should appear only once, but it is the responsibility of the user to check it.

Member Function Documentation

◆ Clone()

OGRCodedFieldDomain * OGRCodedFieldDomain::Clone ( ) const
overridevirtual

Clone.

Return a cloned object, or nullptr in case of error.

Implements OGRFieldDomain.

◆ GetDescription()

const std::string & OGRFieldDomain::GetDescription ( ) const
inlineinherited

Get the description of the field domain.

Empty string if there is none.

This is the same as the C function OGR_FldDomain_GetDescription().

◆ GetDomainType()

OGRFieldDomainType OGRFieldDomain::GetDomainType ( ) const
inlineinherited

Get the type of the field domain.

This is the same as the C function OGR_FldDomain_GetDomainType().

◆ GetEnumeration()

const OGRCodedValue * OGRCodedFieldDomain::GetEnumeration ( ) const
inline

Get the enumeration as (code, value) pairs.

The end of the enumeration is signaled by code == NULL.

This is the same as the C function OGR_CodedFldDomain_GetEnumeration().

◆ GetFieldSubType()

OGRFieldSubType OGRFieldDomain::GetFieldSubType ( ) const
inlineinherited

Get the field subtype.

This is the same as the C function OGR_FldDomain_GetFieldSubType().

◆ GetFieldType()

OGRFieldType OGRFieldDomain::GetFieldType ( ) const
inlineinherited

Get the field type.

This is the same as the C function OGR_FldDomain_GetFieldType().

◆ GetMergePolicy()

OGRFieldDomainMergePolicy OGRFieldDomain::GetMergePolicy ( ) const
inlineinherited

Get the merge policy.

This is the same as the C function OGR_FldDomain_GetMergePolicy().

◆ GetName()

const std::string & OGRFieldDomain::GetName ( ) const
inlineinherited

Get the name of the field domain.

This is the same as the C function OGR_FldDomain_GetName().

◆ GetSplitPolicy()

OGRFieldDomainSplitPolicy OGRFieldDomain::GetSplitPolicy ( ) const
inlineinherited

Get the split policy.

This is the same as the C function OGR_FldDomain_GetSplitPolicy().

◆ SetMergePolicy()

void OGRFieldDomain::SetMergePolicy ( OGRFieldDomainMergePolicy  policy)
inlineinherited

Set the merge policy.

This is the same as the C function OGR_FldDomain_SetMergePolicy().

◆ SetSplitPolicy()

void OGRFieldDomain::SetSplitPolicy ( OGRFieldDomainSplitPolicy  policy)
inlineinherited

Set the split policy.

This is the same as the C function OGR_FldDomain_SetSplitPolicy().


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