X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FSocketSource.hh;h=3c78d5851fc9b74b1dc29a7b9d4245cb7d8a848a;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=44368fb528914cc0d648a9bd2d606a80226dd887;hpb=4225875220d88a3a1c2b89a7ddae7ac864daa98d;p=senf.git diff --git a/PPI/SocketSource.hh b/PPI/SocketSource.hh index 44368fb..3c78d58 100644 --- a/PPI/SocketSource.hh +++ b/PPI/SocketSource.hh @@ -116,7 +116,13 @@ namespace module { connector::ActiveOutput output; ///< Output connector to which the data received is written - ActiveSocketSource(Handle handle); ///< Create new reader for the given handle + ActiveSocketSource(); ///< Create non-connected reader + /**< The reader will be disabled until a socket is set + \pre Requires \a Reader to be default constructible */ + explicit ActiveSocketSource(Reader reader); ///< Create non-connected reader + /**< The reader will be disabled until a socket is set + \pre Requires \a Reader to be copy constructible */ + explicit ActiveSocketSource(Handle handle); ///< Create new reader for the given handle /**< Data will be read from \a handle and be parsed by \a Reader. \pre Requires \a Reader to be default constructible @@ -129,6 +135,10 @@ namespace module { \param[in] handle Handle to read data from */ Reader & reader(); ///< Access Reader helper + Handle handle(); ///< Access handle + void handle(Handle handle); ///< Set handle + /**< Assigning an empty or in-valid() handle will disable + the module until a new, valid handle is assigned. */ private: void read();