Changeset 1006 for XIOS/trunk/src/filter/garbage_collector.hpp
- Timestamp:
- 11/28/16 14:02:54 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/filter/garbage_collector.hpp
r639 r1006 5 5 #include <set> 6 6 7 #include " input_pin.hpp"7 #include "date.hpp" 8 8 9 9 namespace xios 10 10 { 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 11 24 /*! 12 25 * A basic garbage collector which ensures no old packets linger in the filter graph. … … 22 35 23 36 /*! 24 * Registers a filterfor a specified timestamp.37 * Registers an object for a specified timestamp. 25 38 * 26 * \param inputPin the input pin of the filterto register27 * \param timestamp the timestamp for which the filteris registered39 * \param object the object to register 40 * \param timestamp the timestamp for which the object is registered 28 41 */ 29 void register Filter(CInputPin* inputPin, Time timestamp);42 void registerObject(InvalidableObject* object, Time timestamp); 30 43 31 44 /*! 32 * Removes a filterpreviously registered for a specified timestamp.45 * Removes a object previously registered for a specified timestamp. 33 46 * 34 * \param inputPin the input pin of the filterto unregister35 * \param timestamp the timestamp for which the filteris unregistered47 * \param object the object to unregister 48 * \param timestamp the timestamp for which the object is unregistered 36 49 */ 37 void unregister Filter(CInputPin* inputPin, Time timestamp);50 void unregisterObject(InvalidableObject* object, Time timestamp); 38 51 39 52 /*! 40 * Ensures all registered filters invalidate packets older than the specified timestamp.53 * Ensures all registered objects invalidate packets older than the specified timestamp. 41 54 * 42 55 * \param timestamp the timestamp used for invalidation … … 48 61 CGarbageCollector& operator=(const CGarbageCollector&); 49 62 50 std::map<Time, std::set< CInputPin*> > registeredFilters; //!< Currently registered filters63 std::map<Time, std::set<InvalidableObject*> > registeredObjects; //!< Currently registered objects 51 64 }; // class CGarbageCollector 52 65 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.