Tulip  4.6.0
Better Visualization Through Research
library/tulip-ogl/include/tulip/EdgeExtremityGlyphManager.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 ///@cond DOXYGEN_HIDDEN
00020 
00021 
00022 #ifndef EDGEEXTREMITYGLYPHMANAGER_H_
00023 #define EDGEEXTREMITYGLYPHMANAGER_H_
00024 
00025 #include <string>
00026 
00027 #include <tulip/tulipconf.h>
00028 #include <tulip/MutableContainer.h>
00029 
00030 namespace tlp {
00031 class GlGraphInputData;
00032 class EdgeExtremityGlyph;
00033 class Graph;
00034 
00035 class TLP_GL_SCOPE EdgeExtremityGlyphManager {
00036 
00037 public:
00038   virtual ~EdgeExtremityGlyphManager() {
00039   }
00040 
00041   /**
00042    * Return the singleton (if the singleton doesn't exist this function create it)
00043    */
00044   static EdgeExtremityGlyphManager &getInst() {
00045     if (!eeinst)
00046       eeinst = new EdgeExtremityGlyphManager();
00047 
00048     return *eeinst;
00049   }
00050 
00051   /**
00052    * Return the name of glyph with given id
00053    */
00054   std::string glyphName(int id);
00055   /**
00056    * Return the id if glyph with given name
00057    */
00058   int glyphId(const std::string& name);
00059   /**
00060    * Load glyphs plugins
00061    */
00062   void loadGlyphPlugins();
00063 
00064   /**
00065    * Create the glyph list and store it in glyphs parameter
00066    */
00067   void initGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
00068                      MutableContainer<EdgeExtremityGlyph *>& glyphs);
00069   /**
00070    * Clear the glyph list
00071    */
00072   void clearGlyphList(Graph **graph, GlGraphInputData* glGraphInputData,
00073                       MutableContainer<EdgeExtremityGlyph *>& glyphs);
00074 private:
00075 
00076   EdgeExtremityGlyphManager();
00077 
00078   static EdgeExtremityGlyphManager* eeinst;
00079 
00080 
00081 };
00082 }
00083 #endif /* EDGEEXTREMITYGLYPHMANAGER_H_ */
00084 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties