25 #ifndef INCLUDED_GenerateCompoundServer_h_GUID_55F870FA_C398_49B8_9907_A007B3C6F8CA 
   26 #define INCLUDED_GenerateCompoundServer_h_GUID_55F870FA_C398_49B8_9907_A007B3C6F8CA 
   32 #include <boost/mpl/begin_end.hpp> 
   33 #include <boost/mpl/deref.hpp> 
   34 #include <boost/mpl/next.hpp> 
   35 #include <boost/type_traits/is_same.hpp> 
   41 namespace connection {
 
   42     namespace server_generation {
 
   49             template <
typename Iter>
 
   51                 : boost::is_same<typename boost::mpl::next<Iter>::type,
 
   52                                  typename boost::mpl::end<Types>::type> {};
 
   55             template <typename Iter = typename boost::mpl::begin<Types>::type,
 
   61                 typedef typename boost::mpl::deref<Iter>::type type;
 
   73             template <
typename Iter>
 
   76                 typedef typename LeafBase<Iter>::type MyLeafBase;
 
   79                 void mainloop() { MyLeafBase::server_mainloop(); }
 
   80                 vrpn_Connection *connectionPtr() {
 
   81                     return MyLeafBase::connectionPtr();
 
   87             template <
typename Iter>
 
   91                 typedef typename LeafBase<Iter>::type MyLeafBase;
 
   96                     : MyLeafBase(init), MyChainBase(init) {}
 
   99                 void mainloop() { MyLeafBase::server_mainloop(); }
 
  101                 vrpn_Connection *connectionPtr() {
 
  102                     return MyLeafBase::connectionPtr();
 
  111                 return new type(init);
 
  118 #endif // INCLUDED_GenerateCompoundServer_h_GUID_55F870FA_C398_49B8_9907_A007B3C6F8CA 
void mainloop()
Mainloop calls server_mainloop in the leaf. 
static type * make(ConstructorArgument &init)
Create a server. 
Compute base class: the current class from the sequence. 
ServerElement(ConstructorArgument &init)
Constructor passing along. 
ServerElement(ConstructorArgument &init)
Constructor passing along to both base classes. 
Forward declare the main class. 
Metaprogramming to generate a VRPN server object out of an MPL sequence of types. ...
ServerElement type
Computed server type.