Tulip  5.1.0
Large graphs analysis and drawing
EdgeExtremityGlyphManager.h
1 /*
2  *
3  * This file is part of Tulip (http://tulip.labri.fr)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 
22 #ifndef EDGEEXTREMITYGLYPHMANAGER_H_
23 #define EDGEEXTREMITYGLYPHMANAGER_H_
24 
25 #include <string>
26 
27 #include <tulip/tulipconf.h>
28 #include <tulip/MutableContainer.h>
29 
30 namespace tlp {
31 class GlGraphInputData;
32 class EdgeExtremityGlyph;
33 class Graph;
34 
35 class TLP_GL_SCOPE EdgeExtremityGlyphManager {
36 
37 public:
38  virtual ~EdgeExtremityGlyphManager() {
39  }
40 
41  /**
42  * Return the singleton (if the singleton doesn't exist this function create it)
43  */
44  static EdgeExtremityGlyphManager &getInst() {
45  return eeinst;
46  }
47 
48  /**
49  * Return the name of glyph with given id
50  */
51  std::string glyphName(int id);
52  /**
53  * Return the id if glyph with given name
54  */
55  int glyphId(const std::string& name);
56  /**
57  * Load glyphs plugins
58  */
59  void loadGlyphPlugins();
60 
61  /**
62  * Create the glyph list and store it in glyphs parameter
63  */
64  void initGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
65  MutableContainer<EdgeExtremityGlyph *>& glyphs);
66  /**
67  * Clear the glyph list
68  */
69  void clearGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
70  MutableContainer<EdgeExtremityGlyph *>& glyphs);
71 private:
72 
73  EdgeExtremityGlyphManager();
74 
75  static std::list<std::string> plugins;
76  static EdgeExtremityGlyphManager eeinst;
77 
78 
79 };
80 }
81 #endif /* EDGEEXTREMITYGLYPHMANAGER_H_ */
82 ///@endcond