Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F519
propertylistmac.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
fangerau
Sep 17 2010, 7:08 PM
2010-09-17 19:08:58 (UTC+2)
Size
1 KB
Referenced Files
None
Subscribers
None
propertylistmac.patch
View Options
Index: mitkPropertyList.cpp
===================================================================
--- mitkPropertyList.cpp (revision 25989)
+++ mitkPropertyList.cpp (working copy)
@@ -273,19 +273,43 @@
bool mitk::PropertyList::GetBoolProperty(const char* propertyKey, bool& boolValue) const
{
- return GetPropertyValue<bool>(propertyKey, boolValue);
+ BoolProperty *gp = dynamic_cast<BoolProperty*>( GetProperty(propertyKey) );
+ if ( gp != NULL )
+ {
+ boolValue = gp->GetValue();
+ return true;
+ }
+ return false;
+ // Templated Method does not work on Macs
+ //return GetPropertyValue<bool>(propertyKey, boolValue);
}
bool mitk::PropertyList::GetIntProperty(const char* propertyKey, int &intValue) const
{
- return GetPropertyValue<int>(propertyKey, intValue);
+ IntProperty *gp = dynamic_cast<IntProperty*>( GetProperty(propertyKey) );
+ if ( gp != NULL )
+ {
+ intValue = gp->GetValue();
+ return true;
+ }
+ return false;
+ // Templated Method does not work on Macs
+ //return GetPropertyValue<int>(propertyKey, intValue);
}
bool mitk::PropertyList::GetFloatProperty(const char* propertyKey, float &floatValue) const
{
- return GetPropertyValue<float>(propertyKey, floatValue);
+ FloatProperty *gp = dynamic_cast<FloatProperty*>( GetProperty(propertyKey) );
+ if ( gp != NULL )
+ {
+ floatValue = gp->GetValue();
+ return true;
+ }
+ return false;
+ // Templated Method does not work on Macs
+ //return GetPropertyValue<float>(propertyKey, floatValue);
}
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
497
Default Alt Text
propertylistmac.patch (1 KB)
Attached To
Mode
T3893: [Dashboard] dartclient failed to pass mitkBaseDataTest
Attached
Detach File
Event Timeline
fangerau
added a comment.
Sep 17 2010, 7:08 PM
2010-09-17 19:08:58 (UTC+2)
Comment Actions
patch for making propertylist run on macs
Log In to Comment