Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Rework configuration class to avoid complicate behavior
Browse files Browse the repository at this point in the history
Current configuration design is mapping classes on xml node.
It leads to some empty classes which contains a node information.
It also leads to inconsistent information retrieval method. Some
can be retrieved through simple getters and some others are retrieved
through child mechanism inherited from Element.
This patch introduces a real configuration object which is a simple
struct. Information retrieval is handled through xml bindings.

TODO: UPDATE DOC

Signed-off-by: Jules Clero <[email protected]>
  • Loading branch information
clero committed Jun 18, 2015
1 parent dd4280d commit d70c97e
Show file tree
Hide file tree
Showing 16 changed files with 225 additions and 729 deletions.
4 changes: 1 addition & 3 deletions parameter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ add_library(parameter SHARED
ErrorContext.cpp
FixedPointParameterType.cpp
FormattedSubsystemObject.cpp
FrameworkConfigurationLocation.cpp
HardwareBackSynchronizer.cpp
InstanceConfigurableElement.cpp
InstanceDefinition.cpp
Expand All @@ -73,14 +72,12 @@ add_library(parameter SHARED
ParameterBlackboard.cpp
ParameterBlockType.cpp
Parameter.cpp
ParameterFrameworkConfiguration.cpp
ParameterHandle.cpp
ParameterMgr.cpp
ParameterMgrFullConnector.cpp
ParameterMgrPlatformConnector.cpp
ParameterType.cpp
PathNavigator.cpp
PluginLocation.cpp
RuleParser.cpp
SelectionCriterionRule.cpp
SimulatedBackSynchronizer.cpp
Expand All @@ -104,6 +101,7 @@ include_directories(
command/include
"${PROJECT_SOURCE_DIR}/parameter"
"${PROJECT_SOURCE_DIR}/xmlserializer"
"${PROJECT_SOURCE_DIR}/xmlserializer/include"
"${PROJECT_SOURCE_DIR}/utility"
"${PROJECT_SOURCE_DIR}/remote-processor"
"${PROJECT_SOURCE_DIR}/parameter/log/include"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@
*/
#pragma once

#include "KindElement.h"

#include <string>
#include <list>

class CFrameworkConfigurationGroup : public CKindElement
struct Configuration
{
public:
CFrameworkConfigurationGroup(const std::string& strName, const std::string& strKind) : CKindElement(strName, strKind)
{
}

private:
virtual bool childrenAreDynamic() const
{
return true;
}

Configuration(const std::string &file) : configurationFile(file), plugins{} {}

// System class name
std::string systemClassName;
// Tuning allowed
bool tuningAllowed = false;
// Server port
uint16_t serverPort = 0;
std::string configurationFile;
std::string schemasLocation;
std::string structureFile;
std::string settingsFile;
std::string binarySettingsFile;
std::list<std::string> plugins;
};
67 changes: 0 additions & 67 deletions parameter/FrameworkConfigurationLocation.cpp

This file was deleted.

52 changes: 0 additions & 52 deletions parameter/FrameworkConfigurationLocation.h

This file was deleted.

50 changes: 0 additions & 50 deletions parameter/KindElement.h

This file was deleted.

44 changes: 0 additions & 44 deletions parameter/KindElementBuilderTemplate.h

This file was deleted.

81 changes: 0 additions & 81 deletions parameter/ParameterFrameworkConfiguration.cpp

This file was deleted.

Loading

0 comments on commit d70c97e

Please sign in to comment.