// XmlMemberValidation_StaticEnum.h: interface for the CXmlMemberValidation_StaticEnum class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_XMLMEMBERVALIDATION_STATICENUM_H_)
#define _XMLMEMBERVALIDATION_STATICENUM_H_

#include <vector>

#include "XmlSerializable.h"

using namespace std;

class CXmlMemberValidation_StaticEnumItem;

typedef vector<CXmlMemberValidation_StaticEnumItem*> StaticEnumItems;

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

	// implementation of XmlBaseElement
	//
	virtual bool BuildFromXml(IXMLDOMNode* node);
	virtual bool AppendToDOMDocument(IXMLDOMDocument2* xmlDoc, IXMLDOMElement* parentElement);	

	
	static cmString GetXmlNodeName() {return _T("StaticEnum");}

	// Enum Items management
	//
	StaticEnumItems* GetItems();
	void AddEnumItem(const cmString& name, 
					 long enumValue, 
					 const cmString& value, 
					 const cmString& description);
	void Clear();
	
protected:
	
	virtual void SetDefaults();

	StaticEnumItems items_;
};

#endif // !defined(_XMLMEMBERVALIDATION_STATICENUM_H_)
