Tulip  4.2.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 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 #ifndef CACHEDPROPERTYANIMATION_H_
22 #define CACHEDPROPERTYANIMATION_H_
23 
24 #include "tulip/PropertyAnimation.h"
25 #include <map>
26 #include <tulip/BooleanProperty.h>
27 
28 namespace tlp {
29 
30 template<typename PropType, typename NodeType, typename EdgeType>
31 class CachedPropertyAnimation: public PropertyAnimation<PropType, NodeType, EdgeType> {
32 public:
33  CachedPropertyAnimation(tlp::Graph *graph, PropType *start, PropType *end, PropType *out, tlp::BooleanProperty *selection = NULL, int frameCount = 1,
34  bool computeNodes = true, bool computeEdges = true, QObject* parent=NULL);
35  virtual ~CachedPropertyAnimation();
36 
37  virtual void frameChanged(int frame);
38 
39 protected:
40  std::map<std::pair<NodeType, NodeType>, NodeType> computedNodeSteps;
41  std::map<std::pair<EdgeType, EdgeType>, EdgeType> computedEdgeSteps;
42 };
43 
44 #include "cxx/CachedPropertyAnimation.cxx"
45 
46 }
47 
48 #endif /* CACHEDPROPERTYANIMATION_H_ */
49 ///@endcond