Share via


TBoundPointerProperty.operator=(const PropertyType *) (Compact 2013)

3/28/2014

The = overloaded operator assigns a new value to the property represented by the TBoundPointerProperty<PropertyType> object.

Syntax

const PropertyType* operator=(
const PropertyType * value)

Parameters

  • value
    [in] Pointer to a PropertyType value that is the right operand of a C++ expression.

Return Value

Returns the value of the TBoundPointerProperty<PropertyType> after the new value is assigned.

Remarks

When you use the assignment operator in a C++ expression, XAML for Windows Embedded internally calls TBoundPropertyBase.Set(const PropertyType&) to set the new value. Because the StoreType of the property value is always of type XRPtr<Interface>, when the assignment operator sets the new value, it counts the reference and allocates memory for the pointer.

When you use the = overloaded operator for a TBoundPointerProperty<PropertyType>, use the operator as a function and use the value parameter as the function’s argument instead of an operand in a C++ expression, as shown in the following example.

pValue1->operator =(pValue2);

Requirements

Header

XRPropertyBag.h

See Also

Reference

TBoundPointerProperty<PropertyType>
TBoundPointerProperty.operator PropertyType*()