#include <ogr_feature.h>
Public Member Functions | |
OGRFieldDefn (const char *, OGRFieldType) | |
OGRFieldDefn (OGRFieldDefn *) | |
void | SetName (const char *) |
const char * | GetNameRef () |
OGRFieldType | GetType () |
void | SetType (OGRFieldType eTypeIn) |
OGRJustification | GetJustify () |
void | SetJustify (OGRJustification eJustifyIn) |
int | GetWidth () |
void | SetWidth (int nWidthIn) |
int | GetPrecision () |
void | SetPrecision (int nPrecisionIn) |
void | Set (const char *, OGRFieldType, int=0, int=0, OGRJustification=OJUndefined) |
void | SetDefault (const OGRField *) |
Static Public Member Functions | |
static const char * | GetFieldTypeName (OGRFieldType) |
OGRFieldDefn::OGRFieldDefn | ( | const char * | pszNameIn, | |
OGRFieldType | eTypeIn | |||
) |
Constructor.
pszNameIn | the name of the new field. | |
eTypeIn | the type of the new field. |
OGRFieldDefn::OGRFieldDefn | ( | OGRFieldDefn * | poPrototype | ) |
Constructor.
Create by cloning an existing field definition.
poPrototype | the field definition to clone. |
const char * OGRFieldDefn::GetFieldTypeName | ( | OGRFieldType | eType | ) | [static] |
Fetch human readable name for a field type.
This static method is the same as the C function OGR_GetFieldTypeName().
eType | the field type to get name for. |
OGRJustification OGRFieldDefn::GetJustify | ( | ) | [inline] |
Get the justification for this field.
This method is the same as the C function OGR_Fld_GetJustify().
const char * OGRFieldDefn::GetNameRef | ( | ) | [inline] |
Fetch name of this field.
This method is the same as the C function OGR_Fld_GetNameRef().
int OGRFieldDefn::GetPrecision | ( | ) | [inline] |
Get the formatting precision for this field. This should normally be zero for fields of types other than OFTReal.
This method is the same as the C function OGR_Fld_GetPrecision().
OGRFieldType OGRFieldDefn::GetType | ( | ) | [inline] |
Fetch type of this field.
This method is the same as the C function OGR_Fld_GetType().
int OGRFieldDefn::GetWidth | ( | ) | [inline] |
Get the formatting width for this field.
This method is the same as the C function OGR_Fld_GetWidth().
void OGRFieldDefn::Set | ( | const char * | pszNameIn, | |
OGRFieldType | eTypeIn, | |||
int | nWidthIn = 0 , |
|||
int | nPrecisionIn = 0 , |
|||
OGRJustification | eJustifyIn = OJUndefined | |||
) |
Set defining parameters for a field in one call.
This method is the same as the C function OGR_Fld_Set().
pszNameIn | the new name to assign. | |
eTypeIn | the new type (one of the OFT values like OFTInteger). | |
nWidthIn | the preferred formatting width. Defaults to zero indicating undefined. | |
nPrecisionIn | number of decimals places for formatting, defaults to zero indicating undefined. | |
eJustifyIn | the formatting justification (OJLeft or OJRight), defaults to OJUndefined. |
void OGRFieldDefn::SetDefault | ( | const OGRField * | puDefaultIn | ) |
Set default field value.
Currently use of OGRFieldDefn "defaults" is discouraged. This feature may be fleshed out in the future.
void OGRFieldDefn::SetJustify | ( | OGRJustification | eJustify | ) | [inline] |
Set the justification for this field.
This method is the same as the C function OGR_Fld_SetJustify().
eJustify | the new justification. |
void OGRFieldDefn::SetName | ( | const char * | pszNameIn | ) |
Reset the name of this field.
This method is the same as the C function OGR_Fld_SetName().
pszNameIn | the new name to apply. |
void OGRFieldDefn::SetPrecision | ( | int | nPrecision | ) | [inline] |
Set the formatting precision for this field in characters.
This should normally be zero for fields of types other than OFTReal.
This method is the same as the C function OGR_Fld_SetPrecision().
nPrecision | the new precision. |
void OGRFieldDefn::SetType | ( | OGRFieldType | eType | ) | [inline] |
Set the type of this field. This should never be done to an OGRFieldDefn that is already part of an OGRFeatureDefn.
This method is the same as the C function OGR_Fld_SetType().
eType | the new field type. |
void OGRFieldDefn::SetWidth | ( | int | nWidth | ) | [inline] |
Set the formatting width for this field in characters.
This method is the same as the C function OGR_Fld_SetWidth().
nWidth | the new width. |