OpenIndy-Core  0.2.0.43
util.h
Go to the documentation of this file.
1 #ifndef UTIL_H
2 #define UTIL_H
3 
4 #include <QString>
5 #include <QStringList>
6 #include <QMap>
7 
8 #include "types.h"
9 
10 namespace oi{
11 
12 class FeatureWrapper;
13 
14 //#######################################
15 //global functions to query element types
16 //#######################################
17 
18 QList<ElementTypes> OI_CORE_EXPORT getAvailableElementTypes();
19 QList<FeatureTypes> OI_CORE_EXPORT getAvailableFeatureTypes();
20 QList<GeometryTypes> OI_CORE_EXPORT getAvailableGeometryTypes();
21 
22 const QString OI_CORE_EXPORT &getElementTypeName(const ElementTypes &type);
23 const QString OI_CORE_EXPORT &getElementTypePluralName(const ElementTypes &type);
27 
28 const QString OI_CORE_EXPORT &getFeatureTypeName(const FeatureTypes &type);
30 
31 const QString OI_CORE_EXPORT &getGeometryTypeName(const GeometryTypes &type);
34 
35 bool OI_CORE_EXPORT getIsFeature(const ElementTypes &type);
36 bool OI_CORE_EXPORT getIsReading(const ElementTypes &type);
38 
39 bool OI_CORE_EXPORT getIsGeometry(const FeatureTypes &type);
41 
42 //#########################################################
43 //global function to query icon resources for element types
44 //#########################################################
45 
46 const QString OI_CORE_EXPORT &getElementTypeIconPath(const ElementTypes &type);
47 const QString OI_CORE_EXPORT &getFeatureTypeIconPath(const FeatureTypes &type);
48 
49 //#######################################
50 //global functions to query reading types
51 //#######################################
52 
53 const QString OI_CORE_EXPORT &getReadingTypeName(const ReadingTypes &type);
55 
56 //############################################
57 //global functions to query display attributes
58 //############################################
59 
61 const QList<ObservationDisplayAttributes> OI_CORE_EXPORT &getObservationDisplayAttributes();
62 const QList<ReadingDisplayAttributes> OI_CORE_EXPORT &getReadingDisplayAttributes();
63 
64 bool OI_CORE_EXPORT getIsFeatureDisplayAttribute(const int &attr);
66 
67 const QString OI_CORE_EXPORT &getFeatureDisplayAttributeName(const int &attr);
70 
72 
75 
78 
79 //###############################
80 //global functions to query units
81 //###############################
82 
83 double OI_CORE_EXPORT convertToDefault(const double &value, const UnitType &type);
84 double OI_CORE_EXPORT convertFromDefault(const double &value, const UnitType &type);
85 
86 const QString OI_CORE_EXPORT &getUnitTypeName(const UnitType &type);
87 UnitType OI_CORE_EXPORT getUnitTypeEnum(const QString &name);
88 
89 //######################################
90 //global functions to query sensor types
91 //######################################
92 
93 QList<SensorTypes> OI_CORE_EXPORT getAvailableSensorTypes();
94 const QString OI_CORE_EXPORT &getSensorTypeName(const SensorTypes &type);
95 SensorTypes OI_CORE_EXPORT getSensorTypeEnum(const QString &name);
96 
97 //##########################################
98 //global functions to query sensor functions
99 //##########################################
100 
101 QList<SensorFunctions> OI_CORE_EXPORT getAvailableSensorFunctions();
102 const QString OI_CORE_EXPORT &getSensorFunctionName(const SensorFunctions &type);
104 
105 //#########################################
106 //global function to query connection types
107 //#########################################
108 
109 QList<ConnectionTypes> OI_CORE_EXPORT getAvailableConnectionTypes();
110 const QString OI_CORE_EXPORT &getConnectionTypeName(const ConnectionTypes &type);
112 
113 //####################################
114 //global functions to query tool types
115 //####################################
116 
117 QList<ToolTypes> OI_CORE_EXPORT getAvailableToolTypes();
118 const QString OI_CORE_EXPORT &getToolTypeName(const ToolTypes &type);
119 ToolTypes OI_CORE_EXPORT getToolTypeEnum(const QString &name);
120 
121 //#######################################
122 //global functions to query message types
123 //#######################################
124 
125 QList<MessageTypes> OI_CORE_EXPORT getAvailableMessageTypes();
126 const QString OI_CORE_EXPORT &getMessageTypeName(const MessageTypes &type);
127 MessageTypes OI_CORE_EXPORT getMessageTypeEnum(const QString &name);
128 
129 //############################################
130 //global functions to query unknown parameters
131 //############################################
132 
133 QList<GeometryParameters> OI_CORE_EXPORT getAvailableGeometryParameters();
134 const QString OI_CORE_EXPORT &getGeometryParameterName(const GeometryParameters &parameter);
136 
137 QList<GeometryParameters> OI_CORE_EXPORT getGeometryParameters(const GeometryTypes &type);
138 
139 QList<TrafoParamParameters> OI_CORE_EXPORT getAvailableTrafoParamParameters();
140 const QString OI_CORE_EXPORT &getTrafoParamParameterName(const TrafoParamParameters &parameter);
142 
143 //#######################################################
144 //global functions to query actual nominal filter options
145 //#######################################################
146 
147 QList<ActualNominalFilter> OI_CORE_EXPORT getAvailableActualNominalFilters();
150 
151 }
152 
153 #endif // UTIL_H
const QString OI_CORE_EXPORT & getReadingDisplayAttributeName(const ReadingDisplayAttributes &attr)
getReadingDisplayAttributeName
Definition: util.cpp:1222
ReadingTypes OI_CORE_EXPORT getReadingTypeEnum(const QString &name)
getReadingTypeEnum
Definition: util.cpp:947
const QString OI_CORE_EXPORT & getToolTypeName(const ToolTypes &type)
getToolTypeName
Definition: util.cpp:1544
const QString OI_CORE_EXPORT & getFeatureTypeIconPath(const FeatureTypes &type)
getFeatureTypeIconPath
Definition: util.cpp:907
double OI_CORE_EXPORT convertToDefault(const double &value, const UnitType &type)
convertToDefault Convert the given value of unit type to the default unit
Definition: util.cpp:1274
bool OI_CORE_EXPORT getIsGeometry(const FeatureTypes &type)
getIsGeometry
Definition: util.cpp:858
double OI_CORE_EXPORT convertFromDefault(const double &value, const UnitType &type)
convertFromDefault Convert the given value of default unit to the specified unit type ...
Definition: util.cpp:1306
QList< FeatureTypes > OI_CORE_EXPORT getAvailableFeatureTypes()
getAvailableFeatureTypes
Definition: util.cpp:497
GeometryTypes
all OpenIndy geometry types
Definition: types.h:128
ReadingDisplayAttributes
Definition: types.h:320
QList< ConnectionTypes > OI_CORE_EXPORT getAvailableConnectionTypes()
getAvailableConnectionTypes
Definition: util.cpp:1476
ReadingTypes
Definition: types.h:203
FeatureDisplayAttributes
Definition: types.h:219
const QString OI_CORE_EXPORT & getConnectionTypeName(const ConnectionTypes &type)
getConnectionTypeName
Definition: util.cpp:1492
ObservationDisplayAttributes OI_CORE_EXPORT getObservationDisplayAttributeEnum(const QString &name)
getObservationDisplayAttributeEnum
Definition: util.cpp:1238
FeatureTypes
all OpenIndy feature types
Definition: types.h:95
QList< MessageTypes > OI_CORE_EXPORT getAvailableMessageTypes()
getAvailableMessageTypes
Definition: util.cpp:1580
const QString OI_CORE_EXPORT & getMessageTypeName(const MessageTypes &type)
getMessageTypeName
Definition: util.cpp:1596
Definition: coordinatesystem.h:15
QList< SensorTypes > OI_CORE_EXPORT getAvailableSensorTypes()
getAvailableSensorTypes
Definition: util.cpp:1372
GeometryTypes OI_CORE_EXPORT getGeometryTypeEnum(const QString &name)
getGeometryTypeEnum
Definition: util.cpp:733
ConnectionTypes
Definition: types.h:405
ToolTypes OI_CORE_EXPORT getToolTypeEnum(const QString &name)
getToolTypeEnum
Definition: util.cpp:1564
const QString OI_CORE_EXPORT & getUnitTypeName(const UnitType &type)
getUnitTypeName
Definition: util.cpp:1336
const QString OI_CORE_EXPORT & getFeatureTypeName(const FeatureTypes &type)
getFeatureTypeName
Definition: util.cpp:676
const QList< ObservationDisplayAttributes > OI_CORE_EXPORT & getObservationDisplayAttributes()
getObservationDisplayAttributes
Definition: util.cpp:979
bool OI_CORE_EXPORT getIsFeature(const ElementTypes &type)
getIsFeature
Definition: util.cpp:807
QList< TrafoParamParameters > OI_CORE_EXPORT getAvailableTrafoParamParameters()
getAvailableTrafoParamParameters
Definition: util.cpp:1835
const QList< ReadingDisplayAttributes > OI_CORE_EXPORT & getReadingDisplayAttributes()
getReadingDisplayAttributes
Definition: util.cpp:994
QList< ToolTypes > OI_CORE_EXPORT getAvailableToolTypes()
getAvailableToolTypes
Definition: util.cpp:1528
const QString OI_CORE_EXPORT & getObservationDisplayAttributesName(const ObservationDisplayAttributes &attr)
getObservationDisplayAttributesName
Definition: util.cpp:1206
ElementTypes
all OpenIndy element types
Definition: types.h:48
ReadingDisplayAttributes OI_CORE_EXPORT getReadingDisplayAttributeEnum(const QString &name)
getReadingDisplayAttributeEnum
Definition: util.cpp:1255
const QString OI_CORE_EXPORT & getActualNominalFilterName(const ActualNominalFilter &type)
getActualNominalFilterName
Definition: util.cpp:1903
QList< GeometryParameters > OI_CORE_EXPORT getGeometryParameters(const GeometryTypes &type)
getUnknownParameters
Definition: util.cpp:1685
const QString OI_CORE_EXPORT & getReadingTypeName(const ReadingTypes &type)
getReadingTypeName
Definition: util.cpp:927
MessageTypes
all types of messages
Definition: types.h:29
SensorTypes
Definition: types.h:390
bool OI_CORE_EXPORT getIsFeatureDisplayAttribute(const int &attr)
getIsFeatureDisplayAttribute Returns true if the given attribute is a feature attribute ...
Definition: util.cpp:1011
QList< GeometryTypes > OI_CORE_EXPORT getAvailableGeometryTypes()
getAvailableGeometryTypes
Definition: util.cpp:512
QList< GeometryParameters > OI_CORE_EXPORT getAvailableGeometryParameters()
getAvailableUnknownParameters
Definition: util.cpp:1632
bool OI_CORE_EXPORT getIsObservation(const ElementTypes &type)
getIsObservation
Definition: util.cpp:846
FeatureTypes OI_CORE_EXPORT getFeatureTypeEnum(const QString &name)
getFeatureTypeEnum
Definition: util.cpp:696
ToolTypes
Definition: types.h:428
TrafoParamParameters OI_CORE_EXPORT getTrafoParamParameterEnum(const QString &name)
getTrafoParamParameterEnum
Definition: util.cpp:1871
const QList< int > OI_CORE_EXPORT & getFeatureDisplayAttributes()
getFeatureDisplayAttributes Returns a list of enum values (feature attributes and trafo param attribu...
Definition: util.cpp:964
const QString OI_CORE_EXPORT & getSensorTypeName(const SensorTypes &type)
getSensorTypeName
Definition: util.cpp:1388
GeometryParameters OI_CORE_EXPORT getGeometryParameterEnum(const QString &name)
getUnknownParameterEnum
Definition: util.cpp:1668
MessageTypes OI_CORE_EXPORT getMessageTypeEnum(const QString &name)
getMessageTypeEnum
Definition: util.cpp:1616
QList< ActualNominalFilter > OI_CORE_EXPORT getAvailableActualNominalFilters()
getAvailableActualNominalFilters
Definition: util.cpp:1887
const QString OI_CORE_EXPORT & getSensorFunctionName(const SensorFunctions &type)
getSensorFunctionName
Definition: util.cpp:1440
const QString OI_CORE_EXPORT & getFeatureDisplayAttributeName(const int &attr)
getDisplayAttributeName Returns the name of the attribute represented by the given enum value ...
Definition: util.cpp:1037
bool OI_CORE_EXPORT getIsScalarEntity(const FeatureTypes &type)
getIsScalarEntity
Definition: util.cpp:872
ActualNominalFilter OI_CORE_EXPORT getActualNominalFilterEnum(const QString &name)
getActualNominalFilterEnum
Definition: util.cpp:1923
QList< SensorFunctions > OI_CORE_EXPORT getAvailableSensorFunctions()
getAvailableSensorFunctions
Definition: util.cpp:1424
const QString OI_CORE_EXPORT & getGeometryTypeName(const GeometryTypes &type)
getGeometryTypeName
Definition: util.cpp:713
TrafoParamParameters
Definition: types.h:185
SensorFunctions OI_CORE_EXPORT getSensorFunctionEnum(const QString &name)
getSensorFunctionEnum
Definition: util.cpp:1460
QList< ElementTypes > OI_CORE_EXPORT getAvailableElementTypes()
getAvailableElementTypes
Definition: util.cpp:482
ConnectionTypes OI_CORE_EXPORT getConnectionTypeEnum(const QString &name)
getConnectionTypeEnum
Definition: util.cpp:1512
const QString OI_CORE_EXPORT & getElementTypeIconPath(const ElementTypes &type)
getElementTypeIconPath
Definition: util.cpp:887
ActualNominalFilter
Definition: types.h:439
const QString OI_CORE_EXPORT & getGeometryParameterName(const GeometryParameters &parameter)
getUnknownParameterName
Definition: util.cpp:1648
const QString OI_CORE_EXPORT & getTrafoParamParameterName(const TrafoParamParameters &parameter)
getTrafoParamParameterName
Definition: util.cpp:1851
TrafoParamDisplayAttributes
Definition: types.h:266
GeometryParameters
Definition: types.h:159
UnitType
Definition: types.h:354
SensorFunctions
Definition: types.h:412
const QString OI_CORE_EXPORT & getElementTypePluralName(const ElementTypes &type)
getElementTypePluralName
Definition: util.cpp:548
UnitType OI_CORE_EXPORT getUnitTypeEnum(const QString &name)
getUnitTypeEnum
Definition: util.cpp:1356
const QString OI_CORE_EXPORT & getElementTypeName(const ElementTypes &type)
getElementTypeName
Definition: util.cpp:528
SensorTypes OI_CORE_EXPORT getSensorTypeEnum(const QString &name)
getSensorTypeEnum
Definition: util.cpp:1408
bool OI_CORE_EXPORT getIsTrafoParamDisplayAttribute(const int &attr)
getIsTrafoParamDisplayAttribute Returns true if the given attribute is a trafo param attribute ...
Definition: util.cpp:1024
ElementTypes OI_CORE_EXPORT getElementTypeEnum(const QString &name)
getElementTypeEnum
Definition: util.cpp:568
#define OI_CORE_EXPORT
Definition: types.h:11
ObservationDisplayAttributes
Definition: types.h:299
bool OI_CORE_EXPORT getReadingDisplayAttributeVisibility(const ReadingDisplayAttributes &attr, const ReadingTypes &type)
getReadingDisplayAttributeVisibility
Definition: util.cpp:1092
bool OI_CORE_EXPORT getIsReading(const ElementTypes &type)
getIsReading
Definition: util.cpp:829