Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
34ae4103
Commit
34ae4103
authored
Nov 30, 2009
by
Alexander Wiebel
Browse files
[STYLE]
parent
ee420916
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
src/common/WProperties.cpp
src/common/WProperties.cpp
+2
-2
src/common/WProperties.h
src/common/WProperties.h
+10
-10
No files found.
src/common/WProperties.cpp
View file @
34ae4103
...
...
@@ -103,7 +103,7 @@ boost::signals2::signal1< void, std::string >* WProperties::addColor( std::strin
WProperty
*
WProperties
::
findProp
(
std
::
string
name
)
{
if
(
m_propertyList
.
count
(
name
)
!=
0
)
if
(
m_propertyList
.
count
(
name
)
!=
0
)
{
return
m_propertyList
[
name
];
}
...
...
@@ -120,7 +120,7 @@ WProperty* WProperties::findProp( std::string name )
std
::
string
WProperties
::
getValueString
(
const
std
::
string
prop
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
return
findProp
(
prop
)
->
getValueString
();
}
...
...
src/common/WProperties.h
View file @
34ae4103
...
...
@@ -86,10 +86,10 @@ public:
template
<
typename
T
>
void
setValue
(
std
::
string
prop
,
const
T
&
arg
)
{
boost
::
shared_lock
<
boost
::
shared_mutex
>
slock
;
slock
=
boost
::
shared_lock
<
boost
::
shared_mutex
>
(
m_updateLock
);
boost
::
shared_lock
<
boost
::
shared_mutex
>
slock
;
slock
=
boost
::
shared_lock
<
boost
::
shared_mutex
>
(
m_updateLock
);
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
findProp
(
prop
)
->
setValue
(
arg
);
}
...
...
@@ -99,7 +99,7 @@ public:
template
<
typename
T
>
void
setMin
(
std
::
string
prop
,
const
T
&
arg
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
findProp
(
prop
)
->
setMin
(
arg
);
}
...
...
@@ -107,7 +107,7 @@ public:
template
<
typename
T
>
void
setMax
(
std
::
string
prop
,
const
T
&
arg
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
findProp
(
prop
)
->
setMax
(
arg
);
}
...
...
@@ -115,7 +115,7 @@ public:
template
<
typename
T
>
T
getValue
(
std
::
string
prop
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
return
findProp
(
prop
)
->
getValue
<
T
>
();
}
...
...
@@ -126,7 +126,7 @@ public:
template
<
typename
T
>
T
getMin
(
std
::
string
prop
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
return
findProp
(
prop
)
->
getMin
<
T
>
();
}
...
...
@@ -137,7 +137,7 @@ public:
template
<
typename
T
>
T
getMax
(
std
::
string
prop
)
{
if
(
findProp
(
prop
)
)
if
(
findProp
(
prop
)
)
{
return
findProp
(
prop
)
->
getMax
<
T
>
();
}
...
...
@@ -150,9 +150,9 @@ public:
private:
WProperty
*
findProp
(
std
::
string
name
);
std
::
map
<
std
::
string
,
WProperty
*
>
m_propertyList
;
std
::
map
<
std
::
string
,
WProperty
*
>
m_propertyList
;
std
::
vector
<
WProperty
*
>
m_propertyVector
;
std
::
vector
<
WProperty
*
>
m_propertyVector
;
boost
::
shared_mutex
m_updateLock
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment