Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
GraphicalInformationSet.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10 http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "../common/AbstractObject.h"
22 
23 namespace EML2_NS
24 {
26  class GraphicalInformationSet : public COMMON_NS::AbstractObject
27  {
28  public:
32  virtual ~GraphicalInformationSet() = default;
33 
41  DLL_IMPORT_OR_EXPORT unsigned int getGraphicalInformationSetCount() const;
42 
54  gsoap_eml2_3::eml23__DataObjectReference* getTargetObjectDor(unsigned int index) const;
55 
66  DLL_IMPORT_OR_EXPORT std::string getTargetObjectUuid(unsigned int index) const;
67 
76  DLL_IMPORT_OR_EXPORT AbstractObject* getTargetObject(unsigned int index) const;
77 
88  bool hasDirectGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
89 
101  DLL_IMPORT_OR_EXPORT bool hasGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
102 
113  DLL_IMPORT_OR_EXPORT bool hasDefaultColor(COMMON_NS::AbstractObject const* targetObject) const;
114 
125  DLL_IMPORT_OR_EXPORT double getDefaultHue(COMMON_NS::AbstractObject const* targetObject) const;
126 
137  DLL_IMPORT_OR_EXPORT double getDefaultSaturation(COMMON_NS::AbstractObject const* targetObject) const;
138 
149  DLL_IMPORT_OR_EXPORT double getDefaultValue(COMMON_NS::AbstractObject const* targetObject) const;
150 
161  DLL_IMPORT_OR_EXPORT double getDefaultAlpha(COMMON_NS::AbstractObject const* targetObject) const;
162 
174  DLL_IMPORT_OR_EXPORT void getDefaultRgbColor(COMMON_NS::AbstractObject const* targetObject, double& red, double& green, double& blue) const;
175 
187  DLL_IMPORT_OR_EXPORT void getDefaultRgbColor(COMMON_NS::AbstractObject const* targetObject, unsigned int& red, unsigned int& green, unsigned int& blue) const;
188 
199  DLL_IMPORT_OR_EXPORT bool hasDefaultColorTitle(COMMON_NS::AbstractObject const* targetObject) const;
200 
212  DLL_IMPORT_OR_EXPORT std::string getDefaultColorTitle(COMMON_NS::AbstractObject const* targetObject) const;
213 
233  DLL_IMPORT_OR_EXPORT void setDefaultHsvColor(COMMON_NS::AbstractObject* targetObject, double hue, double saturation, double value, double alpha = 1.0, std::string const& colorTitle = "");
234 
254  DLL_IMPORT_OR_EXPORT void setDefaultRgbColor(COMMON_NS::AbstractObject* targetObject, double red, double green, double blue, double alpha = 1.0, std::string const& colorTitle = "");
255 
276  DLL_IMPORT_OR_EXPORT void setDefaultRgbColor(COMMON_NS::AbstractObject* targetObject, unsigned int red, unsigned int green, unsigned int blue, double alpha = 1.0, std::string const& colorTitle = "");
277 
288  DLL_IMPORT_OR_EXPORT bool hasDiscreteColorMap(COMMON_NS::AbstractObject const* targetObject) const;
289 
303  DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__DataObjectReference* getDiscreteColorMapDor(COMMON_NS::AbstractObject const* targetObject) const;
304 
317  DLL_IMPORT_OR_EXPORT std::string getDiscreteColorMapUuid(COMMON_NS::AbstractObject const* targetObject) const;
318 
330  DLL_IMPORT_OR_EXPORT RESQML2_NS::DiscreteColorMap* getDiscreteColorMap(COMMON_NS::AbstractObject const* targetObject) const;
331 
351  DLL_IMPORT_OR_EXPORT void setDiscreteColorMap(COMMON_NS::AbstractObject* targetObject, RESQML2_NS::DiscreteColorMap* discreteColorMap,
352  bool useReverseMapping = false, bool useLogarithmicMapping = false);
353 
364  DLL_IMPORT_OR_EXPORT bool hasContinuousColorMap(COMMON_NS::AbstractObject const* targetObject) const;
365 
379  DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__DataObjectReference* getContinuousColorMapDor(COMMON_NS::AbstractObject const* targetObject) const;
380 
393  DLL_IMPORT_OR_EXPORT std::string getContinuousColorMapUuid(COMMON_NS::AbstractObject const* targetObject) const;
394 
406  DLL_IMPORT_OR_EXPORT RESQML2_NS::ContinuousColorMap* getContinuousColorMap(COMMON_NS::AbstractObject const* targetObject) const;
407 
428  DLL_IMPORT_OR_EXPORT void setContinuousColorMap(COMMON_NS::AbstractObject* targetObject, RESQML2_NS::ContinuousColorMap* continuousColorMap,
429  bool useReverseMapping = false, bool useLogarithmicMapping = false);
430 
442  DLL_IMPORT_OR_EXPORT bool hasColorMapMinMax(COMMON_NS::AbstractObject const* targetObject) const;
443 
455  DLL_IMPORT_OR_EXPORT double getColorMapMin(COMMON_NS::AbstractObject const* targetObject) const;
456 
468  DLL_IMPORT_OR_EXPORT double getColorMapMax(COMMON_NS::AbstractObject const* targetObject) const;
469 
480  DLL_IMPORT_OR_EXPORT void setColorMapMinMax(COMMON_NS::AbstractObject const* targetObject, double min, double max) const;
481 
494  DLL_IMPORT_OR_EXPORT bool hasValueVectorIndex(COMMON_NS::AbstractObject const* targetObject);
495 
508  DLL_IMPORT_OR_EXPORT int64_t getValueVectorIndex(COMMON_NS::AbstractObject const* targetObject);
509 
520  DLL_IMPORT_OR_EXPORT void setValueVectorIndex(COMMON_NS::AbstractObject const* targetObject, int64_t valueVectorIndex);
521 
533  DLL_IMPORT_OR_EXPORT static void rgbToHsv(double red, double green, double blue, double& hue, double& saturation, double& value);
534 
546  DLL_IMPORT_OR_EXPORT static void rgbToHsv(unsigned int red, unsigned int green, unsigned int blue, double& hue, double& saturation, double& value);
547 
559  DLL_IMPORT_OR_EXPORT static void hsvToRgb(double hue, double saturation, double value, double& red, double& green, double& blue);
560 
573  DLL_IMPORT_OR_EXPORT static void hsvToRgb(double hue, double saturation, double value, unsigned int& red, unsigned int& green, unsigned int& blue);
574 
576  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
577 
583  DLL_IMPORT_OR_EXPORT std::string getXmlTag() const { return XML_TAG; }
584 
590  DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const {
591  return "eml23";
592  }
593 
599 
600  protected:
601 
606 
612  GraphicalInformationSet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject): COMMON_NS::AbstractObject(partialObject) {}
613 
619  GraphicalInformationSet(gsoap_eml2_3::_eml23__GraphicalInformationSet* fromGsoap) :
620  COMMON_NS::AbstractObject(fromGsoap) {}
621 
622  private:
623  gsoap_eml2_3::resqml22__DefaultGraphicalInformation* getDefaultGraphicalInformationForAllIndexableElements(COMMON_NS::AbstractObject const* targetObject) const;
624  gsoap_eml2_3::resqml22__GraphicalInformationForWholeObject* getDefaultGraphicalInformation(COMMON_NS::AbstractObject const* targetObject) const;
625  gsoap_eml2_3::resqml22__HsvColor* getDefaultColor(COMMON_NS::AbstractObject const* targetObject) const;
626  gsoap_eml2_3::resqml22__ColorInformation* getColorInformation(COMMON_NS::AbstractObject const* targetObject) const;
627  };
628 }
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
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)
static void hsvToRgb(double hue, double saturation, double value, unsigned int &red, unsigned int &green, unsigned int &blue)
double getColorMapMax(common::AbstractObject const *targetObject) const
void setDefaultRgbColor(common::AbstractObject *targetObject, unsigned int red, unsigned int green, unsigned int blue, double alpha=1.0, std::string const &colorTitle="")
static void rgbToHsv(unsigned int red, unsigned int green, unsigned int blue, double &hue, double &saturation, double &value)
double getDefaultAlpha(common::AbstractObject const *targetObject) const
double getDefaultValue(common::AbstractObject const *targetObject) const
bool hasDiscreteColorMap(common::AbstractObject const *targetObject) const
static const char * XML_TAG
Definition: GraphicalInformationSet.h:576
std::string getTargetObjectUuid(unsigned int index) const
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
AbstractObject * getTargetObject(unsigned int index) 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)
void getDefaultRgbColor(common::AbstractObject const *targetObject, unsigned int &red, unsigned int &green, unsigned int &blue) const
std::string getXmlNamespace() const
Definition: GraphicalInformationSet.h:590
int64_t getValueVectorIndex(common::AbstractObject const *targetObject)
bool hasDefaultColor(common::AbstractObject const *targetObject) const
std::string getDiscreteColorMapUuid(common::AbstractObject const *targetObject) const
resqml2::ContinuousColorMap * getContinuousColorMap(common::AbstractObject const *targetObject) const
gsoap_eml2_3::eml23__DataObjectReference * getContinuousColorMapDor(common::AbstractObject const *targetObject) const
double getDefaultHue(common::AbstractObject const *targetObject) const
void setContinuousColorMap(common::AbstractObject *targetObject, resqml2::ContinuousColorMap *continuousColorMap, bool useReverseMapping=false, bool useLogarithmicMapping=false)
bool hasDirectGraphicalInformation(common::AbstractObject const *targetObject) const
gsoap_eml2_3::eml23__DataObjectReference * getDiscreteColorMapDor(common::AbstractObject const *targetObject) const
std::string getContinuousColorMapUuid(common::AbstractObject const *targetObject) const
resqml2::DiscreteColorMap * getDiscreteColorMap(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:583
bool hasContinuousColorMap(common::AbstractObject const *targetObject) const
unsigned int getGraphicalInformationSetCount() const
gsoap_eml2_3::eml23__DataObjectReference * getTargetObjectDor(unsigned int index) const