You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cppcx/platform-agile-class.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Represents an object that has a MashalingBehavior=Standard as an agile object, w
25
25
26
26
## Syntax
27
27
28
-
```scr
28
+
```cpp
29
29
30
30
template <typename T>
31
31
classAgile;
@@ -46,24 +46,24 @@ class Agile;
46
46
47
47
|Name|Description|
48
48
|----------|-----------------|
49
-
|[Agile::Agile Constructor](../cppcx/agile-agile-constructor.md)|Initializes a new instance of the Agile class.|
50
-
|[Agile::~Agile Destructor](../cppcx/agile-tilde-agile-destructor.md)|Destroys the current instance of the Agile class.|
49
+
|[Agile::Agile Constructor](#ctor)|Initializes a new instance of the Agile class.|
50
+
|[Agile::~Agile Destructor](#dtor)|Destroys the current instance of the Agile class.|
51
51
52
52
### Public Methods
53
53
54
54
|Name|Description|
55
55
|----------|-----------------|
56
-
|[Agile::Get](../cppcx/agile-get-method.md)|Returns a handle to the object that is represented by the current Agile object.|
57
-
|[Agile::GetAddressOf](../cppcx/agile-getaddressof-method.md)|Reinitializes the current Agile object, and then returns the address of a handle to an object of type `T`.|
58
-
|[Agile::GetAddressOfForInOut](../cppcx/agile-getaddressofforinout-method.md)|Returns the address of a handle to the object represented by the current Agile object.|
59
-
|[Agile::Release](../cppcx/agile-release-method.md)|Discards the current Agile object's underlying object and context.|
56
+
|[Agile::Get](#get)|Returns a handle to the object that is represented by the current Agile object.|
57
+
|[Agile::GetAddressOf](#getaddressof)|Reinitializes the current Agile object, and then returns the address of a handle to an object of type `T`.|
58
+
|[Agile::GetAddressOfForInOut](#getaddressofforinout)|Returns the address of a handle to the object represented by the current Agile object.|
59
+
|[Agile::Release](#release)|Discards the current Agile object's underlying object and context.|
60
60
61
61
### Public Operators
62
62
63
63
|Name|Description|
64
64
|----------|-----------------|
65
-
|[Agile::operator->](../cppcx/agile-operator-arrow-operator.md)|Retrieves a handle to the object represented by the current Agile object.|
66
-
|[Agile::operator=](../cppcx/agile-operator-assign-operator.md)|Assigns the specified value to the current Agile object.|
65
+
|[Agile::operator->](#operator-arrow)|Retrieves a handle to the object represented by the current Agile object.|
66
+
|[Agile::operator=](#operator-assign)|Assigns the specified value to the current Agile object.|
67
67
68
68
## Inheritance Hierarchy
69
69
`Object`
@@ -79,7 +79,7 @@ class Agile;
79
79
80
80
**Header:** agile.h
81
81
82
-
#Agile::Agile Constructor
82
+
## <aname="ctor"></a> Agile::Agile Constructor
83
83
Initializes a new instance of the Agile class.
84
84
85
85
## Syntax
@@ -106,7 +106,7 @@ Agile(Agile<T>&& object);
106
106
## Remarks
107
107
The first version of this constructor is the default constructor. The second version initializes new Agile instance class from the object specified by the `object` parameter. The third version is the copy constructor. The fourth version is the move constructor. This constructor cannot throw exceptions.
108
108
109
-
# Agile::~Agile Destructor
109
+
## <a name="dtor"></a> Agile::~Agile Destructor
110
110
Destroys the current instance of the Agile class.
111
111
112
112
## Syntax
@@ -119,7 +119,7 @@ Destroys the current instance of the Agile class.
119
119
## Remarks
120
120
This destructor also releases the object represented by the current Agile object.
121
121
122
-
# Agile::Get Method
122
+
## <aname="get"></a> Agile::Get Method
123
123
Returns a handle to the object that is represented by the current Agile object.
124
124
125
125
## Syntax
@@ -135,7 +135,7 @@ Returns a handle to the object that is represented by the current Agile object.
135
135
136
136
The type of the return value is actually an undisclosed internal type. A convenient way to hold the return value is to assign it to a variable that is declared with the **auto** type deduction keyword. For example, `auto x = myAgileTvariable->Get();`.
Reinitializes the current Agile object, and then returns the address of a handle to an object of type `T`.
140
140
141
141
## Syntax
@@ -156,7 +156,7 @@ throw();
156
156
## Remarks
157
157
This operation releases the current representation of a object of type `T`, if any; reinitializes the Agile object's data members; acquires the current threading context; and then returns the address of a handle-to-object variable that can represent a non-agile object. To cause an Agile class instance to represent an object, use the assignment operator ([Agile::operator=](../cppcx/agile-operator-assign-operator.md)) to assign the object to the Agile class instance.
Retrieves a handle to the object represented by the current Agile object.
196
196
197
197
## Syntax
@@ -207,16 +207,14 @@ const throw();
207
207
208
208
This operator actually returns an undisclosed internal type. A convenient way to hold the return value is to assign it to a variable that is declared with the **auto** type deduction keyword.
Represents a one-dimensional, modifiable array that can be received and passed across the application binary interface (ABI).
25
25
26
26
## Syntax
27
27
28
-
```cpp
29
-
28
+
```cpp
30
29
template <typename T>
31
-
private ref classArray<TArg,1> :
32
-
public WriteOnlyArray<TArg, 1>,
33
-
public IBoxArray<TArg>
34
-
30
+
private ref classArray<TArg, 1> :
31
+
public WriteOnlyArray<TArg, 1>,
32
+
public IBoxArray<TArg>
35
33
```
36
34
37
35
## Members
@@ -41,7 +39,7 @@ template <typename T>
41
39
42
40
|Name|Description|
43
41
|----------|-----------------|
44
-
|[Array Constructors](../cppcx/array-constructors.md)|Initializes a one-dimensional, modifiable array of types specified by the class template parameter, *T*.|
42
+
|[Array Constructors](#ctor)|Initializes a one-dimensional, modifiable array of types specified by the class template parameter, *T*.|
45
43
46
44
### Methods
47
45
See [Platform::WriteOnlyArray Class](../cppcx/platform-writeonlyarray-class.md).
@@ -50,7 +48,7 @@ template <typename T>
50
48
51
49
|||
52
50
|-|-|
53
-
|[Array::Value Property](../cppcx/array-value-property.md)|Retrieves a handle to the current array.|
51
+
|[Array::Value Property](#value)|Retrieves a handle to the current array.|
54
52
55
53
## Remarks
56
54
The Array class is sealed and cannot be inherited.
@@ -65,7 +63,59 @@ template <typename T>
65
63
66
64
## Requirements
67
65
Compiler option: **/ZW**
66
+
67
+
68
+
## <a name="ctor"></a> Array Constructors
69
+
Initializes a one-dimensional, modifiable array of types specified by the class template parameter, *T*.
70
+
71
+
## Syntax
72
+
73
+
```cpp
74
+
Array(unsigned int size);
75
+
Array(T* data, unsigned int size);
76
+
```
77
+
78
+
#### Parameters
79
+
`T`
80
+
Class template parameter.
81
+
82
+
`size`
83
+
The number of elements in the array.
84
+
85
+
`data`
86
+
A pointer to an array of data of type `T` that is used to initialize this Array object.
87
+
88
+
## Remarks
89
+
For more information about how to create instances of Platform::Array, see [Array and WriteOnlyArray](../cppcx/array-and-writeonlyarray-c-cx.md).
90
+
91
+
## <aname="get"></a> Array::get Method
92
+
Retrieves a reference to the array element at the specified index location.
93
+
94
+
## Syntax
95
+
96
+
```cpp
97
+
T& get(unsigned int index) const;
98
+
```
99
+
100
+
#### Parameters
101
+
`index`
102
+
A zero-based index that identifies an element in the array. The minimum index is 0 and the maximum index is the value specified by the `size` parameter in the [Array constructor](#ctor).
103
+
104
+
## Return Value
105
+
The array element specified by the `index` parameter.
0 commit comments