Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
EdgeExtremityGlyphManager.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
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 #include <tulip/tulipconf.h>
27 #include <tulip/MutableContainer.h>
28 
29 namespace tlp {
30 class GlGraphInputData;
31 class EdgeExtremityGlyph;
32 class Graph;
33 
34 class TLP_GL_SCOPE EdgeExtremityGlyphManager {
35 
36 public:
37  virtual ~EdgeExtremityGlyphManager() {
38  }
39 
40  /**
41  * Return the singleton (if the singleton doesn't exist this function create it)
42  */
43  static EdgeExtremityGlyphManager &getInst() {
44  if (!eeinst)
45  eeinst = new EdgeExtremityGlyphManager();
46 
47  return *eeinst;
48  }
49 
50  /**
51  * Return the name of glyph with given id
52  */
53  std::string glyphName(int id);
54  /**
55  * Return the id if glyph with given name
56  */
57  int glyphId(std::string name);
58  /**
59  * Load glyphs plugins
60  */
61  void loadGlyphPlugins();
62 
63  /**
64  * Create the glyph list and store it in glyphs parameter
65  */
66  void initGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
67  MutableContainer<EdgeExtremityGlyph *>& glyphs);
68  /**
69  * Clear the glyph list
70  */
71  void clearGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
72  MutableContainer<EdgeExtremityGlyph *>& glyphs);
73 
74  static const int NoEdgeExtremetiesId;
75 
76 private:
77 
78  EdgeExtremityGlyphManager();
79 
80  static EdgeExtremityGlyphManager* eeinst;
81 
82 
83 };
84 }
85 #endif /* EDGEEXTREMITYGLYPHMANAGER_H_ */
86 ///@endcond