Program Listing for File file_source.hpp

Return to documentation for file (morpheus/_lib/include/morpheus/stages/file_source.hpp)

Copy
Copied!
            

#pragma once #include "morpheus/messages/meta.hpp" #include <cudf/io/types.hpp>// for table_with_metadata #include <mrc/channel/status.hpp>// for Status #include <mrc/node/source_properties.hpp>// for SourceProperties<>::source_type_t #include <mrc/segment/builder.hpp> #include <mrc/segment/object.hpp>// for Object #include <pymrc/node.hpp> #include <rxcpp/rx.hpp>// for apply, make_subscriber, observable_member, is_on_error<>::not_void, is_on_next_of<>::not_void, trace_activity #include <memory> #include <string> #include <vector>// for vector namespace morpheus { /****** Component public implementations *******************/ /****** FileSourceStage*************************************/ #pragma GCC visibility push(default) class FileSourceStage : public mrc::pymrc::PythonSource<std::shared_ptr<MessageMeta>> { public: using base_t = mrc::pymrc::PythonSource<std::shared_ptr<MessageMeta>>; using typename base_t::source_type_t; using typename base_t::subscriber_fn_t; FileSourceStage(std::string filename, int repeat = 1); private: subscriber_fn_t build(); std::string m_filename; int m_repeat{1}; }; /****** FileSourceStageInterfaceProxy***********************/ struct FileSourceStageInterfaceProxy { static std::shared_ptr<mrc::segment::Object<FileSourceStage>> init(mrc::segment::Builder& builder, const std::string& name, std::string filename, int repeat = 1); }; #pragma GCC visibility pop// end of group } // namespace morpheus

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.