Tulip  5.1.0
Large graphs analysis and drawing
TypeConverter.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 #ifndef _TulipTypeConverter_H
22 #define _TulipTypeConverter_H
23 
24 #include <string>
25 #include <list>
26 #include <tulip/Color.h>
27 #include <tulip/Size.h>
28 #include <tulip/Coord.h>
29 #include <tulip/Node.h>
30 #include <tulip/Edge.h>
31 
32 namespace tlp {
33 
34 struct PropertyInterface;
35 
36 bool stringToColor(std::string &str,Color &col);
37 bool stringToSize(std::string &str,Size &siz);
38 bool stringToCoord(std::string &str,Coord &coo);
39 bool stringToLCoord(std::string &str,std::list<Coord> &lcoo);
40 bool stringToNodeProperty(PropertyInterface *propertyName,node n,std::string &str);
41 bool stringToEdgeProperty(PropertyInterface *propertyName,edge e,std::string &str);
42 bool stringToAllNodeProperty(PropertyInterface *propertyName,std::string &str);
43 bool stringToAllEdgeProperty(PropertyInterface *propertyName,std::string &str);
44 std::string nodePropertyToString(PropertyInterface *propertyName,node n);
45 std::string edgePropertyToString(PropertyInterface *propertyName,edge e);
46 std::string propertyType(PropertyInterface *propertyName);
47 std::string propertyNodeDefaultValue(PropertyInterface *propertyName);
48 std::string propertyEdgeDefaultValue(PropertyInterface *propertyName);
49 
50 
51 
52 }
53 #endif
54 ///@endcond