Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions parameter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ add_library(parameter SHARED
ParameterBlockType.cpp
Parameter.cpp
ParameterFrameworkConfiguration.cpp
ParameterHandle.cpp
ElementHandle.cpp
ParameterMgr.cpp
ParameterMgrFullConnector.cpp
ParameterMgrPlatformConnector.cpp
Expand Down Expand Up @@ -121,6 +121,7 @@ install(TARGETS parameter LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIV
# Client headers
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/parameter_export.h"
include/ElementHandle.h
include/ParameterHandle.h
include/ParameterMgrLoggerForward.h
include/ParameterMgrFullConnector.h
Expand All @@ -133,7 +134,6 @@ install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/parameter_export.h"
BitParameterBlockType.h
ConfigurableElement.h
ConfigurableElementWithMapping.h
DefaultElementLibrary.h
Element.h
ElementBuilder.h
Expand Down
17 changes: 15 additions & 2 deletions parameter/ConfigurableElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,23 @@ void CConfigurableElement::listRogueElements(std::string& strResult) const
}
}

// Belonging to no domains
bool CConfigurableElement::isRogue() const
{
return !getBelongingDomainCount();
// Check not belonging to any domin from current level and towards ascendents
if (getBelongingDomainCount() != 0) {

return false;
}

// Get a list of elements (current + descendants) with no domains associated
std::list<const CConfigurableElement*> rogueElementList;

CConfigurableElementAggregator agregator(rogueElementList, &CConfigurableElement::hasNoDomainAssociated);

agregator.aggegate(this);

// Check only one element found which ought to be current one
return (rogueElementList.size() == 1) && (rogueElementList.front() == this);
}

// Footprint as string
Expand Down
21 changes: 20 additions & 1 deletion parameter/ConfigurableElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ class PARAMETER_EXPORT CConfigurableElement : public CElement
// Elements with no domains
void listRogueElements(std::string& strResult) const;

// Belonging to no domains
/** @return true if element is rogue, false otherwise
*
* An element is rogue if it is disjoint with all domains.
*
* Ie: An element is rogue if neither its descendants, ascendants
* nor itself are associated with any domain.
*
* Ie: An element is *not* rogue if any of its descendants, ascendants
* or itself are associated with at least one domain.
*/
bool isRogue() const;

// Footprint as string
Expand Down Expand Up @@ -143,6 +152,16 @@ class PARAMETER_EXPORT CConfigurableElement : public CElement
// Element properties
virtual void showProperties(std::string& strResult) const;

/**
* Get the value associated to a mapping key in the object's mapping
*
* @param[in] strKey the mapping key
* @param[out] pStrValue the associated value
*
* @return true if @p strKey is found in the object's mapping, false if not
*/
virtual bool getMappingData(const std::string& strKey, const std::string*& pStrValue) const = 0;

// XML configuration settings parsing
virtual bool serializeXmlSettings(CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) const;

Expand Down
55 changes: 0 additions & 55 deletions parameter/ConfigurableElementWithMapping.h

This file was deleted.

Loading