MeVisLab Toolbox Reference
mlDefaultValueCreators.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11#pragma once
12
15
17
24
30
36
42
45{
49
53 std::string createDefaultValue() const override;
54
56 static std::string getMeVisLabVersion();
57
59 static std::string getPlatform();
60
65 static std::string getCompiler();
66
68 static std::string getBitness();
69
71 static std::string getMAC();
72
74 std::string separator;
75
76 // Components to be part of the serial number:
78 std::string prefix;
79
82
85
88
91
93 bool addMAC;
94
96 std::string postfix;
97
98protected:
100 void _addSeparatated(std::string &inStr, const std::string &suffix) const;
101};
102
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
Header file for functors creating specific values.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Helper class to returning a value usable as device serial number.
static std::string getBitness()
Returns "64" on 64 bit systems and "32" on 32 bit systems.
std::string prefix
Prefix to be added at begin of the created serial number.
static std::string getMAC()
Tries to create a decimal coded MAC address or returns "0" instead.
CreateDefaultDeviceSerialNumber()
Constructor enabling all subcomponents and initializing prefix with "SN" (for serial number) and post...
std::string separator
Separator string between components of generated serial numbers.
static std::string getCompiler()
MSC: "1-" + MSCVER gcc: "2-" + gcc-mayor+"."+gcc-minor+"."+gcc-patchlevel (or 0 if not available) app...
bool addMAC
Adds the MAC address if true; see getMAC() for details.
bool addCompiler
Adds a compiler version code, see getCompiler() for details.
bool addMeVisLabVersion
Adds MeVisLab version definition if true.
void _addSeparatated(std::string &inStr, const std::string &suffix) const
Appends separator + suffix to inStr if inStr is not empty, otherwise only suffix is added.
std::string postfix
Prefix to be appended at end the created serial number.
std::string createDefaultValue() const override
Creates and returns a serial number composed from prefix, getMeVisLabVersion(), getPlatform(),...
bool addPlatform
Adds a platform code if true, see getPlatform for details.
bool addBitness
Adds 32 or 64 according to processor bitness.
static std::string getMeVisLabVersion()
Returns the MeVisLab version code such as "305" for MeVisLab 3.5.
static std::string getPlatform()
Returns "0" for unknown, "1" for Windows, "2" for Linux, "3" for MACOS.
Helper class to returning a value usable as manufacturer.
std::string createDefaultValue() const override
Must be overridden in derived classes and return a default value which has specific properties.
Helper class to returning a value usable as manufacturer.
std::string createDefaultValue() const override
Must be overridden in derived classes and return a default value which has specific properties.
Helper class to returning the current MeVisLab version.
std::string createDefaultValue() const override
Must be overridden in derived classes and return a default value which has specific properties.
Base class for classes creating default values.
Helper class to create a DICOM UID as default value.
std::string createDefaultValue() const override
Returns a unique a DICOM UID.