www.pudn.com > RadiusSrv.rar > profile.h, change:2003-10-22,size:587b


#ifndef _PROFILE_H 
#define _PROFILE_H 
 
#pragma warning(disable:4786) 
 
#include <string> 
#include <map> 
 
using namespace std; 
 
typedef map<string, string> StringMap; 
 
class Section; 
 
typedef bool (*ON_SECTION_PARSED)(Section &sec); 
 
 
class Section { 
public: 
	const char *getName() { 
		return name.c_str(); 
	} 
 
	const char *getString(const char *name, const char *def = ""); 
	int getInteger(const char *name, int def); 
 
	friend bool parseProfile(const char *name, ON_SECTION_PARSED onSectionParsed); 
 
private: 
	string name; 
	StringMap pairs; 
}; 
 
 
#endif