6 #ifndef CRYPTOPP_CHANNELS_H 7 #define CRYPTOPP_CHANNELS_H 14 #if CRYPTOPP_MSC_VERSION 15 # pragma warning(push) 16 # pragma warning(disable: 4355) 23 class MessageSwitch :
public Sink 27 void AddRoute(
unsigned int begin,
unsigned int end,
BufferedTransformation &destination,
const std::string &channel);
29 void Put(byte inByte);
30 void Put(
const byte *inString,
unsigned int length);
32 void Flush(
bool completeFlush,
int propagation=-1);
34 void PutMessageEnd(
const byte *inString,
unsigned int length,
int propagation=-1);
38 typedef std::pair<BufferedTransformation *, std::string> Route;
41 RangeRoute(
unsigned int begin,
unsigned int end,
const Route &route)
42 : begin(begin), end(end), route(route) {}
43 bool operator<(
const RangeRoute &rhs)
const {
return begin < rhs.begin;}
44 unsigned int begin, end;
48 typedef std::list<RangeRoute> RouteList;
49 typedef std::list<Route> DefaultRouteList;
52 DefaultRouteList m_defaultRoutes;
53 unsigned int m_nCurrentMessage;
60 typedef std::pair<BufferedTransformation *, std::string> Route;
61 typedef std::multimap<std::string, Route> RouteMap;
63 typedef std::pair<BufferedTransformation *, value_ptr<std::string> > DefaultRoute;
64 typedef std::list<DefaultRoute> DefaultRouteList;
67 typedef RouteMap::iterator MapIterator;
68 typedef DefaultRouteList::iterator ListIterator;
78 void Reset(
const std::string &channel);
82 const std::string & Channel();
85 std::string m_channel;
87 MapIterator m_itMapCurrent, m_itMapEnd;
88 ListIterator m_itListCurrent, m_itListEnd;
102 AddDefaultRoute(destination);
106 AddDefaultRoute(destination, outChannel);
111 size_t ChannelPut2(
const std::string &channel,
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
112 size_t ChannelPutModifiable2(
const std::string &channel, byte *begin,
size_t length,
int messageEnd,
bool blocking);
114 bool ChannelFlush(
const std::string &channel,
bool completeFlush,
int propagation=-1,
bool blocking=
true);
115 bool ChannelMessageSeriesEnd(
const std::string &channel,
int propagation=-1,
bool blocking=
true);
117 byte * ChannelCreatePutSpace(
const std::string &channel,
size_t &size);
123 void AddRoute(
const std::string &inChannel,
BufferedTransformation &destination,
const std::string &outChannel);
124 void RemoveRoute(
const std::string &inChannel,
BufferedTransformation &destination,
const std::string &outChannel);
128 DefaultRouteList m_defaultRoutes;
138 #if CRYPTOPP_MSC_VERSION 139 # pragma warning(pop) Classes providing basic library services.
Abstract base classes that provide a uniform interface to this library.
Classes for automatic resource management.
Route input to different and/or multiple channels based on channel ID.
bool operator<(const OID &lhs, const OID &rhs)
Compare two OIDs for ordering.
const NameValuePairs & g_nullNameValuePairs
An empty set of name-value pairs.
Implementation of BufferedTransformation's attachment interface.
Crypto++ library namespace.
Multiple channels support for custom signal processing.
Interface for retrieving values given their names.