Main Page | Namespace List | Class Hierarchy | Class List | File List | Related Pages

ProtocolRole.h

Go to the documentation of this file.
00001 
00041 // break out the Protocol Roles (ie. port interfaces) into a separate include file which can be used
00042 // in building capsule translation units without carrying along the entire weight of the Connector template classes
00043 
00044 #ifndef H_PROLE
00045 #define H_PROLE
00046 
00047 #ifndef NO_DEPENDENCY_INCLUDES
00048 #include <iostream>
00049 #endif
00050 
00051 
00052 namespace Connector
00053 {
00054 
00058     template < typename Payload > 
00059     struct InputPort
00060     {
00061         virtual operator const Payload &( ) = 0;
00062     };
00063 
00064 
00068     template < typename Payload > 
00069     struct OutputPort
00070     {
00071         virtual operator Payload &() = 0;
00072     };
00073 
00074     
00079     template< typename Key, typename Payload >
00080     struct LookupInputPort
00081     {
00082         virtual const Payload &operator() ( const Key & ) = 0;
00083     };
00084     
00085     
00089     template< typename Key, typename Payload >
00090     struct BinnedOutputPort
00091     {
00092         virtual Payload &operator() ( const Key & ) = 0;
00093     };
00094 
00095 
00100     struct MonitorPort 
00101     {
00102         virtual operator std::ostream &();
00103     };
00104     
00105 }; // namespace Connector
00106 
00107 #endif

Generated on Fri Oct 8 12:18:33 2004 for Calibrate.Connector by doxygen 1.3.4