GDAL
Public Member Functions | Friends | List of all members
OGRFeature::FieldValue Class Reference

Field value. More...

#include <ogr_feature.h>

Public Member Functions

FieldValueoperator= (const FieldValue &oOther)
 Set a field value from another one. More...
 
FieldValueoperator= (int nVal)
 Set an integer value to the field. More...
 
FieldValueoperator= (GIntBig nVal)
 Set an integer value to the field. More...
 
FieldValueoperator= (double dfVal)
 Set a real value to the field. More...
 
FieldValueoperator= (const char *pszVal)
 Set a string value to the field. More...
 
FieldValueoperator= (const std::string &osVal)
 Set a string value to the field. More...
 
FieldValueoperator= (const std::vector< int > &oArray)
 Set an array of integer to the field. More...
 
FieldValueoperator= (const std::vector< GIntBig > &oArray)
 Set an array of big integer to the field. More...
 
FieldValueoperator= (const std::vector< double > &oArray)
 Set an array of double to the field. More...
 
FieldValueoperator= (const std::vector< std::string > &oArray)
 Set an array of strings to the field. More...
 
FieldValueoperator= (CSLConstList papszValues)
 Set an array of strings to the field. More...
 
void SetNull ()
 Set a null value to the field. More...
 
void clear ()
 Unset the field. More...
 
void Unset ()
 Unset the field. More...
 
void SetDateTime (int nYear, int nMonth, int nDay, int nHour=0, int nMinute=0, float fSecond=0.f, int nTZFlag=0)
 Set date time value/.
 
int GetIndex () const
 Return field index. More...
 
const OGRFieldDefnGetDefn () const
 Return field definition. More...
 
const char * GetName () const
 Return field name. More...
 
OGRFieldType GetType () const
 Return field type. More...
 
OGRFieldSubType GetSubType () const
 Return field subtype. More...
 
bool empty () const
 Return whether the field value is unset/empty. More...
 
bool IsUnset () const
 Return whether the field value is unset/empty. More...
 
bool IsNull () const
 Return whether the field value is null. More...
 
const OGRFieldGetRawValue () const
 Return the raw field value.
 
int GetInteger () const
 Return the integer value. More...
 
GIntBig GetInteger64 () const
 Return the 64-bit integer value. More...
 
double GetDouble () const
 Return the double value. More...
 
const char * GetString () const
 Return the string value. More...
 
bool GetDateTime (int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, float *pfSecond, int *pnTZFlag) const
 Return the date/time/datetime value. More...
 
 operator int () const
 Return the field value as integer, with potential conversion.
 
 operator GIntBig () const
 Return the field value as 64-bit integer, with potential conversion.
 
 operator double () const
 Return the field value as double, with potential conversion.
 
 operator const char * () const
 Return the field value as string, with potential conversion.
 
 operator const std::vector< int > & () const
 Return the field value as integer list, with potential conversion.
 
 operator const std::vector< GIntBig > & () const
 Return the field value as 64-bit integer list, with potential conversion.
 
 operator const std::vector< double > & () const
 Return the field value as double list, with potential conversion.
 
 operator const std::vector< std::string > & () const
 Return the field value as string list, with potential conversion.
 
 operator CSLConstList () const
 Return the field value as string list, with potential conversion.
 
int GetAsInteger () const
 Return the field value as integer, with potential conversion.
 
GIntBig GetAsInteger64 () const
 Return the field value as 64-bit integer, with potential conversion.
 
double GetAsDouble () const
 Return the field value as double, with potential conversion.
 
const char * GetAsString () const
 Return the field value as string, with potential conversion.
 
const std::vector< int > & GetAsIntegerList () const
 Return the field value as integer list, with potential conversion.
 
const std::vector< GIntBig > & GetAsInteger64List () const
 Return the field value as 64-bit integer list, with potential conversion.
 
const std::vector< double > & GetAsDoubleList () const
 Return the field value as double list, with potential conversion.
 
const std::vector< std::string > & GetAsStringList () const
 Return the field value as string list, with potential conversion.
 

Friends

class OGRFeature
 

Detailed Description

Field value.

Member Function Documentation

◆ clear()

void OGRFeature::FieldValue::clear ( )

Unset the field.

◆ empty()

bool OGRFeature::FieldValue::empty ( ) const
inline

Return whether the field value is unset/empty.

◆ GetDateTime()

bool OGRFeature::FieldValue::GetDateTime ( int *  pnYear,
int *  pnMonth,
int *  pnDay,
int *  pnHour,
int *  pnMinute,
float *  pfSecond,
int *  pnTZFlag 
) const

Return the date/time/datetime value.

◆ GetDefn()

const OGRFieldDefn * OGRFeature::FieldValue::GetDefn ( ) const

Return field definition.

◆ GetDouble()

double OGRFeature::FieldValue::GetDouble ( ) const
inline

Return the double value.

Only use that method if and only if GetType() == OFTReal.

◆ GetIndex()

int OGRFeature::FieldValue::GetIndex ( ) const

Return field index.

◆ GetInteger()

int OGRFeature::FieldValue::GetInteger ( ) const
inline

Return the integer value.

Only use that method if and only if GetType() == OFTInteger.

◆ GetInteger64()

GIntBig OGRFeature::FieldValue::GetInteger64 ( ) const
inline

Return the 64-bit integer value.

Only use that method if and only if GetType() == OFTInteger64.

◆ GetName()

const char* OGRFeature::FieldValue::GetName ( ) const
inline

Return field name.

◆ GetString()

const char* OGRFeature::FieldValue::GetString ( ) const
inline

Return the string value.

Only use that method if and only if GetType() == OFTString.

◆ GetSubType()

OGRFieldSubType OGRFeature::FieldValue::GetSubType ( ) const
inline

Return field subtype.

◆ GetType()

OGRFieldType OGRFeature::FieldValue::GetType ( ) const
inline

Return field type.

◆ IsNull()

bool OGRFeature::FieldValue::IsNull ( ) const

Return whether the field value is null.

◆ IsUnset()

bool OGRFeature::FieldValue::IsUnset ( ) const

Return whether the field value is unset/empty.

◆ operator=() [1/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const FieldValue oOther)

Set a field value from another one.

◆ operator=() [2/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( int  nVal)

Set an integer value to the field.

◆ operator=() [3/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( GIntBig  nVal)

Set an integer value to the field.

◆ operator=() [4/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( double  dfVal)

Set a real value to the field.

◆ operator=() [5/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const char *  pszVal)

Set a string value to the field.

◆ operator=() [6/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const std::string &  osVal)

Set a string value to the field.

◆ operator=() [7/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const std::vector< int > &  oArray)

Set an array of integer to the field.

◆ operator=() [8/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const std::vector< GIntBig > &  oArray)

Set an array of big integer to the field.

◆ operator=() [9/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const std::vector< double > &  oArray)

Set an array of double to the field.

◆ operator=() [10/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( const std::vector< std::string > &  oArray)

Set an array of strings to the field.

◆ operator=() [11/11]

OGRFeature::FieldValue & OGRFeature::FieldValue::operator= ( CSLConstList  papszValues)

Set an array of strings to the field.

◆ SetNull()

void OGRFeature::FieldValue::SetNull ( )

Set a null value to the field.

◆ Unset()

void OGRFeature::FieldValue::Unset ( )
inline

Unset the field.


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

Generated for GDAL by doxygen 1.8.13.