⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functionlist.h

📁 表达式计算expression evaluate expression evaluate expression evaluate
💻 H
字号:
/******************************************************************************
文件名          :FunctionList.h
版本号          : 1.0
作者            : Amos Peng
生成日期        :2008-07-08
最近修改        :
功能描述        :自定义函数列表
函数列表        :

*******************************************************************************/
#ifndef _FUNCTIONLIST_H_
#define _FUNCTIONLIST_H_

// Includes
#include <string>
#include <vector>
#include <new>
#include "Except.h"
#include "Nodes.h"
#include "FunctionFactory.h"


// Part of expreval namespace
namespace ExprEval
{
    // Forward declarations
    class CFunctionNode;
    class CExpression;
            
    // Function list
    //--------------------------------------------------------------------------
    class CFunctionList
    {
        public:
            typedef ::std::vector<CFunctionFactory*>::size_type size_type;
                
            CFunctionList();
            ~CFunctionList();
        
            // Add a function factory to the list
            void Add(CFunctionFactory *factory);
        
            // Create a node for a function
            CFunctionNode *Create(const ::std::string &name, CExpression *expr);
        
            // Initialize default functions
            void AddDefaultFunctions();
        
            // Free items and clear memory
            void Clear();
    
        private:
            ::std::vector<CFunctionFactory*> m_functions;
    };
        
}

#endif // __EXPREVAL_FUNCLIST_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -