![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
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 TSLVariant & | enumeration () const |
const TSLFieldDefinition * | getChildField (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 TSLVariant & | maxExclusive () const |
void | maxInclusive (const TSLVariant &maxInclusive) |
const TSLVariant & | maxInclusive () 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 TSLVariant & | minExclusive () const |
void | minInclusive (const TSLVariant &minInclusive) |
const TSLVariant & | minInclusive () 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) |
TSLFieldDefinition::TSLFieldDefinition | ( | ) |
Default constructor.
TSLFieldDefinition::TSLFieldDefinition | ( | const TSLFieldDefinition & | rhs | ) |
Copy constructor
void TSLFieldDefinition::destroy | ( | ) |
Destroy the TSLFieldDefinition object.
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.
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.
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.
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.
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.
index | The index of the child field to query. |
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.
field | The child field definition |
insertIndex | The 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. |
const char * TSLFieldDefinition::key | ( | ) | const |
Query the key used in the TSLFieldDefinition.
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.
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.
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.
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.
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.
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.
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.
const int * TSLFieldDefinition::maxLength | ( | ) | const |
Query the maximum length of the value defined by this TSLFieldDefinition.
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.
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.
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.
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.
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.
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.
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.
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.
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.
const int * TSLFieldDefinition::minOccurs | ( | ) | const |
Query the minimum occurrences value which is stored within the TSLFieldDefinition.
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.
const char * TSLFieldDefinition::name | ( | ) | const |
Query the human-readable field name which is held by the TSLFieldDefinition.
void TSLFieldDefinition::name | ( | const char * | name | ) |
Set the human-readable field name to be stored within the TSLFieldDefinition object.
bool TSLFieldDefinition::nillable | ( | ) | const |
Query whether or not the TSLFieldDefinition is nillable.
void TSLFieldDefinition::nillable | ( | bool | nillable | ) |
Set whether or not the TSLFieldDefinition is nillable.
By default, the TSLFieldDefinition is nillable.
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.
void * TSLFieldDefinition::operator new | ( | size_t | size | ) |
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.
int TSLFieldDefinition::precision | ( | ) | const |
Query the decimal precision of the TSLFieldDefinition.
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.
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.
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.
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.
index | The index of the child field to query. |
TSLVariantType TSLFieldDefinition::type | ( | ) | const |
Query the type of the TSLFieldDefinition.
void TSLFieldDefinition::type | ( | TSLVariantType | type | ) |
Set the type of the TSLFieldDefinition.
The type of field defaults to TSLVariantTypeChar.