Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
f015fb7c
Commit
f015fb7c
authored
Apr 12, 2014
by
John Chodera (MSKCC)
Browse files
getBoolProperty() now returns bool, instead of it.
parent
8a916db3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
serialization/include/openmm/serialization/SerializationNode.h
...lization/include/openmm/serialization/SerializationNode.h
+2
-2
serialization/src/SerializationNode.cpp
serialization/src/SerializationNode.cpp
+2
-2
No files found.
serialization/include/openmm/serialization/SerializationNode.h
View file @
f015fb7c
...
@@ -158,7 +158,7 @@ public:
...
@@ -158,7 +158,7 @@ public:
*
*
* @param name the name of the property to get
* @param name the name of the property to get
*/
*/
int
getBoolProperty
(
const
std
::
string
&
name
)
const
;
bool
getBoolProperty
(
const
std
::
string
&
name
)
const
;
/**
/**
* Get the property with a particular name, specified as a bool. If there is no property with
* Get the property with a particular name, specified as a bool. If there is no property with
* the specified name, a default value is returned instead.
* the specified name, a default value is returned instead.
...
@@ -166,7 +166,7 @@ public:
...
@@ -166,7 +166,7 @@ public:
* @param name the name of the property to get
* @param name the name of the property to get
* @param defaultValue the value to return if the specified property does not exist
* @param defaultValue the value to return if the specified property does not exist
*/
*/
int
getBoolProperty
(
const
std
::
string
&
name
,
bool
defaultValue
)
const
;
bool
getBoolProperty
(
const
std
::
string
&
name
,
bool
defaultValue
)
const
;
/**
/**
* Set the value of a property, specified as a bool.
* Set the value of a property, specified as a bool.
*
*
...
...
serialization/src/SerializationNode.cpp
View file @
f015fb7c
...
@@ -122,7 +122,7 @@ SerializationNode& SerializationNode::setIntProperty(const string& name, int val
...
@@ -122,7 +122,7 @@ SerializationNode& SerializationNode::setIntProperty(const string& name, int val
}
}
int
SerializationNode
::
getBoolProperty
(
const
string
&
name
)
const
{
bool
SerializationNode
::
getBoolProperty
(
const
string
&
name
)
const
{
map
<
string
,
string
>::
const_iterator
iter
=
properties
.
find
(
name
);
map
<
string
,
string
>::
const_iterator
iter
=
properties
.
find
(
name
);
if
(
iter
==
properties
.
end
())
if
(
iter
==
properties
.
end
())
throw
OpenMMException
(
"Unknown property '"
+
name
+
"' in node '"
+
getName
()
+
"'"
);
throw
OpenMMException
(
"Unknown property '"
+
name
+
"' in node '"
+
getName
()
+
"'"
);
...
@@ -131,7 +131,7 @@ int SerializationNode::getBoolProperty(const string& name) const {
...
@@ -131,7 +131,7 @@ int SerializationNode::getBoolProperty(const string& name) const {
return
value
;
return
value
;
}
}
int
SerializationNode
::
getBoolProperty
(
const
string
&
name
,
bool
defaultValue
)
const
{
bool
SerializationNode
::
getBoolProperty
(
const
string
&
name
,
bool
defaultValue
)
const
{
map
<
string
,
string
>::
const_iterator
iter
=
properties
.
find
(
name
);
map
<
string
,
string
>::
const_iterator
iter
=
properties
.
find
(
name
);
if
(
iter
==
properties
.
end
())
if
(
iter
==
properties
.
end
())
return
defaultValue
;
return
defaultValue
;
...
...
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