54 lines
1000 B
C++
54 lines
1000 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
using namespace std;
|
|
|
|
class ParamSetCfg
|
|
{
|
|
public:
|
|
typedef struct LaserSet
|
|
{
|
|
double laser_speed;
|
|
double laser_diameter;
|
|
double laser_power;
|
|
} LaserSet;
|
|
|
|
typedef struct PowderSet
|
|
{
|
|
int start_layer;
|
|
int end_layer;
|
|
float powder;
|
|
PowderSet():start_layer(1),end_layer(10),powder(2){}
|
|
} PowderSet;
|
|
|
|
typedef struct ParamSet
|
|
{
|
|
string ConfigName;
|
|
std::map<string, LaserSet*> LaserSetMap;
|
|
std::vector<PowderSet*> PowderSets;
|
|
} ParamSet;
|
|
|
|
public:
|
|
ParamSetCfg();
|
|
~ParamSetCfg();
|
|
|
|
static void Generate(vector<string>& ins);
|
|
void GetUpdateSql(vector<string>& ups);
|
|
bool Add(string name);
|
|
bool Delete(string name);
|
|
|
|
public:
|
|
static const string TABLE_NAME;
|
|
static const string FIELD_ID;
|
|
static const string FIELD_CONFIG_NAME;
|
|
static const string FIELD_SET_TYPE;
|
|
static const string FIELD_DATA1;
|
|
static const string FIELD_DATA2;
|
|
static const string FIELD_DATA3;
|
|
|
|
public:
|
|
std::vector<ParamSet*> ParamSetVec;
|
|
};
|
|
|