IVector<TValue> 介面

定義

定義 STL/CLR vector 物件的介面。Defines the interface for an STL/CLR vector object.

generic <typename TValue>
public interface class IVector : ICloneable, Microsoft::VisualC::StlClr::Generic::IRandomAccessContainer<TValue>, System::Collections::ICollection
public interface IVector<TValue> : ICloneable, Microsoft.VisualC.StlClr.Generic.IRandomAccessContainer<TValue>, System.Collections.ICollection
type IVector<'Value> = interface
    interface IRandomAccessContainer<'Value>
    interface ICloneable
    interface ICollection
    interface IEnumerable
Public Interface IVector(Of TValue)
Implements ICloneable, ICollection, IRandomAccessContainer(Of TValue)

類型參數

TValue

受控制序列中項目的類型。The type of an element in the controlled sequence.

實作

備註

某些方法 (特別是運算子) 會宣告參數的類型,但不會指定參數名稱。Some methods, especially operators, declare a type for a parameter but do not specify a parameter name. 這種參數稱為「未命名參數」 (Unnamed Parameter)。Such a parameter is known as an unnamed parameter. 在這些方法的文件中, __unnamed0 預留位置代表未命名的參數。In the documentation for these methods, the __unnamed0 placeholder represents the unnamed parameter.

屬性

back_item

存取容器的最後一個項目。Accesses the last element of the container.

Count

取得 ICollection 中所包含的項目數。Gets the number of elements contained in the ICollection.

(繼承來源 ICollection)
front_item

存取容器的第一個項目。Accesses the first element of the container.

IsSynchronized

取得值,這個值表示對 ICollection 的存取是否同步 (安全執行緒)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(繼承來源 ICollection)
Item[Int32]

存取容器中位於指定位置的項目。Accesses an element at a specified position in the container.

SyncRoot

取得可用以同步存取 ICollection 的物件。Gets an object that can be used to synchronize access to the ICollection.

(繼承來源 ICollection)

方法

assign(IEnumerable)

以指定列舉中的項目取代容器中的所有項目。Replaces all elements in the container with the elements in the specified enumeration.

assign(IInputIterator<TValue>, IInputIterator<TValue>)

以指定之 Iterator 之間的項目取代容器中的所有項目。Replaces all elements in the container with the elements between the given iterators.

assign(Int32, TValue)

以具有指定值之指定數目的項目取代容器中的所有項目。Replaces all elements in the container with the specified number of elements that have given values.

at(Int32)

存取容器中位於指定位置的項目。Accesses an element at a specified position in the container.

at_bias(Int32)

取得位於容器目前偏差的項目。Gets the element at the current bias of the container. 偏差是從目前的項目零開始的位移。The bias is the offset from the current element zero.

(繼承來源 IRandomAccessContainer<TValue>)
back()

存取容器的最後一個項目。Accesses the last element of the container.

begin(ContainerRandomAccessIterator<TValue>)

指定受控制序列的開頭。Designates the beginning of the controlled sequence.

capacity()

報告容器配置儲存區的大小。Reports the size of allocated storage for the container.

clear()

移除容器中的所有項目。Removes all elements from the container.

Clone()

建立目前執行個體複本的新物件。Creates a new object that is a copy of the current instance.

(繼承來源 ICloneable)
CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製到 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index.

(繼承來源 ICollection)
empty()

測試容器是否沒有項目。Tests whether the container has no elements.

end(ContainerRandomAccessIterator<TValue>)

指定受控制序列的結尾。Designates the end of the controlled sequence.

erase(ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>)

移除由 _Where 所指向之受控制序列的單一項目。Removes the single element of the controlled sequence that is pointed to by _Where.

erase(ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>)

移除範圍 [_First_iter, _Last_iter] 中受控制序列的項目。Removes the elements of the controlled sequence in the range [_First_iter, _Last_iter].

front()

存取容器的第一個項目。Accesses the first element of the container.

get_generation()

取得基礎容器的目前變化層代 (Generation)。Gets the current change generation of the underlying container.

GetEnumerator()

傳回逐一查看集合的列舉值。Returns an enumerator that iterates through a collection.

(繼承來源 IEnumerable)
insert(ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>, TValue)

將指定的值插入容器。Inserts the specified value into the container.

insert(ContainerRandomAccessIterator<TValue>, IEnumerable)

將列舉程式所指定的序列插入容器。Inserts the sequence that is designated by an enumerator into the container.

insert(ContainerRandomAccessIterator<TValue>, IInputIterator<TValue>, IInputIterator<TValue>)

將以 _First 為開頭和以 _Last 之前的項目為結尾的序列插入容器。Inserts the sequence beginning with _First and ending with the element preceding _Last into the container.

insert(ContainerRandomAccessIterator<TValue>, Int32, TValue)

將指定的值插入容器。Inserts the specified value into the container.

pop_back()

從容器移除最後一個項目。Removes the last element from the container.

push_back(TValue)

將新的項目新增至容器結尾。Adds a new element to the end of the container.

rbegin(ReverseRandomAccessIterator<TValue>)

指定反向受控制序列的開頭。Designates the beginning of the reversed controlled sequence.

rend(ReverseRandomAccessIterator<TValue>)

指定反向受控制序列的結尾。Designates the end of the reversed controlled sequence.

reserve(Int32)

保留儲存區,以確保容器最小的成長容量。Reserves storage to ensure the minimum growth capacity for the container.

resize(Int32)

將容器中的項目數目變更為指定的大小。Changes the number of elements in the container to the specified size.

resize(Int32, TValue)

將容器中的項目數目變更為指定的大小。Changes the number of elements in the container to the specified size. 如果新的大小大於舊的大小,此方法會附加具有 _Val 值的項目。If the new size is larger than the old size, the method appends elements that have value _Val.

size()

計算容器中的項目數目。Counts the number of elements in the container.

swap(IVector<TValue>)

交換兩個容器的內容。Swaps the contents of two containers.

valid_bias(Int32)

判斷指定的偏差對容器是否有效。Determines if a given bias is valid for the container. 偏差是從目前的項目零開始的位移。The bias is the offset from the current element zero.

(繼承來源 IRandomAccessContainer<TValue>)

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於