28 std::string
GetName()
const {
return m_Name; }
30 explicit TestPropertyExtension(
const std::string &name) : m_Name(name) {}
31 ~TestPropertyExtension() {}
45 dynamic_cast<TestPropertyExtension *
>(propertyExtensions->
GetExtension(
"propertyName1").GetPointer());
48 "Get extension of \"propertyName1\"");
51 extension1 =
dynamic_cast<TestPropertyExtension *
>(propertyExtensions->
GetExtension(
"propertyName1").GetPointer());
54 "Get overwritten extension of \"propertyName1\"");
59 dynamic_cast<TestPropertyExtension *
>(propertyExtensions->
GetExtension(
"propertyName1",
"className").GetPointer());
60 extension1 =
dynamic_cast<TestPropertyExtension *
>(propertyExtensions->
GetExtension(
"propertyName1").GetPointer());
62 MITK_TEST_CONDITION(extension1.IsNotNull() && extension1->GetName() ==
"extension1b" && extension2.IsNotNull() &&
63 extension2->GetName() ==
"extension1c",
64 "Get extension of \"propertyName1\" restricted to \"className\"");
#define mitkNewMacro1Param(classname, type)
int mitkPropertyExtensionsTest(int, char *[])
static IPropertyExtensions * GetPropertyExtensions(us::ModuleContext *context=us::GetModuleContext())
Get an IPropertyExtensions instance.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
virtual PropertyExtension::Pointer GetExtension(const std::string &propertyName, const std::string &className="")=0
Get the extension of a specific property.
Interface of property extensions service.
#define MITK_TEST_CONDITION(COND, MSG)
#define mitkClassMacro(className, SuperClassName)
Base class for all property extensions.
static std::string GetName(std::string fileName, std::string suffix)
virtual bool AddExtension(const std::string &propertyName, PropertyExtension::Pointer extension, const std::string &className="", bool overwrite=false)=0
Add an extension to a specific property.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.