ML Reference
mlApplicationProperties.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_APPLICATION_PROPERTIES_H
14#define ML_APPLICATION_PROPERTIES_H
15
17
18#include "mlUtilsSystem.h"
19#include <string>
20
21ML_UTILS_START_NAMESPACE
22
27{
28 public:
31 static std::string getString(const char* propertyName, const std::string& defaultValue = std::string());
32
35 static MLint32 getInt(const char* propertyName, MLint32 defaultValue = 0);
36
39 static bool getBool(const char* propertyName, bool defaultValue = false);
40
43 static double getDouble(const char* propertyName, double defaultValue = 0);
44
47 static bool hasProperty(const char* propertyName);
48};
49
50ML_UTILS_END_NAMESPACE
51
52#endif
Static class that defines an interface to access properties of the host application.
static double getDouble(const char *propertyName, double defaultValue=0)
Get double property, returns given defaultValue if property is unknown (or if propertyName is NULL).
static bool getBool(const char *propertyName, bool defaultValue=false)
Get bool property, returns given defaultValue if property is unknown (or if propertyName is NULL).
static std::string getString(const char *propertyName, const std::string &defaultValue=std::string())
Get string property, returns given defaultValue if property is unknown (or if propertyName is NULL).
static bool hasProperty(const char *propertyName)
Returns true if the property exists, false otherwise (or if propertyName is NULL).
static MLint32 getInt(const char *propertyName, MLint32 defaultValue=0)
Get int property, returns given defaultValue if property is unknown (or if propertyName is NULL).
signed int MLint32
Definition mlTypeDefs.h:161
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
Definition mlUtilities.h:20