Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / ATL

CM_ConfigBuilder 1.2g: Visual Studio 6/Visual Studio 2005/Visual Studio 2008 Code Generator for Application Settings Graphic Management

Rate me:
Please Sign up or sign in to vote.
4.94/5 (126 votes)
12 Feb 2008CPOL17 min read 696.4K   9.8K   262  
CM_ConfigBuilder generates and compiles the required files to manage your application's settings/preferences and to store/retrieve them in XML format.
// XmlMemberValidation_StaticEnum.h: interface for the CXmlMemberValidation_StaticEnum class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_XMLMEMBERVALIDATION_STATICENUM_H_)
#define _XMLMEMBERVALIDATION_STATICENUM_H_

#include <map>
#include <string>
#include "XmlSerializable.h"

using namespace std;

class CXmlMemberValidation_StaticEnumItem;

typedef map<string, CXmlMemberValidation_StaticEnumItem*> StaticEnumItemsMap;

class CXmlMemberValidation_StaticEnum : public CXmlSerializable
{
public:
	CXmlMemberValidation_StaticEnum();
	virtual ~CXmlMemberValidation_StaticEnum();

	// implementation of XmlBaseElement
	//
	virtual bool BuildFromXml(CXMLDOMNode& node);
	virtual bool AppendToDOMDocument(CXMLDOMDocument2& xmlDoc, 
									 CXMLDOMElement& parentElement, 
									 bool parentIsValid = true);

	
	
	static string GetXmlNodeName() {return "StaticEnum";}

	// Enum Items management
	//
	StaticEnumItemsMap* GetItems();
	void AddEnumItem(const string& name, const string& value, const string& description);
	void Clear();
	
protected:
	
	virtual void SetDefaults();

	StaticEnumItemsMap items_;
};

#endif // !defined(_XMLMEMBERVALIDATION_STATICENUM_H_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Italy Italy
For all Stefano's latest code, binaries and tutorials visit www.codemachines.com

Comments and Discussions