BVB Source Codes

Gource Show action.h Source code

Return Download Gource: download action.h Source code - Download Gource Source code - Type:.h
  1. /*
  2.     Copyright (C) 2009 Andrew Caudwell (acaudwell@gmail.com)
  3.  
  4.     This program is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU General Public License
  6.     as published by the Free Software Foundation; either version
  7.     3 of the License, or (at your option) any later version.
  8.  
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.     GNU General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU General Public License
  15.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  16. */
  17.  
  18. #ifndef RACTION_H
  19. #define RACTION_H
  20.  
  21. #include "user.h"
  22. #include "file.h"
  23.  
  24. class RUser;
  25. class RFile;
  26.  
  27. class RAction {
  28. protected:
  29.     vec3 colour;
  30.     virtual void apply();
  31. public:
  32.     RUser* source;
  33.     RFile* target;
  34.  
  35.     float addedtime;
  36.  
  37.     float progress;
  38.     float rate;
  39.  
  40.     RAction(RUser* source, RFile* target, float addedtime);
  41.     virtual ~RAction() {};
  42.    
  43.     inline bool isFinished() const { return (progress >= 1.0); };
  44.  
  45.     virtual void logic(float dt);
  46.  
  47.     void drawToVBO(quadbuf& buffer) const ;
  48.     void draw(float dt);
  49. };
  50.  
  51. class CreateAction : public RAction {
  52. public:
  53.     CreateAction(RUser* source, RFile* target, float addedtime);
  54. };
  55.  
  56. class RemoveAction : public RAction {
  57. public:
  58.     RemoveAction(RUser* source, RFile* target, float addedtime);
  59.  
  60.     void logic(float dt);
  61. };
  62.  
  63. class ModifyAction : public RAction {
  64. protected:
  65.     vec3 modify_colour;
  66. public:
  67.     ModifyAction(RUser* source, RFile* target, float addedtime, const vec3& modify_colour);
  68.  
  69.     void apply();
  70. };
  71.  
  72. #endif
  73.  
  74.  
downloadaction.h Source code - Download Gource Source code
Related Source Codes/Software:
FDFullscreenPopGesture - A UINavigationController's category to enable full... 2017-01-10
node-style-guide - A guide for styling your node.js / JavaScript code... 2017-01-09
ImageOptim - GUI image optimizer for Mac htt... 2017-01-09
falcon - Falcon is a low-level, high-performance Python fra... 2017-01-09
prerender - Node server that uses phantomjs to render a javasc... 2017-01-09
che - Eclipse Che: Next-generation Eclipse IDE. Open sou... 2017-01-10
notepad-plus-plus - Notepad++ official repository h... 2017-01-10
waterline - An adapter-based ORM for Node.js with support for ... 2017-01-10
Workerman - An asynchronous event driven PHP framework for eas... 2017-01-10
structor - An advanced visual editor for React components ... 2017-01-10
vimr - Project VimR - Refined Neovim experience for macOS... 2017-02-19
vue-admin - Vue Admin Panel Framework, Powered by Vue 2.0 and ... 2017-02-19
dev-setup - Mac OS X development environment setup: Easy-to-un... 2017-02-19
CMPopTipView - Custom UIView for iOS that pops up an animated "bu... 2017-02-19
git-recipes - Git for recipes in Chinese. The high quality of Gi... 2017-02-19
CLNDR - 2017-02-19
OptiKey - OptiKey - Full computer control and speech with yo... 2017-02-19
MRProgress - Collection of iOS drop-in components to visualize ... 2017-02-19
BGARefreshLayout-Android - On a variety of drop-down refresh effect, loading ... 2017-02-19
angular-http-auth - 2017-02-19

 Back to top