Commit df7ffcdc authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: removed ComponentSelector->HasMultipleComponents()

parent 37b51dd1
......@@ -68,9 +68,6 @@ public:
unsigned int NumberOfComponents( void );
/** Check for multiple versus 1 or 0 components*/
bool HasMultipleComponents( void );
unsigned int RequireAcceptingInterfaceFrom( ComponentBasePointer other, const InterfaceCriteriaType & interfaceCriteria );
unsigned int RequireProvidingInterfaceTo( ComponentBasePointer other, const InterfaceCriteriaType & interfaceCriteria );
......
......@@ -113,6 +113,7 @@ private:
/** See which components need more configuration criteria */
ComponentNamesType GetNonUniqueComponentNames();
void PrintComponentSelector(std::string);
//TODO make const correct
//Overlord should be constructed with a blueprint.
//Blueprint::ConstPointer m_Blueprint;
......
......@@ -113,13 +113,6 @@ ComponentSelector::GetComponent()
}
bool
ComponentSelector::HasMultipleComponents()
{
return ( this->m_PossibleComponents.size() > 1 );
}
unsigned int
ComponentSelector::NumberOfComponents()
{
......
......@@ -307,6 +307,12 @@ Overlord::PropagateConnectionsWithUniqueComponents()
}
void
Overlord::PrintComponentSelector(std::string componentName)
{
}
bool
Overlord::ConnectComponents()
{
......
......@@ -143,7 +143,7 @@ TEST_F( ComponentFactoryTest, AddCriteria )
EXPECT_NO_THROW( Node1->AddCriterion( nonSelectiveCriterion ) );
ComponentType::Pointer Node1Component;
EXPECT_TRUE( Node1->HasMultipleComponents() );
EXPECT_TRUE( Node1->NumberOfComponents()>1 );
EXPECT_NO_THROW( Node1Component = Node1->GetComponent() );
//Unsufficient criteria means no Component was selected."
EXPECT_TRUE( Node1Component.IsNull() );
......@@ -152,7 +152,7 @@ TEST_F( ComponentFactoryTest, AddCriteria )
EXPECT_NO_THROW( Node1Component = Node1->GetComponent() );
//Sufficient criteria means one Component was selected."
EXPECT_FALSE( Node1->HasMultipleComponents() );
EXPECT_FALSE( Node1->NumberOfComponents()>1 );
EXPECT_FALSE( Node1Component.IsNull() );
//Based on the criteria TransformComponent1 should be selected
EXPECT_STREQ( Node1Component->GetNameOfClass(), "TransformComponent1" );
......@@ -205,7 +205,7 @@ TEST_F( ComponentFactoryTest, UnknownComponent )
ComponentType::Pointer NodeComponent;
// we expect 0 components
EXPECT_FALSE( Node->HasMultipleComponents() );
EXPECT_TRUE( Node->NumberOfComponents() == 0 );
EXPECT_TRUE( Node->GetComponent().IsNull() );
}
} // namespace selx
Supports Markdown
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