Candidate_v1.7.0
        stable
      
      
        
          | 
            Last change
 on this file since 4b2207 was             ef0f8f, checked in by Frederik Heber <frederik.heber@…>, 5 years ago           | 
        
        
          | 
             
LinkCell model has name on update for debugging. 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.5 KB
           | 
        
      
      
| Rev | Line |   | 
|---|
| [e776dc] | 1 | /*
 | 
|---|
 | 2 |  * LinkedCell_Model_Update.hpp
 | 
|---|
 | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Dec 20, 2011
 | 
|---|
 | 5 |  *      Author: heber
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | #ifndef LINKEDCELL_MODEL_UPDATE_HPP_
 | 
|---|
 | 9 | #define LINKEDCELL_MODEL_UPDATE_HPP_
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 | // include config.h
 | 
|---|
 | 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 13 | #include <config.h>
 | 
|---|
 | 14 | #endif
 | 
|---|
 | 15 | 
 | 
|---|
| [ef0f8f] | 16 | #include <string>
 | 
|---|
 | 17 | 
 | 
|---|
| [e776dc] | 18 | #include <boost/function.hpp>
 | 
|---|
 | 19 | 
 | 
|---|
 | 20 | #include "LinkedCell_Model.hpp"
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | class TesselPoint;
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | namespace LinkedCell {
 | 
|---|
 | 25 | 
 | 
|---|
 | 26 |   /** This class contains a specific update step for the LinkedCell_Model.
 | 
|---|
 | 27 |    *
 | 
|---|
 | 28 |    *  You have to implement the operator() function with the specific update
 | 
|---|
 | 29 |    *  functionality.
 | 
|---|
 | 30 |    */
 | 
|---|
 | 31 |   class LinkedCell_Model::Update {
 | 
|---|
 | 32 |   public:
 | 
|---|
 | 33 |     //!> PriorityLevel: The lower, the more it overrides others.
 | 
|---|
 | 34 |     typedef size_t PriorityLevel;
 | 
|---|
 | 35 | 
 | 
|---|
| [ef0f8f] | 36 |     Update(boost::function<void (const TesselPoint *)> _updateMethod, const TesselPoint *_Walker, const PriorityLevel _priority, const std::string name="");
 | 
|---|
| [e776dc] | 37 |     ~Update();
 | 
|---|
 | 38 | 
 | 
|---|
 | 39 |     void operator()();
 | 
|---|
 | 40 | 
 | 
|---|
 | 41 |     size_t getPriority() const { return priority; }
 | 
|---|
 | 42 | 
 | 
|---|
| [ef0f8f] | 43 |     std::string getName() { return name; }
 | 
|---|
 | 44 | 
 | 
|---|
| [e776dc] | 45 |   private:
 | 
|---|
 | 46 |     /** Hidden constructor of class Update.
 | 
|---|
 | 47 |      *
 | 
|---|
 | 48 |      * Prevent Update objects without objects to work on.
 | 
|---|
 | 49 |      */
 | 
|---|
 | 50 |     Update();
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 |   private:
 | 
|---|
 | 53 |     //!> update method with bound subject
 | 
|---|
 | 54 |     boost::function<void (const TesselPoint *)> updateMethod;
 | 
|---|
 | 55 |     //!> update object
 | 
|---|
 | 56 |     const TesselPoint *Walker;
 | 
|---|
 | 57 |     //!> priority level of this Update (the lower, the more important)
 | 
|---|
 | 58 |     PriorityLevel priority;
 | 
|---|
| [ef0f8f] | 59 |     //!> name of the update
 | 
|---|
 | 60 |     const std::string name;
 | 
|---|
| [e776dc] | 61 |   };
 | 
|---|
 | 62 | } // namespace LinkedCell
 | 
|---|
 | 63 | 
 | 
|---|
 | 64 | #endif /* LINKEDCELL_MODEL_UPDATE_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.