This file is indexed.

/usr/include/tulip/GlGraphInputData.h is in libtulip-dev 4.8.0dfsg-2build2.

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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
/*
 *
 * This file is part of Tulip (www.tulip-software.org)
 *
 * Authors: David Auber and the Tulip development Team
 * from LaBRI, University of Bordeaux
 *
 * Tulip is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * Tulip is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 */
///@cond DOXYGEN_HIDDEN

#ifndef Tulip_GLGRAPHINPUTDATA_H
#define Tulip_GLGRAPHINPUTDATA_H

#include <tulip/tulipconf.h>
#include <tulip/Observable.h>
#include <tulip/LayoutProperty.h>
#include <tulip/DoubleProperty.h>
#include <tulip/StringProperty.h>
#include <tulip/BooleanProperty.h>
#include <tulip/SizeProperty.h>
#include <tulip/IntegerProperty.h>
#include <tulip/ColorProperty.h>

namespace tlp {

class PropertyManager;
class Graph;
class Glyph;
class EdgeExtremityGlyph;
class GlVertexArrayManager;
class GlMetaNodeRenderer;
class GlGraphRenderingParameters;
class GlGlyphRenderer;

/**
 * Class use to store inputData of the graph
 */
class TLP_GL_SCOPE GlGraphInputData : public Observable {

public:

  /**
   * GlGraphInputData available properties
   */
  enum PropertyName {
    VIEW_COLOR=0, /**< color of nodes/edges */
    VIEW_LABELCOLOR, /**< color of labels */
    VIEW_LABELBORDERCOLOR, /**< border color of labels */
    VIEW_LABELBORDERWIDTH, /**< border width of labels */
    VIEW_SIZE, /**< size of nodes/edges */
    VIEW_LABELPOSITION, /**< position of labels */
    VIEW_SHAPE, /**< shape of nodes/edges */
    VIEW_ROTATION, /**< rotation apply on nodes */
    VIEW_SELECTED, /**< nodes/edges selected */
    VIEW_FONT, /**< font name of labels */
    VIEW_FONTSIZE, /**< font size of labels */
    VIEW_LABEL, /**< text of labels */
    VIEW_LAYOUT, /**< position of nodes */
    VIEW_TEXTURE, /**< texture of nodes/edges */
    VIEW_BORDERCOLOR, /**< border color of nodes/edges */
    VIEW_BORDERWIDTH, /**< border width of nodes/edges */
    VIEW_SRCANCHORSHAPE, /**< shape of source arrow edge extremity */
    VIEW_SRCANCHORSIZE, /**< size of source arrow edge extremity */
    VIEW_TGTANCHORSHAPE, /**< shape of target arrow edge extremity */
    VIEW_TGTANCHORSIZE, /**< size of target arrow edge extremity */
    VIEW_ANIMATIONFRAME, /**< animation frame */
    VIEW_FONTAWESOMEICON, /**< font awesome icon name for the font awesome icon glyph*/
    NB_PROPS /** must be the last, give the number of enum props */
  };

  /**
   * Create the inputData with Graph : graph and GlGraphRenderingParameters : parameters
   */
  GlGraphInputData(Graph* graph, GlGraphRenderingParameters* parameters,GlMetaNodeRenderer *renderer = NULL);

  ~GlGraphInputData();

  /**
   * Return the graph of this inputData
   */
  Graph* getGraph() const {
    return graph;
  }

  void treatEvent(const Event &ev);

  /**
   * Set metaNode renderer
   * If deleteOldMetaNodeRenderer==true : this function delete old meta node renderer
   */
  void setMetaNodeRenderer(GlMetaNodeRenderer *renderer,bool deleteOldMetaNodeRenderer=true);

  /**
   * Return metaNode renderer
   */
  GlMetaNodeRenderer *getMetaNodeRenderer() const {
    return _metaNodeRenderer;
  }

  /**
   * Return glEdgeDisplayManager
   */
  GlVertexArrayManager *getGlVertexArrayManager() const {
    return _glVertexArrayManager;
  }

  GlGlyphRenderer *getGlGlyphRenderer() const {
    return _glGlyphRenderer;
  }

  /**
   * Set glEdgeDisplayManager
   */
  void setGlVertexArrayManager(GlVertexArrayManager * manager) {
    _glVertexArrayManager=manager;
  }

  /**
   * Function to get the PropertyInterface* corresponding
   * to a given name
   */
  tlp::PropertyInterface* getProperty(const std::string& name) const {
    std::map<std::string, PropertyName>::iterator it =
      _propertiesNameMap.find(name);

    if (it != _propertiesNameMap.end())
      return _propertiesMap[it->second];

    return NULL;
  }

  /**
   * Function to get the typed PropertyInterface* for a given propertyName
   * See PropertyName enum for more details on available properties
   */
  template<typename T>
  T* getProperty(PropertyName propertyName) const {
    return static_cast<T*>(_propertiesMap[propertyName]);
  }

  /**
   * Function to set the PropertyInterface* for a given propertyName
   * See PropertyName enum for more details on available properties
   */
  void setProperty(PropertyName propertyName, PropertyInterface *property) {
    _properties.erase(_propertiesMap[propertyName]);
    _propertiesMap[propertyName]=property;
    _properties.insert(property);
  }

  /**
   * Function to set the PropertyInterface* for a given name
   */
  bool setProperty(const std::string& name, PropertyInterface *property);

  /**
   * Function to set a bunch of named PropertyInterface*
   */
  bool installProperties(const std::map<std::string, tlp::PropertyInterface*>& propsMap);

  /**
   * Return a pointer on the property used to elementColor
   */
  ColorProperty * getElementColor() const {
    return getProperty<ColorProperty>(VIEW_COLOR);
  }
  /**
   * Set the pointer on the property used to elementColor
   */
  void setElementColor(ColorProperty *property) {
    setProperty(VIEW_COLOR,property);
  }
  /**
   * Return a pointer on the property used to elementLabelColor
   */
  ColorProperty *getElementLabelColor() const {
    return getProperty<ColorProperty>(VIEW_LABELCOLOR);
  }
  /**
   * Set the pointer on the property used to elementLabelColor
   */
  void setElementLabelColor(ColorProperty *property) {
    setProperty(VIEW_LABELCOLOR,property);
  }
  /**
   * Return a pointer on the property used to elementLabelBorderColor
   */
  ColorProperty *getElementLabelBorderColor() const {
    return getProperty<ColorProperty>(VIEW_LABELBORDERCOLOR);
  }
  /**
   * Set the pointer on the property used to elementLabelBorderColor
   */
  void setElementLabelBorderColor(ColorProperty *property) {
    setProperty(VIEW_LABELBORDERCOLOR,property);
  }
  /**
   * Return a pointer on the property used to elementLabelBorderWidth
   */
  DoubleProperty *getElementLabelBorderWidth() const {
    return getProperty<DoubleProperty>(VIEW_LABELBORDERWIDTH);
  }
  /**
   * Set the pointer on the property used to elementLabelBorderColor
   */
  void setElementLabelBorderWidth(DoubleProperty *property) {
    setProperty(VIEW_LABELBORDERWIDTH,property);
  }
  /**
   * Return a pointer on the property used to elementSize
   */
  SizeProperty *getElementSize() const {
    return getProperty<SizeProperty>(VIEW_SIZE);
  }
  /**
   * Set the pointer on the property used to elementSize
   */
  void setElementSize(SizeProperty *property) {
    setProperty(VIEW_SIZE,property);
  }
  /**
   * Return a pointer on the property used to elementLabelPosition
   */
  IntegerProperty *getElementLabelPosition() const {
    return getProperty<IntegerProperty>(VIEW_LABELPOSITION);
  }
  /**
   * Set the pointer on the property used to elementLabelPosition
   */
  void setElementLabelPosition(IntegerProperty *property) {
    setProperty(VIEW_LABELPOSITION,property);
  }
  /**
   * Return a pointer on the property used to elementShape
   */
  IntegerProperty *getElementShape() const {
    return getProperty<IntegerProperty>(VIEW_SHAPE);
  }
  /**
   * Set the pointer on the property used to elementShape
   */
  void setElementShape(IntegerProperty *property) {
    setProperty(VIEW_SHAPE,property);
  }
  /**
   * Return a pointer on the property used to elementRotation
   */
  DoubleProperty *getElementRotation() const {
    return getProperty<DoubleProperty>(VIEW_ROTATION);
  }
  /**
   * Set the pointer on the property used to elementRotation
   */
  void setElementRotation(DoubleProperty *property) {
    setProperty(VIEW_ROTATION,property);
  }
  /**
   * Return a pointer on the property used to elementSelected
   */
  BooleanProperty *getElementSelected() const {
    return getProperty<BooleanProperty>(VIEW_SELECTED);
  }
  /**
   * Set the pointer on the property used to elementSelected
   */
  void setElementSelected(BooleanProperty *property) {
    setProperty(VIEW_SELECTED,property);
  }
  /**
   * Return a pointer on the property used to elementFont
   */
  StringProperty *getElementFont() const {
    return getProperty<StringProperty>(VIEW_FONT);
  }
  /**
   * Set the pointer on the property used to elementFont
   */
  void setElementFont(StringProperty *property) {
    setProperty(VIEW_FONT,property);
  }
  /**
   * Return a pointer on the property used to elementFontSize
   */
  IntegerProperty  *getElementFontSize() const {
    return getProperty<IntegerProperty>(VIEW_FONTSIZE);
  }
  /**
   * Set the pointer on the property used to elementFontSize
   */
  void setElementFontSize(IntegerProperty *property) {
    setProperty(VIEW_FONTSIZE,property);
  }
  /**
   * Return a pointer on the property used to elementLabel
   */
  StringProperty *getElementLabel() const {
    return getProperty<StringProperty>(VIEW_LABEL);
  }
  /**
   * Set the pointer on the property used to elementLabel
   */
  void setElementLabel(StringProperty *property) {
    setProperty(VIEW_LABEL,property);
  }
  /**
   * Return a pointer on the property used to elementLayout
   */
  LayoutProperty *getElementLayout() const {
    return getProperty<LayoutProperty>(VIEW_LAYOUT);
  }
  /**
   * Set the pointer on the property used to elementLayout
   */
  void setElementLayout(LayoutProperty *property) {
    setProperty(VIEW_LAYOUT,property);
  }
  /**
   * Return a pointer on the property used to elementTexture
   */
  StringProperty *getElementTexture() const {
    return getProperty<StringProperty>(VIEW_TEXTURE);
  }
  /**
   * Set the pointer on the property used to elementTexture
   */
  void setElementTexture(StringProperty *property) {
    setProperty(VIEW_TEXTURE,property);
  }
  /**
   * Return a pointer on the property used to elementBorderColor
   */
  ColorProperty *getElementBorderColor() const {
    return getProperty<ColorProperty>(VIEW_BORDERCOLOR);
  }
  /**
   * Set the pointer on the property used to elementBorderColor
   */
  void setElementBorderColor(ColorProperty *property) {
    setProperty(VIEW_BORDERCOLOR,property);
  }
  /**
   * Return a pointer on the property used to elementBorderWidth
   */
  DoubleProperty *getElementBorderWidth() const {
    return getProperty<DoubleProperty>(VIEW_BORDERWIDTH);
  }
  /**
   * Set the pointer on the property used to elementBorderWidth
   */
  void setElementBorderWidth(DoubleProperty *property) {
    setProperty(VIEW_BORDERWIDTH,property);
  }
  /**
   * Return a pointer on the property used to elementSrcAnchorShape
   */
  IntegerProperty *getElementSrcAnchorShape() const {
    return getProperty<IntegerProperty>(VIEW_SRCANCHORSHAPE);
  }
  /**
   * Set the pointer on the property used to elementSrcAnchorShape
   */
  void setElementSrcAnchorShape(IntegerProperty *property) {
    setProperty(VIEW_SRCANCHORSHAPE,property);
  }
  /**
   * Return a pointer on the property used to elementSrcAnchorSize
   */
  SizeProperty *getElementSrcAnchorSize() const {
    return getProperty<SizeProperty>(VIEW_SRCANCHORSIZE);
  }
  /**
   * Set the pointer on the property used to elementSrcAnchorSize
   */
  void setElementSrcAnchorSize(SizeProperty *property) {
    setProperty(VIEW_SRCANCHORSIZE,property);
  }
  /**
   * Return a pointer on the property used to elementTgtAnchorShape
   */
  IntegerProperty *getElementTgtAnchorShape() const {
    return getProperty<IntegerProperty>(VIEW_TGTANCHORSHAPE);
  }
  /**
   * Set the pointer on the property used to elementTgtAnchorShape
   */
  void setElementTgtAnchorShape(IntegerProperty *property) {
    setProperty(VIEW_TGTANCHORSHAPE,property);
  }
  /**
   * Return a pointer on the property used to elementTgtAnchorSize
   */
  SizeProperty *getElementTgtAnchorSize() const {
    return getProperty<SizeProperty>(VIEW_TGTANCHORSIZE);
  }
  /**
   * Set the property name for elementSourceAnchorSize
   */
  void setElementTgtAnchorSize(SizeProperty *property) {
    setProperty(VIEW_TGTANCHORSIZE,property);
  }
  /**
   * Return a pointer on the property used to elementAnimationFrame
   */
  IntegerProperty *getElementAnimationFrame() const {
    return getProperty<IntegerProperty>(VIEW_ANIMATIONFRAME);
  }
  /**
   * Set the pointer on the property used to elementAnimationFrame
   */
  void setElementAnimationFrame(IntegerProperty *property) {
    setProperty(VIEW_ANIMATIONFRAME,property);
  }

  /**
   * Return a pointer on the property used to elementFontAwesomeIcon
   */
  StringProperty *getElementFontAwesomeIcon() const {
    return getProperty<StringProperty>(VIEW_FONTAWESOMEICON);
  }
  /**
   * Set the pointer on the property used to elementFontAwesomeIcon
   */
  void setElementFontAwesomeIcon(StringProperty *property) {
    setProperty(VIEW_FONTAWESOMEICON,property);
  }

  std::set<tlp::PropertyInterface*> properties() const {
    return _properties;
  }

  /**
   * @brief reloadGraphProperties restore the properties of the GlGraphInputData from the the graph.
   */
  void reloadGraphProperties();

  /**
   * @brief renderingParameters return a pointer on the rendering parameters.
   * @return
   */
  GlGraphRenderingParameters* renderingParameters()const {
    return parameters;
  }

  /**
   * @brief setRenderingParameters set the pointer on the rendering parameters.
   * @param newParameters
   */
  void setRenderingParameters(GlGraphRenderingParameters* newParameters) {
    parameters = newParameters;
  }

public :

  Graph* graph;

  GlGraphRenderingParameters* parameters;

  MutableContainer<Glyph *> glyphs;
  MutableContainer<EdgeExtremityGlyph *> extremityGlyphs;

protected:

  std::set<PropertyInterface*> _properties;

  PropertyInterface* _propertiesMap[NB_PROPS];
  static std::map<std::string,PropertyName> _propertiesNameMap;

  GlMetaNodeRenderer *_metaNodeRenderer;
  GlVertexArrayManager *_glVertexArrayManager;
  GlGlyphRenderer *_glGlyphRenderer;


};
}

#endif
///@endcond