System::Tuple クラス
コンテンツ
[
隠れる
]Tuple class
タプルデータ構造を表すクラスです。最大項目数は 8 です。
template<typename ...>class Tuple : public System::Runtime::CompilerServices::ITuple
| パラメーター | 説明 |
|---|---|
| 引数 | タプル要素の型。 |
メソッド
| メソッド | 説明 |
|---|---|
| Equals(SharedPtr<Object>) override | 現在のオブジェクトと指定されたオブジェクトが同一かどうかを判定します。 |
| get_Item() const | Tuple オブジェクトのコンポーネントの値を取得します。 |
| Tuple(Args…) | タプル オブジェクトを構築します。 |
備考
#include "system/smart_ptr.h"
#include "system/tuple.h"
#include <iostream>
int main()
{
const auto tuple = System::MakeObject<System::Tuple<int, int, int>>(32, 16, 128);
std::cout <<
"Item 1: " << tuple->get_Item<0>() << std::endl <<
"Item 2: " << tuple->get_Item<1>() << std::endl <<
"Item 3: " << tuple->get_Item<2>() << std::endl;
return 0;
}
/*
This code example produces the following output:
Item 1: 32
Item 2: 16
Item 3: 128
*/
参照
- Class ITuple
- Namespace System
- Library Aspose.Page for C++