MeVisLab Toolbox Reference
mlImagePropertyExtension.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_IMAGE_PROPERTY_EXTENSION_H
14#define ML_IMAGE_PROPERTY_EXTENSION_H
15
20
21// mlUtils-includes
22#include "mlRuntimeSubClass.h"
23#include <mlUtilsSystem.h>
24
25#include <string>
26#include <vector>
27
29
30//-------------------------------------------------------------------
33//-------------------------------------------------------------------
37
38public:
39
44
47 {
48 }
49
54 virtual bool equals(const ImagePropertyExtension &extImageProps) const = 0;
55
56
61 virtual ImagePropertyExtension *createClone () const = 0;
62
63
67 virtual std::string getValueAsString () const = 0;
68
72 virtual void getValueAsString (std::string &valAsString) const;
73
76 virtual MLErrorCode setValueFromString(const std::string& stringValue) = 0;
77
78
81
84
85
89
90private:
93};
95
96//-------------------------------------------------------------------
98//-------------------------------------------------------------------
99typedef std::vector<ImagePropertyExtension*> ImagePropertyExtensionVector;
100
101
103
104
105//-----------------------------------------------------------------------------------
106// Stream output for std::ostream
107//-----------------------------------------------------------------------------------
108namespace std {
109
111 ML_UTILS_EXPORT ostream& operator<<(ostream& s, const ML_NAMESPACE::ImagePropertyExtension &extIP);
112}
113
114#endif //of __mlImagePropertyExtension_H
115
116
117
Base class from which one can derive own image properties.
virtual bool operator==(const ImagePropertyExtension &extImageProps) const
Implements equality operation based on the equals method.
virtual std::string getValueAsString() const =0
Returns the value of the object as string.
virtual ~ImagePropertyExtension()
Destructor.
virtual MLErrorCode setValueFromString(const std::string &stringValue)=0
Sets the value of a property from the string stringValue and returns ML_RESULT_OK on success or anoth...
virtual bool equals(const ImagePropertyExtension &extImageProps) const =0
Returns true if this object equals extImageProps.
virtual bool operator!=(const ImagePropertyExtension &extImageProps) const
Implements inequality operation based on the equals method.
ImagePropertyExtension()
Default constructor doing nothing.
virtual void getValueAsString(std::string &valAsString) const
Returns the value of the object as string in valAsString.
virtual ImagePropertyExtension * createClone() const =0
Pure virtual method which must return a copy of the current object.
MLint32 MLErrorCode
Type of an ML Error code.
Definition mlTypeDefs.h:716
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_ABSTRACT_ROOT_CLASS_HEADER(className)
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
Definition mlUtilities.h:20
std::vector< ImagePropertyExtension * > ImagePropertyExtensionVector
Define the STL container type of ImagePropertyExtension objects.
STL namespace.
MLEXPORT std::ostream & operator<<(std::ostream &s, const ml::Field &v)
Overloads the operator "<<" for stream output of Field objects.