Back to index

lightning-sunbird  0.9+nobinonly
GUSIDCon.h
Go to the documentation of this file.
00001 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00002 // % Project  :      GUSI                        -      Grand Unified Socket Interface                    
00003 // % File            :      GUSIDCon.nw                 -      DCon interface                                
00004 // % Author   :      Matthias Neeracher                                           
00005 // % Language :      C++                                                        
00006 // %                                                                       
00007 // % $Log: GUSIDCon.h,v $
00008 // % Revision 1.1  2001/03/11 22:33:45  sgehani%netscape.com
00009 // % First Checked In.
00010 // %                                                 
00011 // % Revision 1.4  2000/03/06 06:03:30  neeri                              
00012 // % Check device families for file paths                                  
00013 // %                                                                       
00014 // % Revision 1.3  1999/08/26 05:45:00  neeri                              
00015 // % Fixes for literate edition of source code                             
00016 // %                                                                       
00017 // % Revision 1.2  1999/05/29 06:26:41  neeri                              
00018 // % Fixed header guards                                                   
00019 // %                                                                       
00020 // % Revision 1.1  1999/03/17 09:05:06  neeri                              
00021 // % Added GUSITimer, expanded docs                                        
00022 // %                                                                       
00023 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00024 //                                                                         
00025 // \chapter{DCon interface}                                                
00026 //                                                                         
00027 // A [[GUSIDConSocket]] implements an interface to DCon, Cache Computing's 
00028 // debugging console. For more information about DCon, see                 
00029 // \href{http://www.cache-computing.com/products/dcon/}{Cache Computing's site} 
00030 // at \verb|http://www.cache-computing.com/products/dcon/|.                
00031 //                                                                         
00032 // All instances of [[GUSIDConSocket]] are created by the [[GUSIDConDevice]] 
00033 // singleton, so                                                           
00034 // there is no point in exporting the class itself.                        
00035 //                                                                         
00036 // <GUSIDCon.h>=                                                           
00037 #ifndef _GUSIDCon_
00038 #define _GUSIDCon_
00039 
00040 #ifdef GUSI_INTERNAL
00041 
00042 #include "GUSIDevice.h"
00043 
00044 // \section{Definition of [[GUSIDConDevice]]}                              
00045 //                                                                         
00046 // [[GUSIDConDevice]] is a singleton subclass of [[GUSIDevice]].           
00047 //                                                                         
00048 // <Definition of class [[GUSIDConDevice]]>=                               
00049 class GUSIDConDevice : public GUSIDevice {
00050 public:
00051        static GUSIDConDevice *     Instance();
00052        virtual bool  Want(GUSIFileToken & file);
00053        virtual GUSISocket * open(GUSIFileToken & file, int flags);
00054 protected:
00055        GUSIDConDevice()                          {}
00056        static GUSIDConDevice *     sInstance;
00057 };
00058 
00059 // <Inline member functions for class [[GUSIDConDevice]]>=                 
00060 inline GUSIDConDevice * GUSIDConDevice::Instance()
00061 {
00062        if (!sInstance)
00063               sInstance = new GUSIDConDevice;
00064        return sInstance;
00065 }
00066 
00067 #endif /* GUSI_INTERNAL */
00068 
00069 #endif /* _GUSIDCon_ */