/usr/include/magics/HiLoAttributes.cc is in libmagics++-dev 2.18.15-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | /******************************* LICENSE *******************************
******************************* LICENSE *******************************/
/*! \file HiLoAttributes.cc
\brief Implementation of HiLo Attributes class.
\author Meteorological Visualisation Section, ECMWF
This file is automatically generated.
Do Not Edit!
Generated: Wed Dec 18 17:22:57 2013
*/
#include "HiLoAttributes.h"
#include "MagicsParameter.h"
#include "Factory.h"
#include "MagTranslator.h"
#include "XmlNode.h"
#include "ParameterSettings.h"
using namespace magics;
HiLoAttributes::HiLoAttributes():
type_(MagTranslator<string, HiLoTechnique>().magics("contour_hilo_type")),
window_size_(ParameterManager::getInt("contour_hilo_window_size")),
suppress_radius_(ParameterManager::getDouble("contour_hilo_suppress_radius")),
hilo_max_value_(ParameterManager::getDouble("contour_hilo_max_value")),
hilo_min_value_(ParameterManager::getDouble("contour_hilo_min_value")),
hi_max_value_(ParameterManager::getDouble("contour_hi_max_value")),
hi_min_value_(ParameterManager::getDouble("contour_hi_min_value")),
lo_max_value_(ParameterManager::getDouble("contour_lo_max_value")),
lo_min_value_(ParameterManager::getDouble("contour_lo_min_value")),
marker_(MagTranslator<string, HiLoMarkerBase>().magics("contour_hilo_marker"))
{
}
HiLoAttributes::~HiLoAttributes()
{
}
void HiLoAttributes::set(const std::map<string, string>& params)
{
vector<string> prefix(2);
prefix[0] = "contour_hilo";
prefix[1] = "contour";
setMember(prefix, "contour_hilo_type", type_, params);
setAttribute(prefix, "contour_hilo_window_size", window_size_, params);
setAttribute(prefix, "contour_hilo_suppress_radius", suppress_radius_, params);
setAttribute(prefix, "contour_hilo_max_value", hilo_max_value_, params);
setAttribute(prefix, "contour_hilo_min_value", hilo_min_value_, params);
setAttribute(prefix, "contour_hi_max_value", hi_max_value_, params);
setAttribute(prefix, "contour_hi_min_value", hi_min_value_, params);
setAttribute(prefix, "contour_lo_max_value", lo_max_value_, params);
setAttribute(prefix, "contour_lo_min_value", lo_min_value_, params);
setMember(prefix, "contour_hilo_marker", marker_, params);
}
void HiLoAttributes::copy(const HiLoAttributes& other)
{
type_ = auto_ptr<HiLoTechnique>(other.type_->clone());
window_size_ = other.window_size_;
suppress_radius_ = other.suppress_radius_;
hilo_max_value_ = other.hilo_max_value_;
hilo_min_value_ = other.hilo_min_value_;
hi_max_value_ = other.hi_max_value_;
hi_min_value_ = other.hi_min_value_;
lo_max_value_ = other.lo_max_value_;
lo_min_value_ = other.lo_min_value_;
marker_ = auto_ptr<HiLoMarkerBase>(other.marker_->clone());
}
bool HiLoAttributes::accept(const string& node)
{
if ( magCompare(node, "hilo") )
return true;
if ( acceptNode(node, type_) )
return true;
if ( acceptNode(node, marker_) )
return true;
return false;
}
void HiLoAttributes::set(const XmlNode& node)
{
if ( this->accept(node.name()) == false )
return;
if ( magCompare(node.name(), "hilo") )
set(node.attributes());
else {
setMember(node.name(), type_, node);
setMember(node.name(), marker_, node);
}
for (XmlNode::ElementIterator elt = node.firstElement(); elt != node.lastElement(); ++elt) {
setMember((*elt)->name(), type_, *(*elt));
setMember((*elt)->name(), marker_, *(*elt));
}
}
void HiLoAttributes::print(ostream& out) const
{
out << "HiLoAttributes[";
out << "type = " << *type_;
out << ", window_size = " << window_size_;
out << ", suppress_radius = " << suppress_radius_;
out << ", hilo_max_value = " << hilo_max_value_;
out << ", hilo_min_value = " << hilo_min_value_;
out << ", hi_max_value = " << hi_max_value_;
out << ", hi_min_value = " << hi_min_value_;
out << ", lo_max_value = " << lo_max_value_;
out << ", lo_min_value = " << lo_min_value_;
out << ", marker = " << *marker_;
out << "]" << "\n";
}
void HiLoAttributes::toxml(ostream& out) const
{
out << "\"hilo\"";
out << ", \"contour_hilo_type\":";
type_->toxml(out);
out << ", \"contour_hilo_window_size\":";
niceprint(out,window_size_);
out << ", \"contour_hilo_suppress_radius\":";
niceprint(out,suppress_radius_);
out << ", \"contour_hilo_max_value\":";
niceprint(out,hilo_max_value_);
out << ", \"contour_hilo_min_value\":";
niceprint(out,hilo_min_value_);
out << ", \"contour_hi_max_value\":";
niceprint(out,hi_max_value_);
out << ", \"contour_hi_min_value\":";
niceprint(out,hi_min_value_);
out << ", \"contour_lo_max_value\":";
niceprint(out,lo_max_value_);
out << ", \"contour_lo_min_value\":";
niceprint(out,lo_min_value_);
out << ", \"contour_hilo_marker\":";
marker_->toxml(out);
}
static MagicsParameter<string> contour_hilo_type("contour_hilo_type", "text", " New Magics: Parameter contour_hilo_type sent to new Magics[HiLo]. ");
static MagicsParameter<int> contour_hilo_window_size("contour_hilo_window_size", 3, " New Magics: Parameter contour_hilo_window_size sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_hilo_suppress_radius("contour_hilo_suppress_radius", 15.0, " New Magics: Parameter contour_hilo_suppress_radius sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_hilo_max_value("contour_hilo_max_value", 1.0e+21, " New Magics: Parameter contour_hilo_max_value sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_hilo_min_value("contour_hilo_min_value", -1.0e+21, " New Magics: Parameter contour_hilo_min_value sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_hi_max_value("contour_hi_max_value", 1.0e+21, " New Magics: Parameter contour_hi_max_value sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_hi_min_value("contour_hi_min_value", -1.0e+21, " New Magics: Parameter contour_hi_min_value sent to new Magics[HiLo]. ");
static MagicsParameter<double> contour_lo_max_value("contour_lo_max_value", 1.0e+21, "");
static MagicsParameter<double> contour_lo_min_value("contour_lo_min_value", -1.0e+21, "");
static MagicsParameter<string> contour_hilo_marker("contour_hilo_marker", "off", "");
#include "HiLoNumber.h"
#include "HiLoBoth.h"
#include "HiLoText.h"
static SimpleObjectMaker<HiLoText, HiLoTechnique> text_HiLoText("text");
static SimpleObjectMaker<HiLoNumber, HiLoTechnique> number_HiLoNumber("number");
static SimpleObjectMaker<HiLoBoth, HiLoTechnique> both_HiLoBoth("both");
#include "HiLoMarker.h"
static SimpleObjectMaker<HiLoMarker, HiLoMarkerBase> on_HiLoMarker("on");
static SimpleObjectMaker<HiLoMarker, HiLoMarkerBase> marker_HiLoMarker("marker");
static SimpleObjectMaker<NoHiLoMarker, HiLoMarkerBase> off_NoHiLoMarker("off");
static SimpleObjectMaker<NoHiLoMarker, HiLoMarkerBase> nomarker_NoHiLoMarker("nomarker");
|