Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
ContinuousColorMap.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 "AbstractColorMap.h"
22 
23 namespace RESQML2_NS
24 {
27  {
28  public:
32  virtual ~ContinuousColorMap() = default;
33 
42  DLL_IMPORT_OR_EXPORT void setHsvColors(unsigned int colorCount,
43  double const* hsvColors, double const* alphas = nullptr, std::vector<std::string> const& colorTitles = std::vector<std::string>(),
44  double const* indices = nullptr);
45 
46  DLL_IMPORT_OR_EXPORT unsigned int getColorCount() const;
47 
53  DLL_IMPORT_OR_EXPORT gsoap_eml2_3::resqml22__InterpolationDomain getInterpolationDomain();
54 
60  DLL_IMPORT_OR_EXPORT std::string getInterpolationDomainAsString();
61 
67  DLL_IMPORT_OR_EXPORT gsoap_eml2_3::resqml22__InterpolationMethod getInterpolationMethod();
68 
74  DLL_IMPORT_OR_EXPORT std::string getInterpolationMethodAsString();
75 
86  DLL_IMPORT_OR_EXPORT void setNanHsvColor(double hue, double saturation, double value, double alpha = 1, std::string const& colorTitle = "");
87 
98  DLL_IMPORT_OR_EXPORT void setNanRgbColor(double red, double green, double blue, double alpha = 1, std::string const& colorTitle = "");
99 
110  DLL_IMPORT_OR_EXPORT void setNanRgbColor(unsigned int red, unsigned int green, unsigned int blue, double alpha = 1, std::string const& colorTitle = "");
111 
113  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
114 
120  DLL_IMPORT_OR_EXPORT std::string getXmlTag() const { return XML_TAG; }
121 
122  protected:
126  gsoap_eml2_3::resqml22__HsvColor* getColor(double colorIndex) const;
127 
131  ContinuousColorMap() {}
132 
136  ContinuousColorMap(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractColorMap(partialObject) {}
137 
141  ContinuousColorMap(gsoap_eml2_3::resqml22__ContinuousColorMap* fromGsoap) :
142  AbstractColorMap(fromGsoap) {}
143  };
144 }
Map of abstract colors.
Definition: AbstractColorMap.h:27
Map of continuous colors. This class cannot be inherited.
Definition: ContinuousColorMap.h:27
static const char * XML_TAG
The XML tag.
Definition: ContinuousColorMap.h:113
std::string getInterpolationDomainAsString()
Gets interpolation domain as string.
void setNanHsvColor(double hue, double saturation, double value, double alpha=1, std::string const &colorTitle="")
Sets the NanColor value of a continuous color map.
void setHsvColors(unsigned int colorCount, double const *hsvColors, double const *alphas=nullptr, std::vector< std::string > const &colorTitles=std::vector< std::string >(), double const *indices=nullptr)
gsoap_eml2_3::resqml22__InterpolationDomain getInterpolationDomain()
Gets interpolation domain.
void setNanRgbColor(double red, double green, double blue, double alpha=1, std::string const &colorTitle="")
Sets the NanColor value of a continuous color map.
virtual ~ContinuousColorMap()=default
void setNanRgbColor(unsigned int red, unsigned int green, unsigned int blue, double alpha=1, std::string const &colorTitle="")
Sets the NanColor value of a continuous color map.
std::string getXmlTag() const
Gets XML tag.
Definition: ContinuousColorMap.h:120
unsigned int getColorCount() const
Gets color count.
std::string getInterpolationMethodAsString()
Gets interpolation method as string.
gsoap_eml2_3::resqml22__InterpolationMethod getInterpolationMethod()
Gets interpolation method.