См. документацию.00001 #ifndef BASECONFIGFILE_H_
00002 #define BASECONFIGFILE_H_
00003
00004 #include <stdlib.h>
00005 #include <XF/xf.h>
00006 #include <XF/xf_api.h>
00007
00008 #include<iostream>
00009 #include<sstream>
00010 #include<string>
00011 #include<iomanip>
00012
00013 using namespace std;
00014
00015
00016 class BaseConfigFile{
00017 protected:
00018 xfMap *conf;
00019 xfNode *root;
00020 xfNode *moduledata_node;
00021 public:
00022 long int getAttrInt(xfNode* node, long int defval=-1);
00023 string getAttrString(xfNode* node, string defval="");
00024 long int xfCharToInt(xfChar* str);
00025 string xfCharToStr(xfChar* str);
00026 long int getModuleAttributeInt(wstring modulename,wstring attr,long int defval);
00027 string getModuleAttributeString(wstring modulename,wstring attr, string defval);
00028 xfNode* getMofuleAttribute(wstring modulename, wstring attr);
00029 BaseConfigFile(){};
00030 BaseConfigFile(char* filename);
00031 char* getModulesDir(){return 0;};
00032 char* getExtendsDir(){return 0;};
00033 xfNode* getModuleDataNode() {return moduledata_node;};
00034 unsigned int getHostIpByName(xfChar* address, int af){return 0;};
00035 unsigned int unicodeToIP(xfChar* cip){return 0;};
00036 xfNode* getModulesSect();
00037 virtual ~BaseConfigFile();
00038 };
00039
00040 #endif