MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLFieldDefinition Class Reference

Detailed Description

This class represents the definition of an attribute of a feature. This includes the type, multiplicity, precision, name and other relevant properties of the attribute.

MapLink does not enforce the properties defined in the TSLFieldDefinition on the relevant feature attributes.

Public Member Functions

 TSLFieldDefinition ()
 
 TSLFieldDefinition (const TSLFieldDefinition &rhs)
 
void destroy ()
 
void encoding (const char *encoding)
 
const char * encoding () const
 
void enumeration (const TSLVariant &enumeration)
 
const TSLVariantenumeration () const
 
const TSLFieldDefinitiongetChildField (unsigned int index) const
 
bool insertChildField (const TSLFieldDefinition &field, int insertIndex=-1)
 
void key (const char *key)
 
const char * key () const
 
void length (int length)
 
int length () const
 
void maxExclusive (const TSLVariant &maxExclusive)
 
const TSLVariantmaxExclusive () const
 
void maxInclusive (const TSLVariant &maxInclusive)
 
const TSLVariantmaxInclusive () const
 
void maxLength (const int *maxLength)
 
const int * maxLength () const
 
void maxOccurs (const int *maxOccurs)
 
const int * maxOccurs () const
 
void minExclusive (const TSLVariant &minExclusive)
 
const TSLVariantminExclusive () const
 
void minInclusive (const TSLVariant &minInclusive)
 
const TSLVariantminInclusive () const
 
void minLength (const int *minLength)
 
const int * minLength () const
 
void minOccurs (const int *minOccurs)
 
const int * minOccurs () const
 
void name (const char *name)
 
const char * name () const
 
void nillable (bool nillable)
 
bool nillable () const
 
unsigned int noOfChildFields () const
 
void precision (int precision)
 
int precision () const
 
void referenceTargetType (const char *referenceTargetType)
 
const char * referenceTargetType () const
 
bool removeChildField (unsigned int index)
 
void type (TSLVariantType type)
 
TSLVariantType type () const
 
void * operator new (size_t size) TSL_NO_THROW
 
void * operator new (size_t size, char *filename, int line)
 

Constructor & Destructor Documentation

◆ TSLFieldDefinition() [1/2]

TSLFieldDefinition::TSLFieldDefinition ( )

Default constructor.

◆ TSLFieldDefinition() [2/2]

TSLFieldDefinition::TSLFieldDefinition ( const TSLFieldDefinition & rhs)

Copy constructor

Member Function Documentation

◆ destroy()

void TSLFieldDefinition::destroy ( )

Destroy the TSLFieldDefinition object.

◆ encoding() [1/2]

const char * TSLFieldDefinition::encoding ( ) const

Query the encoding of the TSLFieldDefinition. A NULL value implies that there is no encoding value.

This value is defaulted to an empty string.

The encoding property is intended as a metadata field, used to denote the source attribute type.

◆ encoding() [2/2]

void TSLFieldDefinition::encoding ( const char * encoding)

Set the encoding of the TSLFieldDefinition. Passing a NULL value is invalid and will result in no changes occurring.

This value is defaulted to an empty string.

The encoding property is intended as a metadata field, used to denote the source attribute type.

◆ enumeration() [1/2]

const TSLVariant & TSLFieldDefinition::enumeration ( ) const

Query the enumeration values stored in the field definition.

It is intended that the variant type of the provided enumeration value should match the type specified in the TSLFieldDefinition. The value contained by the enumeration variant should be an array of the permitted possible values that attributes of this field may contain. For instance if the field definition is defined to be of type TSLVariantTypeDouble then the enumeration property should be set to be an array of doubles.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an enumeration value.

By default, the enumeration contains a TSLVariant of type TSLVariantTypeEmpty.

◆ enumeration() [2/2]

void TSLFieldDefinition::enumeration ( const TSLVariant & enumeration)

Set the enumeration values to be stored in the field definition.

It is intended that the variant type of the provided enumeration value should match the type specified in the TSLFieldDefinition. The value contained by the enumeration variant should be an array of the permitted possible values that attributes of this field may contain. For instance if the field definition is defined to be of type TSLVariantTypeDouble then the enumeration property should be set to be an array of doubles.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an enumeration value.

By default, the enumeration contains a TSLVariant of type TSLVariantTypeEmpty.

◆ getChildField()

const TSLFieldDefinition * TSLFieldDefinition::getChildField ( unsigned int index) const

Fields of type TSLVariantTypeVariant are used to define complex feature attributes, meaning that fields can have child fields. This method is used to query previously defined child fields.

Parameters
indexThe index of the child field to query.
Returns
the target child field if one exists or null otherwise.

◆ insertChildField()

bool TSLFieldDefinition::insertChildField ( const TSLFieldDefinition & field,
int insertIndex = -1 )

Fields of type TSLVariantTypeVariant are used to define complex feature attributes, meaning that fields can have child fields. This method allows appending and inserting of child fields.

Parameters
fieldThe child field definition
insertIndexThe index to insert the field. If this value is negative or out of range of the current values, the new field will be appended to the collection.
Returns
true on a successful insertion or false otherwise.

◆ key() [1/2]

const char * TSLFieldDefinition::key ( ) const

Query the key used in the TSLFieldDefinition.

◆ key() [2/2]

void TSLFieldDefinition::key ( const char * key)

Set the key to be used in the TSLFieldDefinition.

This value should be specified as a 2 character code which uniquely identifies this field within the scope of the specified featureID.

This value should be set before the TSLFieldDefinition object is passed to the TSLDataHandler.

◆ length() [1/2]

int TSLFieldDefinition::length ( ) const

Query the desired length of the field.

This value is defaulted to 8.

A value of less than 0 is deemed to be an invalid length and hence no desired length is defined.

◆ length() [2/2]

void TSLFieldDefinition::length ( int length)

Sets the desired length of the field.

This value is defaulted to 8.

A value of less than 0 is deemed to be an invalid length and hence no desired length is defined.

◆ maxExclusive() [1/2]

const TSLVariant & TSLFieldDefinition::maxExclusive ( ) const

Query the "maxExclusive" value which has been set on the TSLFieldDefinition.

It is intended that the variant type of the provided maxExclusive value should match the type specified in the TSLFieldDefinition. The value contained by the maxExclusive variant is used to denote the smallest value, larger than the allowed range, which is not permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an maxExclusive value.

By default, the maxExclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ maxExclusive() [2/2]

void TSLFieldDefinition::maxExclusive ( const TSLVariant & maxExclusive)

Set the "maxExclusive" value to be stored in the field definition.

It is intended that the variant type of the provided maxExclusive value should match the type specified in the TSLFieldDefinition. The value contained by the maxExclusive variant is used to denote the smallest value, larger than the allowed range, which is not permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an maxExclusive value.

By default, the maxExclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ maxInclusive() [1/2]

const TSLVariant & TSLFieldDefinition::maxInclusive ( ) const

Query the "maxInclusive" value which has been set on the TSLFieldDefinition.

It is intended that the variant type of the provided maxInclusive value should match the type specified in the TSLFieldDefinition. The value contained by the maxInclusive variant is used to denote the largest value in the allowed range which is permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an maxInclusive value.

By default, the maxInclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ maxInclusive() [2/2]

void TSLFieldDefinition::maxInclusive ( const TSLVariant & maxInclusive)

Set the "maxInclusive" value to be stored in the field definition.

It is intended that the variant type of the provided maxInclusive value should match the type specified in the TSLFieldDefinition. The value contained by the maxInclusive variant is used to denote the largest value in the allowed range which is permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an maxInclusive value.

By default, the maxInclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ maxLength() [1/2]

const int * TSLFieldDefinition::maxLength ( ) const

Query the maximum length of the value defined by this TSLFieldDefinition.

◆ maxLength() [2/2]

void TSLFieldDefinition::maxLength ( const int * maxLength)

Set the maximum length of the value defined by this TSLFieldDefinition. A NULL value implies that there is no maximum length.

By default, this value is NULL.

◆ maxOccurs() [1/2]

const int * TSLFieldDefinition::maxOccurs ( ) const

Query the maximum occurrences value which is stored within the TSLFieldDefinition. A NULL value implies that there are no maximum occurrences.

◆ maxOccurs() [2/2]

void TSLFieldDefinition::maxOccurs ( const int * maxOccurs)

Set the maximum occurrences value to be stored within the TSLFieldDefinition. A NULL value implies that there are no maximum occurrences.

By default, this value is NULL.

◆ minExclusive() [1/2]

const TSLVariant & TSLFieldDefinition::minExclusive ( ) const

Query the "minExclusive" value which has been set on the TSLFieldDefinition.

It is intended that the variant type of the provided minExclusive value should match the type specified in the TSLFieldDefinition. The value contained by the minExclusive variant is used to denote the largest value, smaller than the allowed range, which is not permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an minExclusive value.

By default, the minExclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ minExclusive() [2/2]

void TSLFieldDefinition::minExclusive ( const TSLVariant & minExclusive)

Set the "minExclusive" value to be stored in the field definition.

It is intended that the variant type of the provided minExclusive value should match the type specified in the TSLFieldDefinition. The value contained by the minExclusive variant is used to denote the largest value, smaller than the allowed range, which is not permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an minExclusive value.

By default, the minExclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ minInclusive() [1/2]

const TSLVariant & TSLFieldDefinition::minInclusive ( ) const

Query the "minInclusive" value which has been set on the TSLFieldDefinition.

It is intended that the variant type of the provided minInclusive value should match the type specified in the TSLFieldDefinition. The value contained by the minInclusive variant is used to denote the smallest value in the allowed range which is permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an minInclusive value.

By default, the minInclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ minInclusive() [2/2]

void TSLFieldDefinition::minInclusive ( const TSLVariant & minInclusive)

Set the "minInclusive" value to be stored in the field definition.

It is intended that the variant type of the provided minInclusive value should match the type specified in the TSLFieldDefinition. The value contained by the minInclusive variant is used to denote the smallest value in the allowed range which is permitted.

Alternatively, a TSLVariant of the type TSLVariantTypeEmpty or TSLVariantTypeNull implies that the TSLFieldDefinition does not contain an minInclusive value.

By default, the minInclusive contains a TSLVariant of type TSLVariantTypeEmpty.

◆ minLength() [1/2]

const int * TSLFieldDefinition::minLength ( ) const

Query the minimum length of the value defined by this TSLFieldDefinition. A NULL value implies that there is no minimum length.

◆ minLength() [2/2]

void TSLFieldDefinition::minLength ( const int * minLength)

Set the minimum length of the value defined by this TSLFieldDefinition. A NULL value implies that there is no minimum length.

By default, this value is NULL.

◆ minOccurs() [1/2]

const int * TSLFieldDefinition::minOccurs ( ) const

Query the minimum occurrences value which is stored within the TSLFieldDefinition.

◆ minOccurs() [2/2]

void TSLFieldDefinition::minOccurs ( const int * minOccurs)

Set the minimum occurrences value to be stored within the TSLFieldDefinition. A NULL value implies that there are no minimum occurrences.

By default, this value is NULL.

◆ name() [1/2]

const char * TSLFieldDefinition::name ( ) const

Query the human-readable field name which is held by the TSLFieldDefinition.

◆ name() [2/2]

void TSLFieldDefinition::name ( const char * name)

Set the human-readable field name to be stored within the TSLFieldDefinition object.

◆ nillable() [1/2]

bool TSLFieldDefinition::nillable ( ) const

Query whether or not the TSLFieldDefinition is nillable.

◆ nillable() [2/2]

void TSLFieldDefinition::nillable ( bool nillable)

Set whether or not the TSLFieldDefinition is nillable.

By default, the TSLFieldDefinition is nillable.

◆ noOfChildFields()

unsigned int TSLFieldDefinition::noOfChildFields ( ) const

Fields of type TSLVariantTypeVariant are used to define complex feature attributes, meaning that fields can have child fields. This method is used to query how many child fields are defined.

Returns the number of child fields.

◆ operator new() [1/2]

void * TSLFieldDefinition::operator new ( size_t size)

◆ operator new() [2/2]

void * TSLFieldDefinition::operator new ( size_t size,
char * filename,
int line )

When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.

◆ precision() [1/2]

int TSLFieldDefinition::precision ( ) const

Query the decimal precision of the TSLFieldDefinition.

◆ precision() [2/2]

void TSLFieldDefinition::precision ( int precision)

Set the decimal precision of the TSLFieldDefinition.

By default, this value is 4.

Note: The precision is only used when exporting data to 3rd party formats where a decimal precision value is required, in normal circumstances MapLink will ignore this value.

◆ referenceTargetType() [1/2]

const char * TSLFieldDefinition::referenceTargetType ( ) const

Query the reference target which is stored within the TSLFieldDefinition object. A NULL value implies that there is no reference target type.

By default, the reference target type is an empty string.

This field is intended to store a metadata string used when ingesting and exporting to the 3rd party data formats. For all other uses it may be used to store user values.

◆ referenceTargetType() [2/2]

void TSLFieldDefinition::referenceTargetType ( const char * referenceTargetType)

Set the reference target type to be stored within the TSLFieldDefinition object. Passing a NULL value is invalid and will result in no changes occurring.

By default, the reference target type is an empty string.

This field is intended to store a metadata string used when ingesting and exporting to the 3rd party data formats. For all other uses it may be used to store user values.

◆ removeChildField()

bool TSLFieldDefinition::removeChildField ( unsigned int index)

Fields of type TSLVariantTypeVariant are used to define complex feature attributes, meaning that fields can have child fields. This method is used to remove child fields.

Parameters
indexThe index of the child field to query.
Returns
true if the target field was successfully removed, false otherwise.

◆ type() [1/2]

TSLVariantType TSLFieldDefinition::type ( ) const

Query the type of the TSLFieldDefinition.

◆ type() [2/2]

void TSLFieldDefinition::type ( TSLVariantType type)

Set the type of the TSLFieldDefinition.

The type of field defaults to TSLVariantTypeChar.