function.h

来自「graph是一款linux/unix下绘制数据曲线图形的程序」· C头文件 代码 · 共 91 行

H
91
字号
#ifndef FUNCTION_H_#define FUNCTION_H_#include <glib.h>#include <mgl.h>#include <mgl_c.h>#include <vector>#include <iostream>#include "globals.h"enum DRAW_METHOD{    DM_PLOT,    DM_AREA,    DM_STEM,    DM_STEP,    DM_BARS,    DM_COUNT};enum GRAPH_DIM{    GM_ONE,    GM_TWO,    GM_THREE};struct Function{    Function()    {        data_x = 0;        data_y = 0;        xmin = -2;        xmax = 2;        eq = "";        show = true;        style = "b";        std::cout << "Function::I'm creating!" << std::endl;    }    ~Function()    {        mgl_delete_data(data_x);        mgl_delete_data(data_y);        g_free(eq);        std::cout << "Function::I'm destroying!" << std::endl;    }    gchar *eq;    HMDT data_x;    HMDT data_y;    GRAPH_DIM dims;    DRAW_METHOD dmethod;    bool show;    gdouble xmin, xmax, step;    gchar *style;};typedef std::vector<Function *> FunctionList;FunctionList &functions_get_function_list();voidfunctions_delete();Function *functions_add_function_with_dims1 (gdouble xmin, gdouble xmax, gdouble res);voidfunctions_delete_function (const gint index);gintfunctions_get_count ();voidfunctions_modify_function1 (Function *f, std::string str);std::stringfunctions_get_func_info (const gint num);#endif // FUNCTION_H_

⌨️ 快捷键说明

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