WebCFace 2.9.0
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
Arg Class Reference

引数の情報を表す。 More...

#include <webcface/arg.h>

Public Member Functions

void mergeConfig (const Arg &other)
 引数のargが持っている情報でthisを上書きする。
 
 Arg (ValType type=ValType::none_)
 
 Arg (const std::shared_ptr< message::Arg > &msg_data)
 
 Arg (const SharedString &name)
 
 Arg (StringInitializer name)
 引数名を設定する。
 
StringView name () const
 引数の名前を取得する。
 
WStringView nameW () const
 引数の名前を取得する。(wstring)
 
ValType type () const
 引数の型を取得する。
 
Argtype (ValType type)
 引数の型を設定する。
 
std::optional< ValAdaptorinit () const
 デフォルト値を取得する。
 
template<typename T >
Arginit (const T &init)
 デフォルト値を設定する。
 
template<std::size_t N>
Arginit (const char(&init)[N])
 
template<std::size_t N>
Arginit (const wchar_t(&init)[N])
 
Arginit (const ValAdaptor &init)
 
std::optional< double > min () const
 最小値を取得する。
 
Argmin (double min)
 最小値を設定する。
 
std::optional< double > max () const
 最大値を取得する。
 
Argmax (double max)
 最大値を設定する。
 
std::vector< ValAdaptoroption () const
 引数の選択肢を取得する。
 
Argoption (std::vector< ValAdaptor > option)
 
template<typename T >
Argoption (std::initializer_list< T > option)
 引数の選択肢を設定する。
 

Friends

struct internal::FuncInfo
 

Detailed Description

引数の情報を表す。

func.setArg({ Arg(引数名).init(初期値).min(最小値).max(最大値), ... }); のように使う

Constructor & Destructor Documentation

◆ Arg() [1/4]

Arg ( ValType  type = ValType::none_)
explicit

msg_dataはnullになる

◆ Arg() [2/4]

Arg ( const std::shared_ptr< message::Arg > &  msg_data)
explicit

msg_dataとtypeを初期化

◆ Arg() [3/4]

Arg ( const SharedString name)
explicit
Since
ver2.0

◆ Arg() [4/4]

Arg ( StringInitializer  name)
inline

引数名を設定する。

ver2.0〜wstring対応、ver2.10〜 StringInitializer 型に変更

Member Function Documentation

◆ init() [1/5]

std::optional< ValAdaptor > init ( ) const

デフォルト値を取得する。

◆ init() [2/5]

template<std::size_t N>
Arg & init ( const char(&)  init[N])
inline
Since
ver2.10

◆ init() [3/5]

template<typename T >
Arg & init ( const T &  init)
inline

デフォルト値を設定する。

◆ init() [4/5]

Arg & init ( const ValAdaptor init)

◆ init() [5/5]

template<std::size_t N>
Arg & init ( const wchar_t(&)  init[N])
inline
Since
ver2.10

◆ max() [1/2]

std::optional< double > max ( ) const

最大値を取得する。

◆ max() [2/2]

Arg & max ( double  max)

最大値を設定する。

  • string型引数の場合最大の文字数を表す。
  • bool型引数の場合効果がない。
  • option() はクリアされる。

◆ mergeConfig()

void mergeConfig ( const Arg other)

引数のargが持っている情報でthisを上書きする。

◆ min() [1/2]

std::optional< double > min ( ) const

最小値を取得する。

◆ min() [2/2]

Arg & min ( double  min)

最小値を設定する。

  • string型引数の場合最小の文字数を表す。
  • bool型引数の場合効果がない。
  • option() はクリアされる。

◆ name()

StringView name ( ) const

引数の名前を取得する。

ver2.10〜 StringView に変更

◆ nameW()

WStringView nameW ( ) const

引数の名前を取得する。(wstring)

Since
ver2.0

ver2.10〜 WStringView に変更

◆ option() [1/3]

std::vector< ValAdaptor > option ( ) const

引数の選択肢を取得する。

◆ option() [2/3]

template<typename T >
Arg & option ( std::initializer_list< T >  option)
inline

引数の選択肢を設定する。

◆ option() [3/3]

Arg & option ( std::vector< ValAdaptor option)

◆ type() [1/2]

ValType type ( ) const

引数の型を取得する。

◆ type() [2/2]

Arg & type ( ValType  type)

引数の型を設定する。

Friends And Related Symbol Documentation

◆ internal::FuncInfo

friend struct internal::FuncInfo
friend

The documentation for this class was generated from the following files: