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:

## Public Member Functions
| OGRCodedFieldDomain (const std::string &osName, const std::string &osDescription, OGRFieldType eFieldType, OGRFieldSubType eFieldSubType, std::vector< OGRCodedValue > &&asValues)
| Constructor. More...
OGRCodedFieldDomain * | Clone () const override
| Clone. More...
const OGRCodedValue * | GetEnumeration () 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 OGRFieldDomain * | FromHandle (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

  osName | Domain name.
  osDescription | Domain description.
  eFieldType | Field type. Generally numeric. Potentially OFTDateTime
  eFieldSubType | Field subtype.
  asValues | Enumeration 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
| override virtual

Clone.

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

Implements OGRFieldDomain.

## ◆ GetDescription()

const std::string& OGRFieldDomain::GetDescription | ( |  | ) | const
| inline inherited

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
| inline inherited

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
| inline inherited

Get the field subtype.

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

## ◆ GetFieldType()

OGRFieldType OGRFieldDomain::GetFieldType | ( |  | ) | const
| inline inherited

Get the field type.

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

## ◆ GetMergePolicy()

OGRFieldDomainMergePolicy OGRFieldDomain::GetMergePolicy | ( |  | ) | const
| inline inherited

Get the merge policy.

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

## ◆ GetName()

const std::string& OGRFieldDomain::GetName | ( |  | ) | const
| inline inherited

Get the name of the field domain.

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

## ◆ GetSplitPolicy()

OGRFieldDomainSplitPolicy OGRFieldDomain::GetSplitPolicy | ( |  | ) | const
| inline inherited

Get the split policy.

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

## ◆ SetMergePolicy()

void OGRFieldDomain::SetMergePolicy | ( | OGRFieldDomainMergePolicy | policy | ) |
| inline inherited

Set the merge policy.

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

## ◆ SetSplitPolicy()

void OGRFieldDomain::SetSplitPolicy | ( | OGRFieldDomainSplitPolicy | policy | ) |
| inline inherited

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:

- ogr_feature.h
- ogrfielddefn.cpp