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

Commit 252c040

Browse files
committed
Formatting parameter-framework code with clang-format
Signed-off-by: Thomas Cahuzac <thomasx.cahuzac@intel.com>
1 parent d73c2e4 commit 252c040

177 files changed

Lines changed: 3925 additions & 3287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

parameter/AreaConfiguration.cpp

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,31 @@
3232
#include "ConfigurationAccessContext.h"
3333
#include <assert.h>
3434

35-
CAreaConfiguration::CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet)
35+
CAreaConfiguration::CAreaConfiguration(const CConfigurableElement *pConfigurableElement,
36+
const CSyncerSet *pSyncerSet)
3637
: _pConfigurableElement(pConfigurableElement), _pSyncerSet(pSyncerSet)
3738
{
3839
// Size blackboard
3940
_blackboard.setSize(_pConfigurableElement->getFootPrint());
4041
}
4142

42-
CAreaConfiguration::CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet, size_t size)
43+
CAreaConfiguration::CAreaConfiguration(const CConfigurableElement *pConfigurableElement,
44+
const CSyncerSet *pSyncerSet, size_t size)
4345
: _pConfigurableElement(pConfigurableElement), _pSyncerSet(pSyncerSet)
4446
{
4547
// Size blackboard
4648
_blackboard.setSize(size);
4749
}
4850

4951
// Save data from current
50-
void CAreaConfiguration::save(const CParameterBlackboard* pMainBlackboard)
52+
void CAreaConfiguration::save(const CParameterBlackboard *pMainBlackboard)
5153
{
5254
copyFrom(pMainBlackboard, _pConfigurableElement->getOffset());
5355
}
5456

5557
// Apply data to current
56-
bool CAreaConfiguration::restore(CParameterBlackboard* pMainBlackboard,
57-
bool bSync,
58-
core::Results* errors) const
58+
bool CAreaConfiguration::restore(CParameterBlackboard *pMainBlackboard, bool bSync,
59+
core::Results *errors) const
5960
{
6061
assert(_bValid);
6162

@@ -66,7 +67,7 @@ bool CAreaConfiguration::restore(CParameterBlackboard* pMainBlackboard,
6667
}
6768

6869
// Ensure validity
69-
void CAreaConfiguration::validate(const CParameterBlackboard* pMainBlackboard)
70+
void CAreaConfiguration::validate(const CParameterBlackboard *pMainBlackboard)
7071
{
7172
if (!_bValid) {
7273

@@ -84,7 +85,7 @@ bool CAreaConfiguration::isValid() const
8485
}
8586

8687
// Ensure validity against given valid area configuration
87-
void CAreaConfiguration::validateAgainst(const CAreaConfiguration* pValidAreaConfiguration)
88+
void CAreaConfiguration::validateAgainst(const CAreaConfiguration *pValidAreaConfiguration)
8889
{
8990
// Should be called on purpose
9091
assert(!_bValid);
@@ -103,7 +104,9 @@ void CAreaConfiguration::validateAgainst(const CAreaConfiguration* pValidAreaCon
103104
}
104105

105106
// XML configuration settings parsing
106-
bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurableElementSettingsElementContent, CConfigurationAccessContext& configurationAccessContext)
107+
bool CAreaConfiguration::serializeXmlSettings(
108+
CXmlElement &xmlConfigurableElementSettingsElementContent,
109+
CConfigurationAccessContext &configurationAccessContext)
107110
{
108111
// Assign blackboard to configuration context
109112
configurationAccessContext.setParameterBlackboard(&_blackboard);
@@ -112,7 +115,8 @@ bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurableElemen
112115
configurationAccessContext.setBaseOffset(_pConfigurableElement->getOffset());
113116

114117
// Parse configuration settings (element contents)
115-
if (_pConfigurableElement->serializeXmlSettings(xmlConfigurableElementSettingsElementContent, configurationAccessContext)) {
118+
if (_pConfigurableElement->serializeXmlSettings(xmlConfigurableElementSettingsElementContent,
119+
configurationAccessContext)) {
116120

117121
if (!configurationAccessContext.serializeOut()) {
118122

@@ -125,36 +129,40 @@ bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurableElemen
125129
}
126130

127131
// Compound handling
128-
const CConfigurableElement* CAreaConfiguration::getConfigurableElement() const
132+
const CConfigurableElement *CAreaConfiguration::getConfigurableElement() const
129133
{
130134
return _pConfigurableElement;
131135
}
132136

133-
void CAreaConfiguration::copyToOuter(CAreaConfiguration* pToAreaConfiguration) const
137+
void CAreaConfiguration::copyToOuter(CAreaConfiguration *pToAreaConfiguration) const
134138
{
135139
assert(_pConfigurableElement->isDescendantOf(pToAreaConfiguration->getConfigurableElement()));
136140

137-
copyTo(&pToAreaConfiguration->_blackboard, _pConfigurableElement->getOffset() - pToAreaConfiguration->getConfigurableElement()->getOffset());
141+
copyTo(&pToAreaConfiguration->_blackboard,
142+
_pConfigurableElement->getOffset() -
143+
pToAreaConfiguration->getConfigurableElement()->getOffset());
138144
}
139145

140-
void CAreaConfiguration::copyFromOuter(const CAreaConfiguration* pFromAreaConfiguration)
146+
void CAreaConfiguration::copyFromOuter(const CAreaConfiguration *pFromAreaConfiguration)
141147
{
142148
assert(_pConfigurableElement->isDescendantOf(pFromAreaConfiguration->getConfigurableElement()));
143149

144-
copyFrom(&pFromAreaConfiguration->_blackboard, _pConfigurableElement->getOffset() - pFromAreaConfiguration->getConfigurableElement()->getOffset());
150+
copyFrom(&pFromAreaConfiguration->_blackboard,
151+
_pConfigurableElement->getOffset() -
152+
pFromAreaConfiguration->getConfigurableElement()->getOffset());
145153

146154
// Inner becomes valid
147155
setValid(true);
148156
}
149157

150-
CParameterBlackboard& CAreaConfiguration::getBlackboard()
158+
CParameterBlackboard &CAreaConfiguration::getBlackboard()
151159
{
152160
return _blackboard;
153161
}
154162

155-
const CParameterBlackboard& CAreaConfiguration::getBlackboard() const
163+
const CParameterBlackboard &CAreaConfiguration::getBlackboard() const
156164
{
157-
return _blackboard;
165+
return _blackboard;
158166
}
159167

160168
// Store validity
@@ -164,13 +172,12 @@ void CAreaConfiguration::setValid(bool bValid)
164172
}
165173

166174
// Blackboard copies
167-
void CAreaConfiguration::copyTo(CParameterBlackboard* pToBlackboard, size_t offset) const
175+
void CAreaConfiguration::copyTo(CParameterBlackboard *pToBlackboard, size_t offset) const
168176
{
169177
pToBlackboard->restoreFrom(&_blackboard, offset);
170178
}
171179

172-
void CAreaConfiguration::copyFrom(const CParameterBlackboard* pFromBlackboard, size_t offset)
180+
void CAreaConfiguration::copyFrom(const CParameterBlackboard *pFromBlackboard, size_t offset)
173181
{
174-
pFromBlackboard->saveTo(&_blackboard, offset);
182+
pFromBlackboard->saveTo(&_blackboard, offset);
175183
}
176-

parameter/AreaConfiguration.h

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ class CConfigurationAccessContext;
4040
class CAreaConfiguration
4141
{
4242
public:
43-
CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet);
43+
CAreaConfiguration(const CConfigurableElement *pConfigurableElement,
44+
const CSyncerSet *pSyncerSet);
4445

4546
virtual ~CAreaConfiguration() = default;
4647

4748
// Save data from current
48-
void save(const CParameterBlackboard* pMainBlackboard);
49+
void save(const CParameterBlackboard *pMainBlackboard);
4950

5051
/** Restore the configuration area
5152
*
@@ -54,56 +55,57 @@ class CAreaConfiguration
5455
* @param[out] errors, errors encountered during restoration
5556
* @return true if success false otherwise
5657
*/
57-
bool restore(CParameterBlackboard* pMainBlackboard, bool bSync, core::Results* errors) const;
58+
bool restore(CParameterBlackboard *pMainBlackboard, bool bSync, core::Results *errors) const;
5859

5960
// Ensure validity
60-
void validate(const CParameterBlackboard* pMainBlackboard);
61+
void validate(const CParameterBlackboard *pMainBlackboard);
6162

6263
// Return validity
6364
bool isValid() const;
6465

6566
// Ensure validity against given valid area configuration
66-
void validateAgainst(const CAreaConfiguration* pValidAreaConfiguration);
67+
void validateAgainst(const CAreaConfiguration *pValidAreaConfiguration);
6768

6869
// Compound handling
69-
const CConfigurableElement* getConfigurableElement() const;
70+
const CConfigurableElement *getConfigurableElement() const;
7071

7172
// Configuration merging
72-
virtual void copyToOuter(CAreaConfiguration* pToAreaConfiguration) const;
73+
virtual void copyToOuter(CAreaConfiguration *pToAreaConfiguration) const;
7374

7475
// Configuration splitting
75-
virtual void copyFromOuter(const CAreaConfiguration* pFromAreaConfiguration);
76+
virtual void copyFromOuter(const CAreaConfiguration *pFromAreaConfiguration);
7677

7778
// XML configuration settings parsing/composing
78-
bool serializeXmlSettings(CXmlElement& xmlConfigurableElementSettingsElementContent, CConfigurationAccessContext& configurationAccessContext);
79+
bool serializeXmlSettings(CXmlElement &xmlConfigurableElementSettingsElementContent,
80+
CConfigurationAccessContext &configurationAccessContext);
7981

8082
// Fetch the Configuration Blackboard
81-
CParameterBlackboard& getBlackboard();
82-
const CParameterBlackboard& getBlackboard() const;
83+
CParameterBlackboard &getBlackboard();
84+
const CParameterBlackboard &getBlackboard() const;
8385

8486
protected:
85-
CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet, size_t size);
87+
CAreaConfiguration(const CConfigurableElement *pConfigurableElement,
88+
const CSyncerSet *pSyncerSet, size_t size);
8689

8790
private:
8891
// Blackboard copies
89-
virtual void copyTo(CParameterBlackboard* pToBlackboard, size_t offset) const;
90-
virtual void copyFrom(const CParameterBlackboard* pFromBlackboard, size_t offset);
92+
virtual void copyTo(CParameterBlackboard *pToBlackboard, size_t offset) const;
93+
virtual void copyFrom(const CParameterBlackboard *pFromBlackboard, size_t offset);
9194

9295
// Store validity
9396
void setValid(bool bValid);
9497

9598
protected:
9699
// Associated configurable element
97-
const CConfigurableElement* _pConfigurableElement;
100+
const CConfigurableElement *_pConfigurableElement;
98101

99102
// Configurable element settings
100103
CParameterBlackboard _blackboard;
101104

102105
private:
103106
// Syncer set (required for immediate synchronization)
104-
const CSyncerSet* _pSyncerSet;
107+
const CSyncerSet *_pSyncerSet;
105108

106109
// Area configuration validity (invalid area configurations can't be restored)
107110
bool _bValid{false};
108111
};
109-

0 commit comments

Comments
 (0)