Ignore:
Timestamp:
01/25/17 16:25:17 (7 years ago)
Author:
yushan
Message:

initialize the branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/src/filter/garbage_collector.hpp

    r1006 r1037  
    55#include <set> 
    66 
    7 #include "date.hpp" 
     7#include "input_pin.hpp" 
    88 
    99namespace xios 
    1010{ 
    11   /*! 
    12    * Interface shared by all objects that might need to invalidate packets. 
    13    */ 
    14   struct InvalidableObject 
    15   { 
    16     /*! 
    17      * Removes all pending packets which are older than the specified timestamp. 
    18      * 
    19      * \param timestamp the timestamp used for invalidation 
    20      */ 
    21     void virtual invalidate(Time timestamp) = 0; 
    22   }; // struct InvalidableObject 
    23  
    2411  /*! 
    2512   * A basic garbage collector which ensures no old packets linger in the filter graph. 
     
    3522 
    3623      /*! 
    37        * Registers an object for a specified timestamp. 
     24       * Registers a filter for a specified timestamp. 
    3825       * 
    39        * \param object the object to register 
    40        * \param timestamp the timestamp for which the object is registered 
     26       * \param inputPin the input pin of the filter to register 
     27       * \param timestamp the timestamp for which the filter is registered 
    4128       */ 
    42       void registerObject(InvalidableObject* object, Time timestamp); 
     29      void registerFilter(CInputPin* inputPin, Time timestamp); 
    4330 
    4431      /*! 
    45        * Removes a object previously registered for a specified timestamp. 
     32       * Removes a filter previously registered for a specified timestamp. 
    4633       * 
    47        * \param object the object to unregister 
    48        * \param timestamp the timestamp for which the object is unregistered 
     34       * \param inputPin the input pin of the filter to unregister 
     35       * \param timestamp the timestamp for which the filter is unregistered 
    4936       */ 
    50       void unregisterObject(InvalidableObject* object, Time timestamp); 
     37      void unregisterFilter(CInputPin* inputPin, Time timestamp); 
    5138 
    5239      /*! 
    53        * Ensures all registered objects invalidate packets older than the specified timestamp. 
     40       * Ensures all registered filters invalidate packets older than the specified timestamp. 
    5441       * 
    5542       * \param timestamp the timestamp used for invalidation 
     
    6148      CGarbageCollector& operator=(const CGarbageCollector&); 
    6249 
    63       std::map<Time, std::set<InvalidableObject*> > registeredObjects; //!< Currently registered objects 
     50      std::map<Time, std::set<CInputPin*> > registeredFilters; //!< Currently registered filters 
    6451  }; // class CGarbageCollector 
    6552} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.