本文整理汇总了C++中Distribution::LoadProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ Distribution::LoadProperty方法的具体用法?C++ Distribution::LoadProperty怎么用?C++ Distribution::LoadProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Distribution
的用法示例。
在下文中一共展示了Distribution::LoadProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void Resource::Load(MSXML2::IXMLDOMNodePtr ini)
{
CMSD::CResource resource = ini;
ASSIGN(name ,((std::string) resource.Name[0]).c_str(), L"None");
ASSIGN(identifier ,((std::string) resource.Identifier[0]).c_str(), L"None");
ASSIGN(type ,((std::string) resource.ResourceType[0]).c_str(), L"None");
ASSIGN(description ,((std::string) resource.Description[0]).c_str(), L"None");
ASSIGN(hourlyRate , resource.HourlyRate[0].Value2[0].GetNode()->text, L"None");
ASSIGN(hourlyRateUnit ,((std::string) resource.HourlyRate[0].Unit[0]).c_str(), L"None");
// These are properties
// capacity = CCMSDIntegrator::GetProperty(ini, bstr_t(L"Capacity"), bstr_t(L"1"));
// manufacturer = CCMSDIntegrator::GetProperty(ini, bstr_t(L"Manufacturer"), bstr_t(L"Acme"));
// serial_number = CCMSDIntegrator::GetProperty(ini, bstr_t(L"SerialNumber"), bstr_t(L"Acme"));
PropertyElement().LoadProperties<CMSD::CResource>(resource, properties);
for(int i=0; i< resource.Property.count(); i++)
{
if( resource.Property[i].Name[0].GetNode()->text == bstr_t("MTBF:Measured"))
{
Distribution * astat ( (Distribution *) IObject::CreateSave<Distribution>() );
astat->LoadProperty(resource.Property[i].GetNode());
mtbfid= astat->identifier= this->identifier + "MTBF:Measured";
this->mtbf=astat;
}
else if( resource.Property[i].Name[0].GetNode()->text == bstr_t("MTTR:Measured"))
{
Distribution * astat ( (Distribution *) IObject::CreateSave<Distribution>() );
astat->LoadProperty(resource.Property[i].GetNode());
mttrid= astat->identifier= this->identifier + "MTTR:Measured";
this->mttr=astat;
}
}
}