Tulip  4.6.0
Better Visualization Through Research
library/tulip-gui/include/tulip/CachedPropertyAnimation.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 #ifndef CACHEDPROPERTYANIMATION_H_
00022 #define CACHEDPROPERTYANIMATION_H_
00023 
00024 #include <tulip/PropertyAnimation.h>
00025 
00026 #include <map>
00027 
00028 namespace tlp {
00029 
00030 class BooleanProperty;
00031 
00032 template<typename PropType, typename NodeType, typename EdgeType>
00033 class CachedPropertyAnimation: public PropertyAnimation<PropType, NodeType, EdgeType> {
00034 public:
00035   CachedPropertyAnimation(tlp::Graph *graph, PropType *start, PropType *end, PropType *out, tlp::BooleanProperty *selection = NULL, int frameCount = 1,
00036                           bool computeNodes = true, bool computeEdges = true, QObject* parent=NULL);
00037   virtual ~CachedPropertyAnimation();
00038 
00039   virtual void frameChanged(int frame);
00040 
00041 protected:
00042   std::map<std::pair<NodeType, NodeType>, NodeType> computedNodeSteps;
00043   std::map<std::pair<EdgeType, EdgeType>, EdgeType> computedEdgeSteps;
00044 };
00045 
00046 #include "cxx/CachedPropertyAnimation.cxx"
00047 
00048 }
00049 
00050 #endif /* CACHEDPROPERTYANIMATION_H_ */
00051 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties