// CXmlFormItem_CheckBox.cpp
//

#include "stdafx.h"
#include "XmlFormItem_CheckBox.h"

CXmlFormItem_CheckBox::CXmlFormItem_CheckBox()
{}

CXmlFormItem_CheckBox::~CXmlFormItem_CheckBox()
{}

bool CXmlFormItem_CheckBox::BuildFromXml(IXMLDOMNode* node)
{
	/*USES_CONVERSION;

	CXMLDOMNode childNode;
	CXMLDOMNodeList children;
	cmString nodeName;

	children = node.GetChildNodes();
	
	for (long i = 0; i < children.GetLength(); i++) {
		childNode = children.GetItem(i);
	
		nodeName = childNode.GetNodeName();

		if (nodeName == _T("formItem")) {
			CXmlBaseFormItem::BuildFromXml(childNode);
		}  else if (nodeName == _T("caption")) {
			caption_ = childNode.GetNodeTypedValue().bstrVal;
		}
	}*/

	return true;
}

bool CXmlFormItem_CheckBox::AppendToDOMDocument(IXMLDOMDocument2* xmlDoc, IXMLDOMElement* parentElement)
{
	/***
	CXMLDOMElement newElement;
    CXMLDOMElement rectElement;
	CXMLDOMElement member;
   
    newElement = xmlDoc.CreateElement(_T("formItemCheckBox"));

	CXmlBaseFormItem::AppendToDOMDocument(xmlDoc, newElement, parentIsValid);
	
	AppendMemberNode(_T("caption"), caption_, newElement, xmlDoc);

	parentElement.AppendChild(newElement);

    ***/
	return true;
}

enFormItemType CXmlFormItem_CheckBox::GetItemType()
{
	return enFormItemType_CheckBox;
}
	
void CXmlFormItem_CheckBox::SetCaption(const cmString& caption)
{
	caption_ = caption;
}

cmString CXmlFormItem_CheckBox::GetCaption()
{
	return caption_;
}
