KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
Kisaragi_Lib::CustomAccessor< T > クラステンプレート

public空間に置くことで,T*のAccessorを提供します, 自らがSetterを定義します [詳解]

#include <Accessor.hpp>

公開メンバ関数

 CustomAccessor (T *_variable, function< T(T)> _setFunc)
 コンストラクタ
 
T * operator-> ()
 
 operator T () const
 
template<typename U = T>
std::enable_if< std::is_arithmetic< U >::value, U >::type operator+ (U _plus) const
 
template<typename U = T>
std::enable_if< if_subtraction< U >::value, U >::type operator- (U _index) const
 
template<typename U = T>
std::enable_if< if_multiplication< U >::value, U >::type operator* (U _index) const
 
template<typename U = T>
std::enable_if< if_division< U >::value, U >::type operator/ (U _index) const
 
template<typename U = T>
std::enable_if< if_remainder< U >::value, U >::type operator% (U _index) const
 
void operator= (T _set)
 
template<typename U = T>
std::enable_if< std::is_arithmetic< U >::value, void >::type operator+= (T _index)
 
template<typename U = T>
std::enable_if< if_subtraction< U >::value, void >::type operator-= (U _index)
 
template<typename U = T>
std::enable_if< if_multiplication< U >::value, void >::type operator*= (U _index)
 
template<typename U = T>
std::enable_if< if_division< U >::value, void >::type operator/= (U _index)
 
template<typename U = T>
std::enable_if< if_remainder< U >::value, void >::type operator%= (U _index)
 

限定公開変数類

ReadOnly< T > readOnly
 
CustomWriteOnly< T > writeOnly
 

詳解

template<class T>
class Kisaragi_Lib::CustomAccessor< T >

public空間に置くことで,T*のAccessorを提供します, 自らがSetterを定義します

テンプレート引数
TAccessorの型

構築子と解体子

◆ CustomAccessor()

template<class T>
Kisaragi_Lib::CustomAccessor< T >::CustomAccessor ( T * _variable,
function< T(T)> _setFunc )
inline

コンストラクタ

引数
_variableAccessorがほしい変数
_setFuncセッタの代入の代わりに行う関数
public空間に置くことで,T*のAccessorを提供します, 自らがSetterを定義します
Definition Accessor.hpp:463
ReadOnly< T > readOnly
Definition Accessor.hpp:466
CustomWriteOnly< T > writeOnly
Definition Accessor.hpp:467

関数詳解

◆ operator->()

template<class T>
T * Kisaragi_Lib::CustomAccessor< T >::operator-> ( )
inline
479 {
480 return writeOnly.operator->();
481 }

◆ operator T()

template<class T>
Kisaragi_Lib::CustomAccessor< T >::operator T ( ) const
inline
487 {
488 //多分暗黙的に変換されるはず...
489 return readOnly.operator T();
490 }

◆ operator+()

template<class T>
template<typename U = T>
std::enable_if< std::is_arithmetic< U >::value, U >::type Kisaragi_Lib::CustomAccessor< T >::operator+ ( U _plus) const
inline
502 {
503 return readOnly.operator+(_plus);
504 }

◆ operator-()

template<class T>
template<typename U = T>
std::enable_if< if_subtraction< U >::value, U >::type Kisaragi_Lib::CustomAccessor< T >::operator- ( U _index) const
inline
510 {
511 return readOnly.operator- (_index);
512 }

◆ operator*()

template<class T>
template<typename U = T>
std::enable_if< if_multiplication< U >::value, U >::type Kisaragi_Lib::CustomAccessor< T >::operator* ( U _index) const
inline
517 {
518 return readOnly.operator* (_index);
519 }

◆ operator/()

template<class T>
template<typename U = T>
std::enable_if< if_division< U >::value, U >::type Kisaragi_Lib::CustomAccessor< T >::operator/ ( U _index) const
inline
524 {
525 return readOnly.operator/ (_index);
526 }

◆ operator%()

template<class T>
template<typename U = T>
std::enable_if< if_remainder< U >::value, U >::type Kisaragi_Lib::CustomAccessor< T >::operator% ( U _index) const
inline
531 {
532 return readOnly.operator% (_index);
533 }

◆ operator=()

template<class T>
void Kisaragi_Lib::CustomAccessor< T >::operator= ( T _set)
inline
540 {
541 writeOnly.operator= (_set);
542 }

◆ operator+=()

template<class T>
template<typename U = T>
std::enable_if< std::is_arithmetic< U >::value, void >::type Kisaragi_Lib::CustomAccessor< T >::operator+= ( T _index)
inline
550 {
551 writeOnly.operator+= (_index);
552 }

◆ operator-=()

template<class T>
template<typename U = T>
std::enable_if< if_subtraction< U >::value, void >::type Kisaragi_Lib::CustomAccessor< T >::operator-= ( U _index)
inline
557 {
558 writeOnly.operator-= (_index);
559 }

◆ operator*=()

template<class T>
template<typename U = T>
std::enable_if< if_multiplication< U >::value, void >::type Kisaragi_Lib::CustomAccessor< T >::operator*= ( U _index)
inline
564 {
565 writeOnly.operator*= (_index);
566 }

◆ operator/=()

template<class T>
template<typename U = T>
std::enable_if< if_division< U >::value, void >::type Kisaragi_Lib::CustomAccessor< T >::operator/= ( U _index)
inline
571 {
572 writeOnly.operator/= (_index);
573 }

◆ operator%=()

template<class T>
template<typename U = T>
std::enable_if< if_remainder< U >::value, void >::type Kisaragi_Lib::CustomAccessor< T >::operator%= ( U _index)
inline
578 {
579 writeOnly.operator%= (_index);
580 }

メンバ詳解

◆ readOnly

◆ writeOnly


このクラス詳解は次のファイルから抽出されました: