TBoundPointerProperty<PropertyType> (Compact 2013)

3/28/2014

This C++ template class contains a pointer to an object that represents a data source property.

Syntax

template<typename PropertyType>
class TBoundPointerProperty : public TBoundPropertyBase<PropertyType*, XRPtr<PropertyType>>

Inheritance Hierarchy

TBoundPropertyBase<PropertyType,StoreType>

     TBoundPointerProperty<PropertyType>

Template Parameter

  • PropertyType
    The class type for the pointer.

Members

The following tables list any methods or overloaded operators that belong to this class.

Methods

Methods

Description

TBoundPointerProperty.Get

Returns the value of the property.

TBoundPointerProperty.Get(XRValue *)

Obtains the value of the property by using an XRValue object.

Overloaded Operators

Overloaded Operators

Description

TBoundPointerProperty.operator PropertyType*()

Returns the value that is contained by the TBoundPointerProperty<PropertyType> object.

TBoundPointerProperty.operator&

Returns a PropertyType pointer to the property that is contained in the TBoundPointerProperty<PropertyType> object.

TBoundPointerProperty.operator<(_InterfacePtr)

Determines whether the pointer that is contained in a TBoundPointerProperty<PropertyType> object points to a memory address that is less than the memory address of an object that another pointer points to.

TBoundPointerProperty.operator<=(_InterfacePtr)

Determines whether a pointer that is contained in a TBoundPointerProperty<PropertyType> object points to an object at a memory address that is less than or equal to the memory address pointed to by another interface pointer.

TBoundPointerProperty.operator>(_InterfacePtr)

Determines whether a pointer that is contained in a TBoundPointerProperty<PropertyType> object points to an object at an address in memory that is greater than the address pointed to by another pointer.

TBoundPointerProperty.operator>=(_InterfacePtr)

Determines whether a pointer that is contained in a TBoundPointerProperty<PropertyType> object points to an object at an address in memory that is greater than or equal to an address pointed to by another pointer.

TBoundPointerProperty.operator=(const PropertyType *)

Assigns a new value to the property represented by the TBoundPointerProperty<PropertyType> object.

TBoundPointerProperty.operator==(_InterfacePtr)

Determines whether a pointer that is contained in a TBoundPointerProperty<PropertyType> object and another interface pointer both point to an object located at the same address in memory.

TBoundPointerProperty.operator!=(_InterfacePtr)

Determines whether a pointer that is contained in a TBoundPointerProperty<PropertyType> object points to an object at a different memory address from the object pointed to by another pointer.

Thread Safety

Members of this class are not thread-safe when you obtain or set its property value by using its methods. When you are accessing a property’s value, implement single threading and block other operations until the property update is complete. For more information, see XRAutoCriticalSection.

Remarks

A C++ pointer points to a block of memory in which an object is stored. Pointers affect memory usage, and an application must manage their reference count.

TBoundPointerProperty<PropertyType> inherits from TBoundPropertyBase<PropertyType,StoreType>. Use TBoundPointerProperty<PropertyType> to represent a property of a data source object when the property’s value is a pointer and requires object lifetime management.

TBoundPointerProperty<PropertyType> stores the PropertyType pointer as a smart pointer of type XRPtr<Interface>. The TBoundPointerProperty.Get(XRValue *) method and TBoundPointerProperty.operator=(const PropertyType *) operator both use XRPtr<Interface> methods to help provide object lifetime management for the smart pointer.

To set the value of the property, use TBoundPointerProperty.operator=(const PropertyType *), or call the derived method TBoundPropertyBase.Set(const PropertyType&) or TBoundPropertyBase.Set(XRValue *).

To wrap a TBoundPointerProperty<PropertyType> into an XRValue object, the PropertyType object pointer must implement IXREnumerable, IXRPropertyBag, or a derived class such as TPropertyBag<Derived>.

Define a TBoundPointerProperty<PropertyType> object in a data source object that implements TPropertyBag<Derived>. Register the property with the data source object by calling TPropertyBag.RegisterBoundProperty(const ce.wstring&,iXRPropertyBinding &).

Requirements

Header

XRPropertyBag.h

See Also

Reference

Classes for Populating UI Elements with Data
TPropertyBag.RegisterBoundProperty(const ce.wstring&,iXRPropertyBinding &)
IXRFrameworkElement::SetDataContext
TBoundProperty<BSTR>
TBoundProperty<PropertyType>