📄 comfunction.h
字号:
#ifndef ComFunction_H#define ComFunction_H#include "CBaseNode.h"#define CONFIGFILE "comFunction.xml"/////////////////////////////////////////////////////////////////////////////// 存储参数的结构struct tagParameter{ char name[32 + 1]; char value[256 + 1]; char desc[64 + 1];};struct tagConcreteClass{ char ClassName[32 + 1]; char theCountOfParameter[2 + 1]; tagParameter* pameters;};struct tagCommuncatorFactoryConfig{ char theCountOfConcreteClass[2 + 1]; tagConcreteClass *concreteClasses;};class ComFunction{private: // 隐藏默值和拷贝构造函数 ComFunction(void){}; ComFunction(const ComFunction&){}; // static tagCommuncatorFactoryConfig* m_config; static bool m_IsLoaded;public: //从配置文件中取出通讯类的运行参数 配置文件是communcatorfactory.xml static int GetParameterFromXML(); //得到指定具体类的某一个参数 static int GetConcreteClassOnePameterValue(const char* ConcreteClassName, const char* ParameterName, char* value);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -