#include <mitkPropertyManager.h>
Public Types | |
| typedef std::set< std::string > | PropertyNameSet |
Public Member Functions | |
| const PropertyNameSet & | GetDefaultPropertyNames () |
| BaseProperty::Pointer | CreateDefaultProperty (std::string name) |
| bool | GetDefaultLimits (const std::string &name, std::pair< float, float > &minMax) |
Static Public Member Functions | |
| static PropertyManager * | GetInstance () |
Protected Types | |
| typedef std::map< std::string, std::pair< float, float > > | PropertyLimitsMap |
Protected Member Functions | |
| PropertyManager () | |
Static Protected Member Functions | |
| static void | InitDefaultPropertyNames () |
Protected Attributes | |
| PropertyNameSet | m_DefaultPropertyNameSet |
| PropertyLimitsMap | m_PropertyLimits |
Definition at line 27 of file mitkPropertyManager.h.
typedef std::map< std::string, std::pair<float,float> > mitk::PropertyManager::PropertyLimitsMap [protected] |
Definition at line 41 of file mitkPropertyManager.h.
| typedef std::set<std::string> mitk::PropertyManager::PropertyNameSet |
Definition at line 30 of file mitkPropertyManager.h.
| mitk::PropertyManager::PropertyManager | ( | ) | [protected] |
Definition at line 23 of file mitkPropertyManager.cpp.
References m_DefaultPropertyNameSet, and m_PropertyLimits.
{
m_DefaultPropertyNameSet.insert(std::string("visible"));
m_PropertyLimits.insert(std::make_pair("opacity",std::make_pair(0.0f,1.0f)));
}
| mitk::BaseProperty::Pointer mitk::PropertyManager::CreateDefaultProperty | ( | std::string | name ) |
Definition at line 37 of file mitkPropertyManager.cpp.
References mitk::BoolProperty::New().
{
mitk::BaseProperty::Pointer newProperty(NULL);
if ( name == "visible" )
{
newProperty = mitk::BoolProperty::New(true);
}
else
{
//MITK_INFO << "Warning: non-existing default property requested: " << name << std::endl;
}
return newProperty;
}
| bool mitk::PropertyManager::GetDefaultLimits | ( | const std::string & | name, |
| std::pair< float, float > & | minMax | ||
| ) |
Definition at line 50 of file mitkPropertyManager.cpp.
References QuadProgPP::max(), and min.
{
PropertyLimitsMap::iterator it = m_PropertyLimits.find(name.c_str());
if (it != m_PropertyLimits.end())
{
minMax = it->second;
return true;
}
else
{
minMax = std::make_pair(std::numeric_limits<float>::min(),std::numeric_limits<float>::max());
return false;
}
}
| const mitk::PropertyManager::PropertyNameSet & mitk::PropertyManager::GetDefaultPropertyNames | ( | ) |
Definition at line 33 of file mitkPropertyManager.cpp.
{
return m_DefaultPropertyNameSet;
};
| mitk::PropertyManager * mitk::PropertyManager::GetInstance | ( | ) | [static] |
Definition at line 28 of file mitkPropertyManager.cpp.
{
static mitk::PropertyManager propManager;
return &propManager;
}
| static void mitk::PropertyManager::InitDefaultPropertyNames | ( | ) | [static, protected] |
Definition at line 39 of file mitkPropertyManager.h.
Referenced by PropertyManager().
Definition at line 42 of file mitkPropertyManager.h.
Referenced by PropertyManager().
1.7.2