#ifndef __XIOS_FILE_WRITER_STORE_FILTER_HPP__ #define __XIOS_FILE_WRITER_STORE_FILTER_HPP__ #include "input_pin.hpp" #include "graph_package.hpp" namespace xios { class CField; class CFile; class CGrid; /*! * A terminal filter which writes the packets it receives in a file. */ class CFileWriterStoreFilter : public CInputPin { public: /*! * Constructs the filter (with one input slot) associated to the specified field * and a garbage collector. * * \param gc the associated garbage collector * \param field the associated field */ CFileWriterStoreFilter(CGarbageCollector& gc, CField* field); /*! * Tests if the filter must auto-trigger. * * \return true if the filter must auto-trigger */ bool virtual mustAutoTrigger() const; /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; CGraphPackage *graphPackage; bool graphEnabled; protected: /*! * Callbacks a field to write a packet to a file. * * \param data a vector of packets corresponding to each slot */ void virtual onInputReady(std::vector data); private: CField* field_; //