# MTConfigProp

The MTConfigProp object represents a configuration property. This class provides methods to get or set the name and value of the property and to get or set an attribute set (MTConfigAttribSet) associated with this property.

## Program ID

MetraTech.MTConfigProp.1

## MTConfigProp Methods

AddProp | Adds a value with the specified type into the property.
SetNameValue | Sets the given XML name/value pair.
SetPropSet | Sets the XML property set.

## MTConfigProp Properties

AttribSet | Gets/sets the map of XML attributes associated with this property.
Name | Gets/sets the name of the config property.
PropType | Gets the property's type.
PropValue | Gets the value of the property as a variant.
Value | Gets the property type and property value as a variant.
ValueAsString | Gets the value of the property as a string.

## Example

Example to be provided in a future release of this online help system.

# Method Detail

## AddProp

Adds a value with the specified type into the property.

### Visual Basic Syntax

Sub AddProp(aType As PropValType, aVal)

### C++ Syntax

STDMETHODIMP CMTConfigProp::AddProp(PropValType aType,VARIANT aVal)

### Arguments

aType

The property type. The legal values are listed in the enumerated type, PropValType.

aVal

The value as a variant.

## SetNameValue

Sets the given XML name/value pair.

### Visual Basic Syntax

N/A

### C++ Syntax

void CMTConfigProp::SetNameValue(XMLConfigNameVal * apNameVal)

### Arguments

XMLConfigNameVal * apNameVal

An XML name/value pair.

## SetPropSet

Sets the XML property set.

### Visual Basic Syntax

N/A

### C++ Syntax

void CMTConfigProp::SetPropSet(XMLConfigPropSet * apPropSet)

### Arguments

XMLConfigPropSet * apPropSet

The XML property set.

# Property Detail

## AttribSet

Gets/sets the map of XML attributes associated with this property.

This property is read/writeable.

### Visual Basic Syntax

Property AttribSet As MTConfigAttribSet

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_AttribSet(IMTConfigAttribSet** ppAttribSet)

STDMETHODIMP CMTConfigProp::put_AttribSet(/*[in]*/ IMTConfigAttribSet* pAttribSet)

### Arguments

ppAttribSet

Map of XML attributes associated with this property.

### Return Value

Map of XML attributes associated with this property as a MTConfigAttribSet object.

## Name

Gets/sets the name of the config prop.

This property is read/writeable.

### Visual Basic Syntax

Property Name As String

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_Name(BSTR * pVal)

STDMETHODIMP CMTConfigProp::put_Name(BSTR pVal)

### Arguments

pVal

The name.

### Return Value

pVal

The name.

## PropType

Gets the property's type.

This property is read-only.

### Visual Basic Syntax

Property PropType As PropValType

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_PropType(/*[out]*/ PropValType * apType)

### Return Value

apType

The property's type. The legal values are listed in the enumerated type, PropValType.

## PropValue

Gets the value of the property as a variant.

This is a read-only property.

### Visual Basic Syntax

Property PropValue As Variant

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_PropValue(/*[out, retval]*/ VARIANT *pVal)

### Return Value

pVal

The value as a variant.

## Value

Gets the property type and property value as a variant.

This property is read-only.

### Visual Basic Syntax

Property Value(apType As PropValType)

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_Value(PropValType * apType, VARIANT *pVal)

### Arguments

PropValType * apType

The property's type. The legal values are listed in the enumerated type, PropValType.

### Return Value

pVal

The value as a variant.

## ValueAsString

Gets the value of the property as a string.

This property is read-only.

### Visual Basic Syntax

Property ValueAsString As String

### C++ Syntax

STDMETHODIMP CMTConfigProp::get_ValueAsString(BSTR *pVal)

### Return Value

The value as a string.

# Enumerated Types Detail

## PropValType

PROP_TYPE_UNKNOWN = 0
PROP_TYPE_DEFAULT = 1
PROP_TYPE_INTEGER = 2
PROP_TYPE_DOUBLE = 3
PROP_TYPE_STRING = 4
PROP_TYPE_DATETIME = 5
PROP_TYPE_TIME = 6
PROP_TYPE_BOOLEAN = 7
PROP_TYPE_SET = 8
PROP_TYPE_OPAQUE = 9
PROP_TYPE_ENUM = 10
PROP_TYPE_DECIMAL = 11