L:/channel/channel/include/Channel.h

Go to the documentation of this file.
00001 
00002 // Copyright (c) 2005, 2006 Yigong Liu
00003 // Permission to use, copy, modify, distribute and sell this software for any 
00004 //     purpose is hereby granted without fee, provided that the above copyright 
00005 //     notice appear in all copies and that both that copyright notice and this 
00006 //     permission notice appear in supporting documentation.
00007 // The author makes no representations about the 
00008 //     suitability of this software for any purpose. It is provided "as is" 
00009 //     without express or implied warranty.
00011 
00012 //--------------------------------------------------------------
00013 //
00014 // Channel.h
00015 //
00016 //-------------------------------------------------------------
00017 
00018 #ifndef _CHANNEL_H_
00019 #define _CHANNEL_H_
00020 
00021 //ace headers
00022 #include "ace/Synch_Traits.h"
00023 
00024 //Channel headers
00025 #include <Clock.h>
00026 #include <BaseDef.h>
00027 #include <Msg.h>
00028 #include <ConnInfo.h>
00029 #include <LinearIdTrait.h>
00030 #include <HierarchicalIdTrait.h>
00031 #include <Marshaler.h>
00032 #include <Binder.h>
00033 #include <Member.h>
00034 #include <ConnHandler.h>
00035 #include <Interface.h>
00036 #include <OutputMgr.h>
00037 #include <Connector.h>
00038 #include <LocalConnector.h>
00039 #include <TcpSockConnector.h>
00040 #include <UnixSockConnector.h>
00041 #include <Port.h>
00042 #include <MapRouter.h>
00043 #include <TrieRouter.h>
00044 
00045 
00046 namespace channel {
00047 
00054   template 
00055     <
00056     class Id_Type, 
00057     class Id_Trait = IdTrait<Id_Type>,
00058     class Synch_Policy = ACE_MT_SYNCH, 
00059     //class AllocPolicy,
00060     class RouterType = MapRouter<Id_Type, Id_Trait, Synch_Policy/*, AllocPolicy*/>
00061     >
00062     class  Channel : public Id_Trait, public RouterType
00063     {
00064       public:
00065 
00067       typedef Id_Type IdType;
00068       typedef Id_Trait IdTrait;
00069       typedef Synch_Policy SynchPolicy;
00070       typedef RouterType Router;
00071       typedef Channel<IdType, Id_Trait, SynchPolicy, Router> ChannelType;
00072       typedef Source<ChannelType, Router::NamespaceType> Source;
00073       typedef Destination<ChannelType, Router::NamespaceType> Destination;
00074       typedef Callback<ChannelType> Callback;
00075       typedef Port<ChannelType> Port;
00076       typedef Msg<Id_Type, SynchPolicy> Msg;
00078       typedef struct Channel_Info_Msg Channel_Info_Msg;
00079       typedef PubSub_Info_Msg<Id_Type> PubSub_Info_Msg;
00080 
00083       typedef LocalConnector<ChannelType> LocalConnector;
00084       typedef Connector<ChannelType, TcpSockTransport<ChannelType> > TcpSockConnector;
00085       typedef Connector<ChannelType, UnixSockTransport<ChannelType> > UnixSockConnector;
00086 
00087     };
00088 
00089 };
00090 
00091 #endif

Generated on Mon Feb 27 19:59:21 2006 for channel by  doxygen 1.4.6-NO