valuelistitem.h

来自「表达式计算expression evaluate expression eval」· C头文件 代码 · 共 56 行

H
56
字号
/******************************************************************************
文件名          :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 + =
减小字号Ctrl + -
显示快捷键?