Changeset 1037 for XIOS/dev/branch_yushan/src/filter/garbage_collector.hpp
- Timestamp:
- 01/25/17 16:25:17 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/filter/garbage_collector.hpp
r1006 r1037 5 5 #include <set> 6 6 7 #include " date.hpp"7 #include "input_pin.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 InvalidableObject15 {16 /*!17 * Removes all pending packets which are older than the specified timestamp.18 *19 * \param timestamp the timestamp used for invalidation20 */21 void virtual invalidate(Time timestamp) = 0;22 }; // struct InvalidableObject23 24 11 /*! 25 12 * A basic garbage collector which ensures no old packets linger in the filter graph. … … 35 22 36 23 /*! 37 * Registers a n objectfor a specified timestamp.24 * Registers a filter for a specified timestamp. 38 25 * 39 * \param object the objectto register40 * \param timestamp the timestamp for which the objectis registered26 * \param inputPin the input pin of the filter to register 27 * \param timestamp the timestamp for which the filter is registered 41 28 */ 42 void register Object(InvalidableObject* object, Time timestamp);29 void registerFilter(CInputPin* inputPin, Time timestamp); 43 30 44 31 /*! 45 * Removes a objectpreviously registered for a specified timestamp.32 * Removes a filter previously registered for a specified timestamp. 46 33 * 47 * \param object the objectto unregister48 * \param timestamp the timestamp for which the objectis unregistered34 * \param inputPin the input pin of the filter to unregister 35 * \param timestamp the timestamp for which the filter is unregistered 49 36 */ 50 void unregister Object(InvalidableObject* object, Time timestamp);37 void unregisterFilter(CInputPin* inputPin, Time timestamp); 51 38 52 39 /*! 53 * Ensures all registered objects invalidate packets older than the specified timestamp.40 * Ensures all registered filters invalidate packets older than the specified timestamp. 54 41 * 55 42 * \param timestamp the timestamp used for invalidation … … 61 48 CGarbageCollector& operator=(const CGarbageCollector&); 62 49 63 std::map<Time, std::set< InvalidableObject*> > registeredObjects; //!< Currently registered objects50 std::map<Time, std::set<CInputPin*> > registeredFilters; //!< Currently registered filters 64 51 }; // class CGarbageCollector 65 52 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.