ir::GPDSPConstantNode class

定数ノードを表す具象クラス

GPDSPConstantNode クラスは, 設定された定数値を出力する定数ノードを表す具象クラスです.

入力ターミナルは持たず, 1つの出力ターミナル "out" を持ちます.

番号入力出力
0-out

gpdsp ファイルでの記述例

<GPDSPConstantNode>
    <name>ノード名</name>
    <param>
        <constant>定数値</constant>
    </param>
</GPDSPConstantNode>

Base classes

class GPDSPOutputtableNode
出力ターミナルを持つノードを表す抽象クラス

Constructors, destructors, conversion operators

GPDSPConstantNode(void) explicit noexcept
コンストラクタです.
~GPDSPConstantNode(void) virtual noexcept
デストラクタです.

Public functions

void setConstant(GPDSPFloat constant) noexcept
定数値を設定します.
GPDSPFloat getConstant(void) const noexcept
定数値を取得します.
GPDSPError fixate(void) virtual noexcept
出力ターミナルを1つ生成します.
GPDSPError prepare(void) virtual noexcept
演算前の準備をします.
GPDSPError process(void) virtual noexcept
演算を行います.
int getCountO(void) const noexcept
出力ターミナルの個数を取得します.
GPDSPError setNameO(int index, std::string const& what) noexcept
出力ターミナルの名前を設定します.
GPDSPError getNameO(int index, std::string* what) const noexcept
出力ターミナルの名前を取得します.
GPDSPError getValueO(int index, GPDSPFloat* value) const noexcept
出力ターミナルの値を取得します.
int findNameO(std::string const& what) const noexcept
引数に指定された名前を持つ出力ターミナルを検索します.
void invalidate(void) virtual noexcept
出力の演算結果を無効化し, 再演算を要求します.

Public static functions

static GPDSPFloat defaultConstant(void) noexcept
デフォルトの定数値を取得します.

Protected functions

GPDSPError setCountO(int count, std::string const& what) noexcept
出力ターミナルの個数と名前を設定します.
GPDSPError setValueO(int index, GPDSPFloat value) noexcept
出力ターミナルの値を設定します.
GPDSPError appendO(std::string const& what) noexcept
引数に指定された名前を持つ出力ターミナルを追加します.
GPDSPError insertO(int index, std::string const& what) noexcept
引数に指定された名前を持つ出力ターミナルを挿入します.
GPDSPError removeO(int index) noexcept
出力ターミナルを削除します.
void clearO(void) noexcept
すべての出力ターミナルを削除します.

Function documentation

ir::GPDSPConstantNode::GPDSPConstantNode(void) explicit noexcept

コンストラクタです.

定数値を defaultConstant() に初期化します.

ir::GPDSPConstantNode::~GPDSPConstantNode(void) virtual noexcept

デストラクタです.

何もしません.

void ir::GPDSPConstantNode::setConstant(GPDSPFloat constant) noexcept

定数値を設定します.

Parameters
constant in 設定する定数値

GPDSPFloat ir::GPDSPConstantNode::getConstant(void) const noexcept

定数値を取得します.

Returns 現在の定数値

GPDSPError ir::GPDSPConstantNode::fixate(void) virtual noexcept

出力ターミナルを1つ生成します.

Returns
GPDSPERROR_OK 正常
GPDSPERROR_NO_MEMORY メモリが不足している

GPDSPError ir::GPDSPConstantNode::prepare(void) virtual noexcept

演算前の準備をします.

Returns
GPDSPERROR_OK 正常 (準備を完了)
GPDSPERROR_INVALID_RANGE 範囲外のパラメータ

GPDSPError ir::GPDSPConstantNode::process(void) virtual noexcept

演算を行います.

何もしません.

Returns
GPDSPERROR_OK 正常 (演算を完了)

static GPDSPFloat ir::GPDSPConstantNode::defaultConstant(void) noexcept

デフォルトの定数値を取得します.

Returns
0.0 デフォルトの定数値