This file is indexed.

/usr/include/magics/ContourAttributes.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/*******************************  LICENSE  *******************************



 *******************************  LICENSE  *******************************/

/*! \file ContourAttributes.cc
    \brief Implementation of Contour Attributes class.
    \author Meteorological Visualisation Section, ECMWF

    This file is automatically generated.
    Do Not Edit!
   
    Generated: Wed Dec 18 17:22:55 2013
*/    

#include "ContourAttributes.h"
#include "MagicsParameter.h"
#include "Factory.h"
#include "MagTranslator.h"
#include "XmlNode.h"
#include "ParameterSettings.h"


using namespace magics;


ContourAttributes::ContourAttributes():
	legend_(ParameterManager::getBool("legend")),
	contour_(MagTranslator<string, IsoPlot>().magics("contour")),
	method_(MagTranslator<string, ContourMethod>().magics("contour_method")),
	floor_(ParameterManager::getDouble("contour_interpolation_floor")),
	ceiling_(ParameterManager::getDouble("contour_interpolation_ceiling")),
	setting_(ParameterManager::getBool("contour_automatic_setting")),
	library_path_(ParameterManager::getString("contour_automatic_library_path")),
	hilo_(MagTranslator<string, HiLoBase>().magics("contour_hilo")),
	grid_(MagTranslator<string, ValuePlotBase>().magics("contour_grid_value_plot"))
{
} 



ContourAttributes::~ContourAttributes()
{
}

    
void ContourAttributes::set(const std::map<string, string>& params)
{
	vector<string> prefix(1);
	prefix[0] = "contour";

	setAttribute(prefix, "legend", legend_, params);
	setMember(prefix, "contour", contour_, params);
	setMember(prefix, "contour_method", method_, params);
	setAttribute(prefix, "contour_interpolation_floor", floor_, params);
	setAttribute(prefix, "contour_interpolation_ceiling", ceiling_, params);
	setAttribute(prefix, "contour_automatic_setting", setting_, params);
	setAttribute(prefix, "contour_automatic_library_path", library_path_, params);
	setMember(prefix, "contour_hilo", hilo_, params);
	setMember(prefix, "contour_grid_value_plot", grid_, params);
}

void ContourAttributes::copy(const ContourAttributes& other)
{
	legend_ = other.legend_;
	contour_ = auto_ptr<IsoPlot>(other.contour_->clone());
	method_ = auto_ptr<ContourMethod>(other.method_->clone());
	floor_ = other.floor_;
	ceiling_ = other.ceiling_;
	setting_ = other.setting_;
	library_path_ = other.library_path_;
	hilo_ = auto_ptr<HiLoBase>(other.hilo_->clone());
	grid_ = auto_ptr<ValuePlotBase>(other.grid_->clone());
} 


bool ContourAttributes::accept(const string& node)
{	
	if ( magCompare(node, "contour")  )
		return true;

	if ( acceptNode(node, contour_) )
		return true;

	if ( acceptNode(node, method_) )
		return true;

	if ( acceptNode(node, hilo_) )
		return true;

	if ( acceptNode(node, grid_) )
		return true;
	return false;
}

void ContourAttributes::set(const XmlNode& node)
{
	if ( this->accept(node.name()) == false ) 
		return;

	if ( magCompare(node.name(), "contour") )
		set(node.attributes());
	else {
		setMember(node.name(), contour_, node);
		setMember(node.name(), method_, node);
		setMember(node.name(), hilo_, node);
		setMember(node.name(), grid_, node);
	}
	for (XmlNode::ElementIterator elt = node.firstElement(); elt != node.lastElement(); ++elt) {
		setMember((*elt)->name(), contour_, *(*elt)); 
		setMember((*elt)->name(), method_, *(*elt)); 
		setMember((*elt)->name(), hilo_, *(*elt)); 
		setMember((*elt)->name(), grid_, *(*elt)); 
	}
}

void ContourAttributes::print(ostream& out)  const
{
	out << "ContourAttributes[";
	out << "legend = " << legend_;
	out << ", contour = " << *contour_;
	out << ", method = " << *method_;
	out << ", floor = " << floor_;
	out << ", ceiling = " << ceiling_;
	out << ", setting = " << setting_;
	out << ", library_path = " << library_path_;
	out << ", hilo = " << *hilo_;
	out << ", grid = " << *grid_;
	out << "]" << "\n";
}


void ContourAttributes::toxml(ostream& out)  const
{
     out <<  "\"contour\"";
	 out << ", \"legend\":";
	 niceprint(out,legend_);
	 out << ", \"contour\":";
	 contour_->toxml(out);
	 out << ", \"contour_method\":";
	 method_->toxml(out);
	 out << ", \"contour_interpolation_floor\":";
	 niceprint(out,floor_);
	 out << ", \"contour_interpolation_ceiling\":";
	 niceprint(out,ceiling_);
	 out << ", \"contour_automatic_setting\":";
	 niceprint(out,setting_);
	 out << ", \"contour_automatic_library_path\":";
	 niceprint(out,library_path_);
	 out << ", \"contour_hilo\":";
	 hilo_->toxml(out);
	 out << ", \"contour_grid_value_plot\":";
	 grid_->toxml(out);
}
static MagicsParameter<string> legend("legend", "off", "");
static MagicsParameter<string> contour("contour", "on", "");
static MagicsParameter<string> contour_method("contour_method", "automatic", "");
static MagicsParameter<double> contour_interpolation_floor("contour_interpolation_floor", -INT_MAX, "");
static MagicsParameter<double> contour_interpolation_ceiling("contour_interpolation_ceiling", INT_MAX, "");
static MagicsParameter<string> contour_automatic_setting("contour_automatic_setting", "off", "");
static MagicsParameter<string> contour_automatic_library_path("contour_automatic_library_path", "", "");
static MagicsParameter<string> contour_hilo("contour_hilo", "off", "");
static MagicsParameter<string> contour_grid_value_plot("contour_grid_value_plot", "off", "");
#include "IsoPlot.h"
static SimpleObjectMaker<IsoPlot, IsoPlot> on_IsoPlot("on");
static SimpleObjectMaker<IsoPlot, IsoPlot> isoline_IsoPlot("isoline");
static SimpleObjectMaker<NoIsoPlot, IsoPlot> off_NoIsoPlot("off");
static SimpleObjectMaker<NoIsoPlot, IsoPlot> noisoline_NoIsoPlot("noisoline");
#include "Akima760Method.h"
#include "ContourMethod.h"
#include "AutomaticContourMethod.h"
#include "Akima474Method.h"
static SimpleObjectMaker<AutomaticContourMethod, ContourMethod> automatic_AutomaticContourMethod("automatic");
static SimpleObjectMaker<SampleContourMethod, ContourMethod> sample_SampleContourMethod("sample");
static SimpleObjectMaker<ContourMethod, ContourMethod> linear_ContourMethod("linear");
static SimpleObjectMaker<Akima760Method, ContourMethod> akima760_Akima760Method("akima760");
static SimpleObjectMaker<Akima474Method, ContourMethod> akima474_Akima474Method("akima474");
#include "HiLo.h"
static SimpleObjectMaker<HiLo, HiLoBase> on_HiLo("on");
static SimpleObjectMaker<HiLo, HiLoBase> hilo_HiLo("hilo");
static SimpleObjectMaker<NoHiLo, HiLoBase> off_NoHiLo("off");
static SimpleObjectMaker<NoHiLo, HiLoBase> nohilo_NoHiLo("nohilo");
static SimpleObjectMaker<HighHiLo, HiLoBase> hi_HighHiLo("hi");
static SimpleObjectMaker<HighHiLo, HiLoBase> high_HighHiLo("high");
static SimpleObjectMaker<LowHiLo, HiLoBase> lo_LowHiLo("lo");
static SimpleObjectMaker<LowHiLo, HiLoBase> low_LowHiLo("low");
#include "ValuePlot.h"
static SimpleObjectMaker<ValuePlot, ValuePlotBase> on_ValuePlot("on");
static SimpleObjectMaker<ValuePlot, ValuePlotBase> gridvalues_ValuePlot("gridvalues");
static SimpleObjectMaker<NoValuePlot, ValuePlotBase> off_NoValuePlot("off");
static SimpleObjectMaker<NoValuePlot, ValuePlotBase> nogridvalues_NoValuePlot("nogridvalues");