X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FAnnotationRouter.hh;h=7eada36a6ee50828054c4bde55687313a5159060;hb=a693cc27222e447fe920ba2eb122e4d5d664cc0f;hp=6b98b155e5e5d24850b7728b04b52389ffe464ba;hpb=2a7f04c6e922deb5beedc587133af5d836d5a8a9;p=senf.git diff --git a/PPI/AnnotationRouter.hh b/PPI/AnnotationRouter.hh index 6b98b15..7eada36 100644 --- a/PPI/AnnotationRouter.hh +++ b/PPI/AnnotationRouter.hh @@ -23,8 +23,8 @@ /** \file \brief AnnotationRouter public header */ -#ifndef HH_AnnotationRouter_ -#define HH_AnnotationRouter_ 1 +#ifndef HH_SENF_PPI_AnnotationRouter_ +#define HH_SENF_PPI_AnnotationRouter_ 1 // Custom includes #include @@ -41,15 +41,17 @@ namespace module { /** \brief Route packets to destination according to some annotation value This router takes packet on a single input and directs them to one of it outputs depending - on a packet annotation. Each output connected will be associated with a single annotation - value. Incoming packets for which no matching output is found are directed to a default - output. If this output is left unconnected, those packets will be dropped. + on a \link packet_usage_annotation packet annotation\endlink. Each output connected + will be associated with a single annotation value. Incoming packets for which no matching + output is found are directed to a default output. If this output is left unconnected, those + packets will be dropped. The \a AnnotationType template parameter defines the routing key. This annotation must support the following operations: - \li Comparison with '<' - \li Copy-construction - \li Output streaming to an ostream via '<<' + \li Comparison with '<' (\c LessThanCompatable concept) + \li Copy construction and copy assignment (\c Copyable und \c Assignable concepts) + (e.g. via compiler synthesized copy constructor and assignment operator) + \li Output streaming to an ostream via '\c <<' (\c OutputStreamable concept) The following annotation can be used to route the packets according to a mac address. \code @@ -100,7 +102,7 @@ namespace module { struct DuplicateKeyException : public senf::Exception { DuplicateKeyException(AnnotationType const & key) - : senf::Exception("Duplicate senf::ppi::module::AnnotationRouter routing key") + : senf::Exception("Duplicate senf::ppi::module::AnnotationRouter routing key ") { append(boost::lexical_cast(key)); } }; private: