Mercurial > hg > orthanc
changeset 2858:39b171502059
added SingleValueObject: a simple implementation of a IDynamicObject that stores a single typed value
author | am@osimis.io |
---|---|
date | Fri, 05 Oct 2018 10:39:42 +0200 |
parents | 482631e4e290 |
children | dedc2befbf41 |
files | Core/IDynamicObject.h |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/IDynamicObject.h Wed Oct 03 16:13:19 2018 +0200 +++ b/Core/IDynamicObject.h Fri Oct 05 10:39:42 2018 +0200 @@ -50,4 +50,27 @@ { } }; + + /** + * This class is a simple implementation of a IDynamicObject that stores a single typed value + */ + template <typename T> + class SingleValueObject : public Orthanc::IDynamicObject + { + private: + T value_; + public: + SingleValueObject(const T& value) : + value_(value) + { + } + virtual ~SingleValueObject() + { + } + + const T& GetValue() const + { + return value_; + } + }; }