KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
IndexToIndex.hpp
[詳解]
1#pragma once
2
3#include <type_traits>
4#include <vector>
5
6/*
7* ÄB̈ɂNX
8*
9*/
10
11namespace ToContainer
12{
13 //TODO indexToIndex
14 //TODO keyToIndex enumŊǗ΂悭Ȃ?
15
16
17 /// <summary>
18 /// Az̈Aʂ̔z̈Bɕϊz
19 /// </summary>
20 /// <typeparam name="IndexTypeA"></typeparam>
21 /// <typeparam name="IndexTypeB"></typeparam>
22 /// <typeparam name=""></typeparam>
23 /// <typeparam name=""></typeparam>
24 template<typename IndexTypeA ,typename IndexTypeB,
25 typename = std::enable_if_t<std::is_integral_v<IndexTypeA>>,
26 typename = std::enable_if_t<std::is_integral_v<IndexTypeB>>
27 >
29 {
30 private:
31 std::vector<IndexTypeA> aArray;
32 std::vector<IndexTypeB> bArray;
33
34 const IndexTypeB& operator[](const IndexTypeA& _aIndex) const
35 {
36 //kokoႤ
37 return bArray[_aIndex];
38 }
39
40 const IndexTypeA& operator[](const IndexTypeB& _bIndex) const
41 {
42 return aArray[_bIndex];
43 }
44
45 public:
46
47 void Set(const IndexTypeA& _aIndex, const IndexTypeB& _bIndex)
48 {
49 aArray
50 }
51
52
53 };
54
55}
Az̈Aʂ̔z̈Bɕϊz
Definition IndexToIndex.hpp:29
const IndexTypeA & operator[](const IndexTypeB &_bIndex) const
Definition IndexToIndex.hpp:40
void Set(const IndexTypeA &_aIndex, const IndexTypeB &_bIndex)
Definition IndexToIndex.hpp:47
std::vector< IndexTypeA > aArray
Definition IndexToIndex.hpp:31
std::vector< IndexTypeB > bArray
Definition IndexToIndex.hpp:32
const IndexTypeB & operator[](const IndexTypeA &_aIndex) const
Definition IndexToIndex.hpp:34
Definition IndexToIndex.hpp:12