File tree Expand file tree Collapse file tree 9 files changed +78
-24
lines changed Expand file tree Collapse file tree 9 files changed +78
-24
lines changed Original file line number Diff line number Diff line change 1+ # Copy(in void* , in nuint) Method
12
3+ ## Definition
4+ Copies a count of elements in the collection into memory, starting from the bottom of the stack.
5+
6+ ``` C#
7+ public void Copy (in void * ptrDest , in nuint count )
8+ ```
9+
10+ ## Parameters
11+ ` in void* ptrDest `
12+
13+ Pointer to the memory where the elements will be copied
14+
15+ ` in nuint count `
16+
17+ Count of elements to copy
18+
19+
20+ ## Exceptions
21+
22+ ``` C#
23+ Exception
24+ ```
25+ If the collection does not have that many elements
Original file line number Diff line number Diff line change 1+ # Copy(in Class.StackOf{ItemType}) Method
12
3+ ## Definition
4+ Copies a elements in the collection into destination collection.
5+
6+ ``` C#
7+ public void Copy (in Class .StackOf {ItemType } destStack )
8+ ```
9+
10+ ## Parameters
11+ ` in Class.StackOf{ItemType} destStack `
12+
13+ The destination collection where the elements will be copied to
14+
15+ ## Exceptions
16+
17+ ``` C#
18+ ArgumentException
19+ ```
20+ If destination stack not enough capacity
Original file line number Diff line number Diff line change 1- # FreeMemory(nuint ) Method
1+ # Dispose( ) Method
22
33## Definition
4- Free memory.
4+ Disposed the memory used by the collection .
55
66``` C#
7- public void FreeMemory ( nuint reducingBytes )
7+ public void Dispose ( )
88```
99
10- ## Parameters
11- reducingBytes nuint
12-
13- Freed memory size in bytes
14-
15- ## Returns
16- void
17-
18- ## Exceptions
19-
20- ``` C#
21- ObjectDisposedException
22- ```
23- -or-
24-
25- ``` C#
26- Exception
27- ```
28- If all memory is already free
29-
3010## Remark
31- Shifts the Current pointer by -reducingBytes
11+ If the instance was created using a [ constructor on a pointer] ( https://github.com/SoftStoneDevelop/StackMemoryCollections/blob/main/Documentation/Stack/Constructor4.md ) then: do nothing.
Original file line number Diff line number Diff line change 1+ # IEnumerator GetEnumerator() Method
12
3+ ## Definition
4+ Returns an enumerator that iterates through the collection.
5+
6+ ``` C#
7+ System .Collections .IEnumerator System .Collections .IEnumerable .GetEnumerator ()
8+ ```
9+
10+ ## Returns
11+ ` System.Collections.IEnumerator `
12+
13+ An ` IEnumerator ` that can be used to iterate through the collection.
Original file line number Diff line number Diff line change 1+ # IEnumerator<{ItemType}> GetEnumerator() Method
12
3+ ## Definition
4+ Returns an enumerator that iterates through the collection.
5+
6+ ``` C#
7+ public System .Collections .Generic .IEnumerator < {ItemType }> GetEnumerator ()
8+ ```
9+
10+ ## Returns
11+ ` System.Collections.Generic.IEnumerator<{ItemType}> `
12+
13+ An IEnumerator<{ItemType}> that can be used to iterate through the collection.
Original file line number Diff line number Diff line change @@ -18,3 +18,7 @@ Inserted element
1818Exception
1919```
2020If there is no place for the element in the collection
21+
22+ ## Remarks
23+
24+ If the instance was created using a constructor on a memory and no place for the element in the collection then: allocate memory from ` memory ` .
Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ If there is no place for the element in the collection
2121
2222## Remarks
2323For collections on primitive types then ptr is ` {ItemType}* ` pointer instead of ` void* `
24+ If the instance was created using a constructor on a memory and no place for the element in the collection then: allocate memory from ` memory ` .
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ Inserted element
1717` bool `
1818
1919True if element is successfully inserted otherwise False
20+ If the instance was created using a constructor on a memory and no place for the element in the collection then: try allocate memory from ` memory ` .
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ True if element is successfully inserted otherwise False
1919
2020## Remarks
2121For collections on primitive types then ptr is ` {ItemType}* ` pointer instead of ` void* `
22+ If the instance was created using a constructor on a memory and no place for the element in the collection then: try allocate memory from ` memory ` .
You can’t perform that action at this time.
0 commit comments