281 lines
12 KiB
C++
281 lines
12 KiB
C++
/**
|
|
* @file KglGenParameter.h
|
|
*
|
|
* Copyright (c) 2019 Keyence Corporation.
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <KglResult.h>
|
|
#include <KglDefine.h>
|
|
|
|
#include <cstdint>
|
|
|
|
namespace Keyence
|
|
{
|
|
|
|
class KglString;
|
|
class KglGenParameterArray;
|
|
class KglFeatureEventSink;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Feature parameter class.
|
|
* \~Japanese @brief Featureパラメータクラスです。
|
|
*/
|
|
class KGLLIB_API KglGenParameter
|
|
{
|
|
public:
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Default constructor.
|
|
* \~Japanese @brief デフォルトコンストラクタ。
|
|
*/
|
|
KglGenParameter(){}
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Destructor.
|
|
* \~Japanese @brief デストラクタ。
|
|
*/
|
|
virtual ~KglGenParameter(){}
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the feature name.
|
|
* \~Japanese @brief Feature名称を取得します。
|
|
* \~English @return Feature name.
|
|
* Returns a null character if not available.
|
|
* \~Japanese @return Feature名称。
|
|
* 取得できない場合は空文字を返します。
|
|
*/
|
|
virtual KglString getName() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the parameter type of a feature.
|
|
* \~Japanese @brief Featureのパラメータ種別を取得します。
|
|
* \~English @param [out] type Parameter type.
|
|
* \~Japanese @param [out] type パラメータ種別。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getType(KglFeatureType& type) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the category the feature belongs to.
|
|
* \~Japanese @brief Featureの属するカテゴリを取得します。
|
|
* \~English @param [out] category Category the feature belongs to.
|
|
* \~Japanese @param [out] category Featureの属するカテゴリ。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getCategory(KglString& category) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the tooltip for a feature.
|
|
* \~Japanese @brief Featureのツールチップを取得します。
|
|
* \~English @param [out] toolTip Tooltip for the feature.
|
|
* \~Japanese @param [out] toolTip Featureに対するツールチップ。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getToolTip(KglString& toolTip) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the description of a feature.
|
|
* \~Japanese @brief Featureの説明を取得します。
|
|
* \~English @param [out] description Description of the feature.
|
|
* \~Japanese @param [out] description Featureの説明。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getDescription(KglString& description) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the display name of a feature.
|
|
* \~Japanese @brief Featureの表示用名称を取得します。
|
|
* \~English @param [out] displayName Display name of the feature.
|
|
* \~Japanese @param [out] displayName Featureの表示用名称。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getDisplayName(KglString& displayName) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the namespace of a feature.
|
|
* \~Japanese @brief Featureのネームスペースを取得します。
|
|
* \~English @param [out] nameSpace Namespace of the feature.
|
|
* \~Japanese @param [out] nameSpace Featureのネームスペース。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getNameSpace(KglNameSpace& nameSpace) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the visibility level of a feature.
|
|
* \~Japanese @brief Featureの可視レベルを取得します。
|
|
* \~English @param [out] visibility Visibility level of the feature.
|
|
* \~Japanese @param [out] visibility Featureの可視レベル。
|
|
* \~English @retval KGL_ERR_NOT_INITIALIZED An invalid KglGenParameter.
|
|
* \~Japanese @retval KGL_ERR_NOT_INITIALIZED 無効なKglGenParameterです。
|
|
* \~English @retval KGL_GENERIC_ERROR An unexpected exception has occurred.
|
|
* \~Japanese @retval KGL_GENERIC_ERROR 予期しない例外が発生しました。
|
|
* \~English @retval KGL_SUCCESS Success.
|
|
* \~Japanese @retval KGL_SUCCESS 成功。
|
|
*/
|
|
virtual KglResult getVisibility(KglVisibility& visibility) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the value of a feature is cached on the PC.
|
|
* \~Japanese @brief Featureの値がPC上にキャッシュされるか否かを取得します。
|
|
* \~English @retval true Cached.
|
|
* \~Japanese @retval true キャッシュされます。
|
|
* \~English @retval false Not cached.
|
|
* \~Japanese @retval false キャッシュされません。
|
|
*/
|
|
virtual bool isValueCached() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the feature is available.
|
|
* \~Japanese @brief Featureが利用可能か否かを取得します。
|
|
* \~English @retval true Available.
|
|
* \~Japanese @retval true 利用可能。
|
|
* \~English @retval false Not available.
|
|
* \~Japanese @retval false 利用不可。
|
|
*/
|
|
virtual bool isAvailable() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the feature is writable.
|
|
* \~Japanese @brief Featureが書込可能か否かを取得します。
|
|
* \~English @retval true Writable.
|
|
* \~Japanese @retval true 書込可能。
|
|
* \~English @retval false Not writable.
|
|
* \~Japanese @retval false 書込不可。
|
|
*/
|
|
virtual bool isWritable() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the feature is readable.
|
|
* \~Japanese @brief Featureが読込可能か否かを取得します。
|
|
* \~English @retval true Readable.
|
|
* \~Japanese @retval true 読込可能。
|
|
* \~English @retval false Not readable.
|
|
* \~Japanese @retval false 読込不可。
|
|
*/
|
|
virtual bool isReadable() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the feature is readable and writable.
|
|
* \~Japanese @brief Featureがファイル読書可能か否かを取得します。
|
|
* \~English @retval true Readable and writable from/to file.
|
|
* \~Japanese @retval true ファイル読書可能。
|
|
* \~English @retval false Not readable or writable from/to file.
|
|
* \~Japanese @retval false ファイル読書不可。
|
|
*/
|
|
virtual bool isStreamable() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the specified visibility level is allowed.
|
|
* \~Japanese @brief 指定した可視レベルで見ることができるか否かを取得します。
|
|
* \~English @param [in] visibility Visibility level.
|
|
* \~Japanese @param [in] visibility 可視レベル。
|
|
* \~English @retval true Allowed.
|
|
* \~Japanese @retval true 見ることができます。
|
|
* \~English @retval false Not allowed.
|
|
* \~Japanese @retval false 見ることができません。
|
|
*/
|
|
virtual bool isVisible(const KglVisibility visibility) const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves whether the feature is a selector.
|
|
* \~Japanese @brief Featureがセレクターか否かを取得します。
|
|
* \~English @retval true Selector.
|
|
* \~Japanese @retval true セレクターです。
|
|
* \~English @retval false Not a selector.
|
|
* \~Japanese @retval false セレクターではありません。
|
|
*/
|
|
virtual bool isSelector() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves the value of a feature as a string.
|
|
* \~Japanese @brief Featureの値を文字列として取得します。
|
|
* \~English @return Value of the feature (string).
|
|
* Returns a null character if not available.
|
|
* \~Japanese @return Featureの値(文字列)。
|
|
* 取得できない場合は空文字を返します。
|
|
*/
|
|
virtual KglString ToString() const = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves all features selected by this feature.
|
|
* \~Japanese @brief 自身がセレクターとなるFeatureを取得します。
|
|
* \~English @return All features selected by this feature.
|
|
* \~Japanese @return 自身がセレクターとなるFeature。
|
|
*/
|
|
virtual KglGenParameterArray* getSelectedFeatures() = 0;
|
|
|
|
//------------------------------------------------------------
|
|
/**
|
|
* \~English @brief Retrieves all selectors for this feature.
|
|
* \~Japanese @brief 自身のセレクターとなるFeatureを取得します。
|
|
* \~English @return All selectors for this feature.
|
|
* \~Japanese @return 自身のセレクターとなるFeature。
|
|
*/
|
|
virtual KglGenParameterArray* getSelectingFeatures() = 0;
|
|
|
|
//-------------------------------------------------------------------------
|
|
friend class KglGenParameterImpl;
|
|
|
|
private:
|
|
|
|
KglGenParameter(const KglGenParameter&);
|
|
const KglGenParameter &operator=(const KglGenParameter&);
|
|
virtual KglResult registerEventSink(KglFeatureEventSink* peventSink) = 0;
|
|
virtual KglResult unregisterEventSink(KglFeatureEventSink* peventSink) = 0;
|
|
};
|
|
|
|
}; //end of namespace Keyence
|