This file is indexed.

/usr/include/tulip/GlGraphComposite.h is in libtulip-dev 4.6.0dfsg-2+b5.

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
/*
 *
 * 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.
 *
 */

#ifndef Tulip_GLGRAPHCOMPOSITE_H
#define Tulip_GLGRAPHCOMPOSITE_H

#include <tulip/GlComposite.h>
#include <tulip/Observable.h>
#include <tulip/GlGraphRenderingParameters.h>
#include <tulip/GlGraphInputData.h>
#include <tulip/GlScene.h>

namespace tlp {

class Graph;
class GlGraphRenderer;

/**
 * @ingroup OpenGL
 * @brief Class use to visualize graph in OpenGL Tulip engine
 *
 * GlSimpleEntity specialisation used to visualize graph in GlScene system
 * @see GlSimpleEntity
 * @see GlScene
 *
 * To visualize graph you have to create a new GlGraphComposite and add it to a GlLayer of a GlScene
 * After that you can change some visualize parameters throw GlGraphRenderingParameters class
 * @see GlGraphRenderingParameters
 * @see getRenderingParametersPointer()
 *
 * To render the graph in OpenGL, GlGraphComposite use a GlGraphRenderer. So if you want to change the system to render the graph, you have to create a new GlGraphRender
 * @see GlGraphRenderer
 */
class TLP_GL_SCOPE GlGraphComposite : public GlComposite, public Observable {

public:

  /**
   * @brief Build a GlGraphComposite with the graph data
   *
   * You can specify a GlGraphRenderer, if you don't do this a GlGraphHighDetailsRenderer will be used to display the graph
   */
  GlGraphComposite(Graph* graph, GlGraphRenderer *graphRenderer=NULL);

  /**
   * @brief Build a GlGraphComposite with the graph data
   *
   * Is better to use the other one constructor
   *
   * This graph composite is associated to the scene passed in parameter
   */
  GlGraphComposite(Graph* graph, GlScene *scene);

  /**
   * @brief Destructor
   */
  ~GlGraphComposite();

  /**
   * @brief Return a copy of rendering parameters use for rendering
   *
   * So after you have to call setRenderingParameters
   */
  const GlGraphRenderingParameters& getRenderingParameters();
  /**
   * @brief Set the rendering parameters use for rendering
   */
  void setRenderingParameters(const GlGraphRenderingParameters &parameter);

  /**
   * @brief Return a pointer on rendering parameters used for rendering
   *
   * With this function you don't have to call setRenderingParameters() function
   */
  GlGraphRenderingParameters* getRenderingParametersPointer();

  /**
   * @brief Return the inputData use by the composite
   *
   * In GlGraphInputData you have properties used to render the graph
   */
  GlGraphInputData* getInputData();

  /**
   * @brief Return the graph used by this GlGraphComposite
   */
  Graph *getGraph() {
    return inputData.getGraph();
  }

///@cond DOXYGEN_HIDDEN

  /**
   * Function used to visit composite's children
   */
  virtual void acceptVisitor(GlSceneVisitor *visitor);
  /**
   * You have to use this function if you want to visit nodes/edges of the graph composite
   */
  virtual void acceptVisitorOnGraph(GlSceneVisitor *visitor);

  virtual void draw(float lod,Camera* camera);

  virtual void selectEntities(Camera *camera,RenderingEntitiesFlag type,int x, int y, int w, int h, std::vector<SelectedEntity>& selectedEntities);

  /**
   * Return set of metaNodes
   */
  std::set<node> &getMetaNodes() {
    if(nodesModified) {
      metaNodes.clear();

      Graph *graph=inputData.getGraph();
      Iterator<node>* nodesIterator = graph->getNodes();

      while (nodesIterator->hasNext()) {
        node n=nodesIterator->next();

        if(graph->getNodeMetaInfo(n))
          metaNodes.insert(n);
      }

      delete nodesIterator;

      nodesModified=false;
    }

    return metaNodes;
  }

  GlGraphRenderer *getRenderer() {
    return graphRenderer;
  }

  /**
   * @brief setRenderer Delete the old renderer and replace it by the new one. If the new renderer is equal to NULL create a GlGraphHighDetailsRenderer.
   */
  void setRenderer(tlp::GlGraphRenderer*);

///@endcond

  /**
   * @brief Function to export data in outString (in XML format)
   */
  virtual void getXML(std::string &outString);

  /**
   * @brief Function to set data with inString (in XML format)
   */
  virtual void setWithXML(const std::string &inString, unsigned int &currentPosition);

protected:

///@cond DOXYGEN_HIDDEN

  void treatEvent(const Event& evt);

///@endcond

  GlGraphRenderingParameters parameters;
  GlGraphInputData inputData;
  Graph *rootGraph;

  GlGraphRenderer *graphRenderer;

  bool nodesModified;
  std::set<node> metaNodes;

};
}

#endif