Commit b2817efe authored by vlad_burin's avatar vlad_burin
Browse files

IoType now saved, so proper InputProperty can be created in MockUnets.

Properties wrongs types creation fixed.

--HG--
branch : MockCompsTest
parent ea285d715e0f
......@@ -423,7 +423,6 @@ void UBasePropCreator::CreatePropertyMap(RDK::USerStorageXML* serstorage, RDK::U
if(second_type.find("MDVector",0) == 0)
{
// MDVector
size_t pos = second_type.find("MDVector");
if (pos != std::string::npos)
......@@ -438,7 +437,7 @@ void UBasePropCreator::CreatePropertyMap(RDK::USerStorageXML* serstorage, RDK::U
if(matrix_type == typeid(int).name())
{
CreatorProperty<PropType, TypeInt, MDVector<int> >::CreatePropertyByType(serstorage, mock_unet, ptype);
CreatorProperty<PropType, TypeInt, std::map<std::string, MDVector<int> > >::CreatePropertyByType(serstorage, mock_unet, ptype);
return;
}
}
......
......@@ -41,8 +41,9 @@ bool BaseCrPropMockTempl(RDK::USerStorageXML* serstorage, RDK::UMockUNet* mock_u
try{
if(!serstorage->SelectNode(j))
return false;
std::string prop_name = serstorage->GetNodeName();
unsigned int p_type = RDK::atoi(serstorage->GetNodeAttribute("PType"));
std::string prop_name = serstorage->GetNodeName();
unsigned int p_type = RDK::atoi(serstorage->GetNodeAttribute("PType"));
unsigned int io_type = RDK::atoi(serstorage->GetNodeAttribute("IoType"));
if(prop_type == "Parameters")
{
CreatorT::template CreateProperty<ULProperty,ptPubParameter>(serstorage,mock_unet,p_type);
......@@ -59,6 +60,34 @@ bool BaseCrPropMockTempl(RDK::USerStorageXML* serstorage, RDK::UMockUNet* mock_u
serstorage->SelectUp();
continue;
}
// UPropertyInputData
if((io_type & (ipSingle | ipData)) == (ipSingle | ipData))
{
CreatorT::template CreateProperty<UPropertyInputData,ptPubInput>(serstorage,mock_unet,p_type);
serstorage->SelectUp();
continue;
}
// UPropertyInput
if((io_type & (ipSingle | ipComp)) == (ipSingle | ipComp))
{
CreatorT::template CreateProperty<UPropertyInput,ptPubInput>(serstorage,mock_unet,p_type);
serstorage->SelectUp();
continue;
}
// UPropertyInputCData
if((io_type & (ipRange | ipData)) == (ipRange | ipData))
{
CreatorT::template CreateProperty<UPropertyInputCData,ptPubInput>(serstorage,mock_unet,p_type);
serstorage->SelectUp();
continue;
}
// UPropertyInputC
if((io_type & (ipRange | ipComp)) == (ipRange | ipComp))
{
CreatorT::template CreateProperty<UPropertyInputC,ptPubInput>(serstorage,mock_unet,p_type);
serstorage->SelectUp();
continue;
}
CreatorT::template CreateProperty<UPropertyInputData,ptPubInput>(serstorage,mock_unet,p_type);
}
else if(prop_type == "Output")
......
......@@ -224,7 +224,7 @@ void UBasePropCreatorVector::CreatePropertySimpleVector(RDK::USerStorageXML* ser
if(type == typeid(bool).name())
{
CreatorProperty<PropType, TypeInt, std::vector<char> >::CreatePropertyByType(serstorage, mock_unet, ptype);
CreatorProperty<PropType, TypeInt, std::vector<bool> >::CreatePropertyByType(serstorage, mock_unet, ptype);
return;
}
if(type == typeid(int).name())
......
......@@ -492,6 +492,7 @@ bool UNet::GetComponentProperties(RDK::USerStorageXML *serstorage, unsigned int
if(serstorage->SelectNode(paramname))
{
serstorage->SetNodeAttribute("PType",sntoa(I->second.Type));
serstorage->SetNodeAttribute("IoType",sntoa(I->second.Property->GetIoType()));
serstorage->SelectUp();
}
}
......@@ -544,6 +545,7 @@ bool UNet::GetComponentPropertiesEx(RDK::USerStorageXML *serstorage, unsigned in
if(serstorage->SelectNode(paramname))
{
serstorage->SetNodeAttribute("PType",sntoa(I->second.Type));
serstorage->SetNodeAttribute("IoType",sntoa(I->second.Property->GetIoType()));
if(descr)
{
serstorage->SetNodeAttribute("Header",descr->GetPropertyDescription(paramname).Header);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment