📄 valuelistitem.h
字号:
/******************************************************************************
文件名 :ValueListItem.h
版本号 : 1.0
作者 : Amos Peng
生成日期 :2008-07-08
最近修改 :
功能描述 :数值列表项
函数列表 :
*******************************************************************************/
#ifndef _VALUELISTITEM_H_
#define _VALUELISTITEM_H_
// Includes
#include <string>
#include <vector>
#include <new>
#include <memory>
#include "Defines.h"
#include "Except.h"
// Part of expreval namespace
namespace ExprEval
{
// Value list item
//--------------------------------------------------------------------------
class CValueListItem
{
public:
CValueListItem(const ::std::string &name, double def = 0.0, bool constant = false);
CValueListItem(const ::std::string &name, double *ptr, double def = 0.0, bool constant = false);
const ::std::string& GetName() const;
bool IsConstant() const;
double* GetAddress();
void Reset();
private:
::std::string m_name; // Name of value
bool m_constant; // Value is constant
double m_value; // Internal value (if ptr == 0)
double *m_ptr; // Pointer to extern value if not 0
double m_def; // Default value when reset
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -