Back to index

lightning-sunbird  0.9+nobinonly
GUSIPPC.h
Go to the documentation of this file.
00001 // The [[GUSIPPCFactory]] singleton creates [[GUSIPPCSockets]].            
00002 //                                                                         
00003 // <GUSIPPC.h>=                                                            
00004 #ifndef _GUSIPPC_
00005 #define _GUSIPPC_
00006 
00007 #ifdef GUSI_INTERNAL
00008 
00009 #include "GUSISocket.h"
00010 #include "GUSIFactory.h"
00011 #include <sys/ppc.h>
00012 
00013 // \section{Definition of [[GUSIPPCFactory]]}                              
00014 //                                                                         
00015 // [[GUSIPPCFactory]] is a singleton subclass of [[GUSISocketFactory]].    
00016 //                                                                         
00017 // <Definition of class [[GUSIPPCFactory]]>=                               
00018 class GUSIPPCFactory : public GUSISocketFactory {
00019 public:
00020        static GUSISocketFactory *  Instance();
00021        virtual GUSISocket *               socket(int domain, int type, int protocol);
00022 private:
00023        GUSIPPCFactory()                          {}
00024        static GUSISocketFactory *  sInstance;
00025 };
00026 
00027 // <Inline member functions for class [[GUSIPPCFactory]]>=                 
00028 inline GUSISocketFactory * GUSIPPCFactory::Instance()
00029 {
00030        if (!sInstance)
00031               sInstance = new GUSIPPCFactory;
00032        return sInstance;
00033 }
00034 
00035 #endif /* GUSI_INTERNAL */
00036 
00037 #endif /* _GUSIPPC_ */