Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
CachedPropertyAnimation.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
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 CACHEDPROPERTYANIMATION_H_
22 #define CACHEDPROPERTYANIMATION_H_
23 
24 #include <tulip/PropertyAnimation.h>
25 
26 #include <map>
27 
28 namespace tlp {
29 
30 class BooleanProperty;
31 
32 template<typename PropType, typename NodeType, typename EdgeType>
33 class CachedPropertyAnimation: public PropertyAnimation<PropType, NodeType, EdgeType> {
34 public:
35  CachedPropertyAnimation(tlp::Graph *graph, PropType *start, PropType *end, PropType *out, tlp::BooleanProperty *selection = NULL, int frameCount = 1,
36  bool computeNodes = true, bool computeEdges = true, QObject* parent=NULL);
37  virtual ~CachedPropertyAnimation();
38 
39  virtual void frameChanged(int frame);
40 
41 protected:
42  std::map<std::pair<NodeType, NodeType>, NodeType> computedNodeSteps;
43  std::map<std::pair<EdgeType, EdgeType>, EdgeType> computedEdgeSteps;
44 };
45 
46 #include "cxx/CachedPropertyAnimation.cxx"
47 
48 }
49 
50 #endif /* CACHEDPROPERTYANIMATION_H_ */
51 ///@endcond
A graph property that maps a boolean value to graph elements.