Example #1
0
static void AddBDATopology(IXMLDOMDocument* pDoc,IXMLDOMElement* pParent,const BDATOPOLOGY& t)
{
	HRESULT hr;
	IXMLDOMElementPtr bda_template_connection, bdanode_descriptor, bda_node_properties, bda_node_types, bda_pin_types, bda_node_methods, bda_node_events;

	CreateElement(pDoc,L"ksproperty_bda_template_connections",&bda_template_connection);
	CreateElement(pDoc,L"ksproperty_bda_node_descriptors",&bdanode_descriptor);
	CreateElement(pDoc,L"ksproperty_bda_node_properties",&bda_node_properties);
	CreateElement(pDoc,L"ksproperty_bda_node_types",&bda_node_types);
	CreateElement(pDoc,L"ksproperty_bda_pin_types",&bda_pin_types);
	CreateElement(pDoc,L"ksproperty_bda_node_methods",&bda_node_methods);
	CreateElement(pDoc,L"ksproperty_bda_node_events",&bda_node_events);

	for(size_t n = 0;n<t.bda_template_connection.size();n++)
	{
		AddBDATemplateConnection(pDoc,bda_template_connection,t.bda_template_connection[n]);
	}

	for(size_t n = 0;n<t.bdanode_descriptor.size();n++)
	{
		AddBDANodeDescriptor(pDoc,bdanode_descriptor,t.bdanode_descriptor[n]);
	}

	for(std::map<unsigned long,std::vector<GUID> >::const_iterator it=t.bda_node_properties.begin();it!=t.bda_node_properties.end();it++)
	{
		AddGUIDList(pDoc,bda_node_properties,it);
	}

	for(size_t n = 0;n<t.bda_node_types.size();n++)
	{
		AddULong(pDoc,bda_node_types,t.bda_node_types[n]);
	}

	for(size_t n = 0;n<t.bda_pin_types.size();n++)
	{
		AddULong(pDoc,bda_pin_types,t.bda_pin_types[n]);
	}

	for(std::map<unsigned long,std::vector<GUID> >::const_iterator it=t.bda_node_methods.begin();it!=t.bda_node_methods.end();it++)
	{
		AddGUIDList(pDoc,bda_node_methods,it);
	}

	for(std::map<unsigned long,std::vector<GUID> >::const_iterator it=t.bda_node_events.begin();it!=t.bda_node_events.end();it++)
	{
		AddGUIDList(pDoc,bda_node_events,it);
	}

	AppendChild(bda_template_connection,pParent);
	AppendChild(bdanode_descriptor,pParent);
	AppendChild(bda_node_properties,pParent);
	AppendChild(bda_node_types,pParent);
	AppendChild(bda_pin_types,pParent);
	AppendChild(bda_node_methods,pParent);
	AppendChild(bda_node_events,pParent);
}
LWorkItem& LWorkItem::operator<<(unsigned long ulData)
{
	AddULong(ulData);
	return *this;
}