// XmlMemberValidation.h: interface for the CXmlMemberValidation class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_XMLMEMBERVALIDATION_H_)
#define _XMLMEMBERVALIDATION_H_

#include <map>
#include "XmlSerializable.h"
#include "XmlMemberValidation_StaticEnum.h"
#include "XmlMemberValidation_Interval.h"
#include "enums.h"

using namespace std;

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

	// implementation of CXmlSerializable
	//
public:
	virtual bool BuildFromXml(IXMLDOMNode* node);
	virtual bool AppendToDOMDocument(IXMLDOMDocument2* xmlDoc, IXMLDOMElement* parentElement);	
	
	// attributes
	//
	static cmString GetXmlNodeName(){return _T("MemberValidation");}

	void SetValidationMode(enValidationMode mode);
	enValidationMode GetValidationMode() const;

	CXmlMemberValidation_StaticEnum* GetStaticEnum();
	CXmlMemberValidation_Interval* GetIntervalInfo();

	virtual void Clear();
	virtual void SetDefaults();

protected:
		
	enValidationMode validationMode_;

	CXmlMemberValidation_StaticEnum staticEnum_;
	CXmlMemberValidation_Interval intervalInfo_;
};

#endif // !defined(_XMLMEMBERVALIDATION_H_)