MCPcopy Create free account
hub / github.com/AsPJT/DungeonTemplateLibrary / OutputStringBool

Class OutputStringBool

include/DTL/Console/OutputStringBool.hpp:35–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#######################################################################################*/
34 template<typename Matrix_Var_, typename OutputString_ = ::std::string>
35 class OutputStringBool {
36 private:
37
38
39 ///// エイリアス (Alias) /////
40
41 using Index_Size = ::dtl::type::size;
42
43
44
45 ///// メンバ変数 (Member Variable) /////
46
47 Index_Size start_x{};
48 Index_Size start_y{};
49 Index_Size width{};
50 Index_Size height{};
51 OutputString_ false_string{};
52 OutputString_ true_string{};
53
54
55 ///// 代入処理 /////
56
57 template<typename Matrix_>
58 DTL_VERSIONING_CPP17_NODISCARD
59 constexpr inline Matrix_Var_ outputSTL(const Matrix_& matrix_, const Index_Size point_x_, const Index_Size point_y_) const noexcept {
60 return matrix_[point_y_][point_x_];
61 }
62 template<typename Matrix_>
63 DTL_VERSIONING_CPP17_NODISCARD
64 constexpr inline Matrix_Var_ outputArray(const Matrix_& matrix_, const Index_Size point_x_, const Index_Size point_y_, const Index_Size max_x_) const noexcept {
65 return matrix_[point_y_ * max_x_ + point_x_];
66 }
67 template<typename Matrix_>
68 DTL_VERSIONING_CPP17_NODISCARD
69 constexpr inline Matrix_Var_ outputLayer(const Matrix_& matrix_, const Index_Size layer_, const Index_Size point_x_, const Index_Size point_y_) const noexcept {
70 return matrix_[point_y_][point_x_][layer_];
71 }
72 template<typename Matrix_>
73 DTL_VERSIONING_CPP17_NODISCARD
74 constexpr inline Matrix_Var_ outputList(const Matrix_& matrix_) const noexcept {
75 return matrix_;
76 }
77
78 template<typename Matrix_, typename Function_>
79 DTL_VERSIONING_CPP17_NODISCARD
80 constexpr inline Matrix_Var_ outputSTL(const Matrix_& matrix_, const Index_Size point_x_, const Index_Size point_y_, Function_&& function_) const noexcept {
81 return function_(matrix_[point_y_][point_x_]);
82 }
83 template<typename Matrix_, typename Function_>
84 DTL_VERSIONING_CPP17_NODISCARD
85 constexpr inline Matrix_Var_ outputArray(const Matrix_& matrix_, const Index_Size point_x_, const Index_Size point_y_, const Index_Size max_x_, Function_&& function_) const noexcept {
86 return function_(matrix_[point_y_ * max_x_ + point_x_]);
87 }
88 template<typename Matrix_, typename Function_>
89 DTL_VERSIONING_CPP17_NODISCARD
90 constexpr inline Matrix_Var_ outputLayer(const Matrix_ & matrix_, const Index_Size layer_, const Index_Size point_x_, const Index_Size point_y_, Function_ && function_) const noexcept {
91 return function_(matrix_[point_y_][point_x_][layer_]);
92 }

Callers

nothing calls this directly

Calls 4

drawMethod · 0.95
drawArrayMethod · 0.95
drawOperatorMethod · 0.95
drawOperatorArrayMethod · 0.95

Tested by

no test coverage detected