Fesapi 2.10.1.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
GraphicalInformationSet.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "../common/AbstractObject.h"
22
23namespace EML2_NS
24{
26 class GraphicalInformationSet : public COMMON_NS::AbstractObject
27 {
28 public:
32 virtual ~GraphicalInformationSet() = default;
33
39 DLL_IMPORT_OR_EXPORT uint64_t getGraphicalInformationSetCount() const;
40
50 DLL_IMPORT_OR_EXPORT uint64_t getTargetObjectCount(uint64_t graphicalInformationIndex) const;
51
64 gsoap_eml2_3::eml23__DataObjectReference* getTargetObjectDor(uint64_t graphicalInformationIndex, uint64_t targetIndex) const;
65
77 DLL_IMPORT_OR_EXPORT std::string getTargetObjectUuid(uint64_t graphicalInformationIndex, uint64_t targetIndex) const;
78
88 DLL_IMPORT_OR_EXPORT COMMON_NS::AbstractObject* getTargetObject(uint64_t graphicalInformationIndex, uint64_t targetIndex) const;
89
100 bool hasDirectGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
101
113 DLL_IMPORT_OR_EXPORT bool hasGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
114
125 DLL_IMPORT_OR_EXPORT bool hasDefaultColor(COMMON_NS::AbstractObject const* targetObject) const;
126
137 DLL_IMPORT_OR_EXPORT double getDefaultHue(COMMON_NS::AbstractObject const* targetObject) const;
138
149 DLL_IMPORT_OR_EXPORT double getDefaultSaturation(COMMON_NS::AbstractObject const* targetObject) const;
150
161 DLL_IMPORT_OR_EXPORT double getDefaultValue(COMMON_NS::AbstractObject const* targetObject) const;
162
173 DLL_IMPORT_OR_EXPORT double getDefaultAlpha(COMMON_NS::AbstractObject const* targetObject) const;
174
186 DLL_IMPORT_OR_EXPORT void getDefaultRgbColor(COMMON_NS::AbstractObject const* targetObject, double& red, double& green, double& blue) const;
187
199 DLL_IMPORT_OR_EXPORT void getDefaultRgbColor(COMMON_NS::AbstractObject const* targetObject, uint8_t& red, uint8_t& green, uint8_t& blue) const;
200
211 DLL_IMPORT_OR_EXPORT bool hasDefaultColorTitle(COMMON_NS::AbstractObject const* targetObject) const;
212
224 DLL_IMPORT_OR_EXPORT std::string getDefaultColorTitle(COMMON_NS::AbstractObject const* targetObject) const;
225
245 DLL_IMPORT_OR_EXPORT void setDefaultHsvColor(COMMON_NS::AbstractObject* targetObject, double hue, double saturation, double value, double alpha = 1.0, std::string const& colorTitle = "");
246
266 DLL_IMPORT_OR_EXPORT void setDefaultRgbColor(COMMON_NS::AbstractObject* targetObject, double red, double green, double blue, double alpha = 1.0, std::string const& colorTitle = "");
267
288 DLL_IMPORT_OR_EXPORT void setDefaultRgbColor(COMMON_NS::AbstractObject* targetObject, uint8_t red, uint8_t green, uint8_t blue, double alpha = 1.0, std::string const& colorTitle = "");
289
300 DLL_IMPORT_OR_EXPORT bool hasDiscreteColorMap(COMMON_NS::AbstractObject const* targetObject) const;
301
315 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__DataObjectReference* getDiscreteColorMapDor(COMMON_NS::AbstractObject const* targetObject) const;
316
329 DLL_IMPORT_OR_EXPORT std::string getDiscreteColorMapUuid(COMMON_NS::AbstractObject const* targetObject) const;
330
342 DLL_IMPORT_OR_EXPORT RESQML2_NS::DiscreteColorMap* getDiscreteColorMap(COMMON_NS::AbstractObject const* targetObject) const;
343
363 DLL_IMPORT_OR_EXPORT void setDiscreteColorMap(COMMON_NS::AbstractObject* targetObject, RESQML2_NS::DiscreteColorMap* discreteColorMap,
364 bool useReverseMapping = false, bool useLogarithmicMapping = false);
365
376 DLL_IMPORT_OR_EXPORT bool hasContinuousColorMap(COMMON_NS::AbstractObject const* targetObject) const;
377
391 DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__DataObjectReference* getContinuousColorMapDor(COMMON_NS::AbstractObject const* targetObject) const;
392
405 DLL_IMPORT_OR_EXPORT std::string getContinuousColorMapUuid(COMMON_NS::AbstractObject const* targetObject) const;
406
418 DLL_IMPORT_OR_EXPORT RESQML2_NS::ContinuousColorMap* getContinuousColorMap(COMMON_NS::AbstractObject const* targetObject) const;
419
440 DLL_IMPORT_OR_EXPORT void setContinuousColorMap(COMMON_NS::AbstractObject* targetObject, RESQML2_NS::ContinuousColorMap* continuousColorMap,
441 bool useReverseMapping = false, bool useLogarithmicMapping = false);
442
454 DLL_IMPORT_OR_EXPORT bool hasColorMapMinMax(COMMON_NS::AbstractObject const* targetObject) const;
455
467 DLL_IMPORT_OR_EXPORT double getColorMapMin(COMMON_NS::AbstractObject const* targetObject) const;
468
480 DLL_IMPORT_OR_EXPORT double getColorMapMax(COMMON_NS::AbstractObject const* targetObject) const;
481
492 DLL_IMPORT_OR_EXPORT void setColorMapMinMax(COMMON_NS::AbstractObject const* targetObject, double min, double max) const;
493
506 DLL_IMPORT_OR_EXPORT bool hasValueVectorIndex(COMMON_NS::AbstractObject const* targetObject);
507
520 DLL_IMPORT_OR_EXPORT int64_t getValueVectorIndex(COMMON_NS::AbstractObject const* targetObject);
521
532 DLL_IMPORT_OR_EXPORT void setValueVectorIndex(COMMON_NS::AbstractObject const* targetObject, int64_t valueVectorIndex);
533
545 DLL_IMPORT_OR_EXPORT static void rgbToHsv(double red, double green, double blue, double& hue, double& saturation, double& value);
546
558 DLL_IMPORT_OR_EXPORT static void rgbToHsv(uint8_t red, uint8_t green, uint8_t blue, double& hue, double& saturation, double& value);
559
571 DLL_IMPORT_OR_EXPORT static void hsvToRgb(double hue, double saturation, double value, double& red, double& green, double& blue);
572
585 DLL_IMPORT_OR_EXPORT static void hsvToRgb(double hue, double saturation, double value, uint8_t& red, uint8_t& green, uint8_t& blue);
586
588 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "GraphicalInformationSet";
589
595 DLL_IMPORT_OR_EXPORT std::string getXmlTag() const { return XML_TAG; }
596
602
603 protected:
604
609
615 GraphicalInformationSet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
616
622 GraphicalInformationSet(gsoap_eml2_3::_eml23__GraphicalInformationSet* fromGsoap) :
623 COMMON_NS::AbstractObject(fromGsoap) {}
624
625 private:
626 gsoap_eml2_3::resqml22__DefaultGraphicalInformation* getDefaultGraphicalInformationForAllIndexableElements(COMMON_NS::AbstractObject const* targetObject) const;
627 gsoap_eml2_3::resqml22__GraphicalInformationForWholeObject* getDefaultGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
628 gsoap_eml2_3::resqml22__HsvColor* getDefaultColor(COMMON_NS::AbstractObject const* targetObject) const;
629 gsoap_eml2_3::resqml22__ColorInformation* getColorInformation(COMMON_NS::AbstractObject const* targetObject) const;
630 };
631}
Proxy class for handling the graphical information of data objects.
Definition GraphicalInformationSet.h:27
double getDefaultSaturation(common::AbstractObject const *targetObject) const
std::string getDefaultColorTitle(common::AbstractObject const *targetObject) const
static void hsvToRgb(double hue, double saturation, double value, uint8_t &red, uint8_t &green, uint8_t &blue)
bool hasGraphicalInformation(common::AbstractObject const *targetObject) const
void setDefaultRgbColor(common::AbstractObject *targetObject, double red, double green, double blue, double alpha=1.0, std::string const &colorTitle="")
void getDefaultRgbColor(common::AbstractObject const *targetObject, double &red, double &green, double &blue) const
void setDiscreteColorMap(common::AbstractObject *targetObject, resqml2::DiscreteColorMap *discreteColorMap, bool useReverseMapping=false, bool useLogarithmicMapping=false)
common::AbstractObject * getTargetObject(uint64_t graphicalInformationIndex, uint64_t targetIndex) const
double getColorMapMax(common::AbstractObject const *targetObject) const
resqml2::ContinuousColorMap * getContinuousColorMap(common::AbstractObject const *targetObject) const
resqml2::DiscreteColorMap * getDiscreteColorMap(common::AbstractObject const *targetObject) const
double getDefaultAlpha(common::AbstractObject const *targetObject) const
double getDefaultValue(common::AbstractObject const *targetObject) const
bool hasDiscreteColorMap(common::AbstractObject const *targetObject) const
void setDefaultRgbColor(common::AbstractObject *targetObject, uint8_t red, uint8_t green, uint8_t blue, double alpha=1.0, std::string const &colorTitle="")
static void rgbToHsv(double red, double green, double blue, double &hue, double &saturation, double &value)
static void hsvToRgb(double hue, double saturation, double value, double &red, double &green, double &blue)
double getColorMapMin(common::AbstractObject const *targetObject) const
virtual ~GraphicalInformationSet()=default
void getDefaultRgbColor(common::AbstractObject const *targetObject, uint8_t &red, uint8_t &green, uint8_t &blue) const
void setDefaultHsvColor(common::AbstractObject *targetObject, double hue, double saturation, double value, double alpha=1.0, std::string const &colorTitle="")
void setValueVectorIndex(common::AbstractObject const *targetObject, int64_t valueVectorIndex)
int64_t getValueVectorIndex(common::AbstractObject const *targetObject)
bool hasDefaultColor(common::AbstractObject const *targetObject) const
std::string getDiscreteColorMapUuid(common::AbstractObject const *targetObject) const
uint64_t getTargetObjectCount(uint64_t graphicalInformationIndex) const
uint64_t getGraphicalInformationSetCount() const
static void rgbToHsv(uint8_t red, uint8_t green, uint8_t blue, double &hue, double &saturation, double &value)
void loadTargetRelationships() final
std::string getTargetObjectUuid(uint64_t graphicalInformationIndex, uint64_t targetIndex) const
double getDefaultHue(common::AbstractObject const *targetObject) const
void setContinuousColorMap(common::AbstractObject *targetObject, resqml2::ContinuousColorMap *continuousColorMap, bool useReverseMapping=false, bool useLogarithmicMapping=false)
gsoap_eml2_3::eml23__DataObjectReference * getTargetObjectDor(uint64_t graphicalInformationIndex, uint64_t targetIndex) const
bool hasDirectGraphicalInformation(common::AbstractObject const *targetObject) const
std::string getContinuousColorMapUuid(common::AbstractObject const *targetObject) const
gsoap_eml2_3::eml23__DataObjectReference * getDiscreteColorMapDor(common::AbstractObject const *targetObject) const
void setColorMapMinMax(common::AbstractObject const *targetObject, double min, double max) const
bool hasValueVectorIndex(common::AbstractObject const *targetObject)
bool hasColorMapMinMax(common::AbstractObject const *targetObject) const
bool hasDefaultColorTitle(common::AbstractObject const *targetObject) const
std::string getXmlTag() const
Definition GraphicalInformationSet.h:595
bool hasContinuousColorMap(common::AbstractObject const *targetObject) const
gsoap_eml2_3::eml23__DataObjectReference * getContinuousColorMapDor(common::AbstractObject const *targetObject) const