Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

LOW_portSerialFactory.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           LOW_portSerialFactory.h  -  description
00003                              -------------------
00004     begin                : Tue Jul 30 2002
00005     copyright            : (C) 2002 by Harald Roelle
00006     email                : roelle@informatik.uni-muenchen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef LOW_PORTSERIALFACTORY_H
00019 #define LOW_PORTSERIALFACTORY_H
00020 
00021 
00022 #include <string>
00023 
00024 
00025 #include "LOW_portSerial.h"
00026 
00027 
00028 /** Factory class for platform specific objects of LOW_portSerial.
00029 
00030     This class also contains platform specific type definitions.
00031 
00032     This class is thread-safe.
00033 
00034     @see LOW_portSerial
00035 
00036     @author Harald Roelle
00037  */
00038 class LOW_portSerialFactory {
00039 
00040 //=======================================================================================
00041 public:
00042 
00043   //=====================================================================================
00044   //
00045   // type definitions
00046   //
00047 
00048 #ifdef __linux__
00049   /** Linux specific type for serial port unique identifier. */
00050   typedef std::string   portSpecifier_t;
00051 #endif
00052 
00053   //=====================================================================================
00054   //
00055   // static factory
00056   //
00057 
00058   /** Platform aware replacement for creating dynamic instances of LOW_portSerial.
00059       @param inPortSpec  Unique identifier for new serial port instance.
00060       @return  Pointer to new instance of LOW_portSerial.
00061    */
00062   static LOW_portSerial* new_portSerial( const portSpecifier_t inPortSpec);
00063 
00064 
00065 //=======================================================================================
00066 private:
00067 
00068   //=====================================================================================
00069   //
00070   // constructors
00071   //
00072 
00073   /** Constructor.
00074       Private to prevent instaciation as this is a static factory.
00075    */
00076   LOW_portSerialFactory();
00077 
00078   /** Destructor.
00079       Private to prevent instaciation as this is a static factory.
00080    */
00081   virtual ~LOW_portSerialFactory();
00082 
00083 };
00084 
00085 #endif

Generated on Tue Feb 3 11:30:26 2004 for OneWireLibrary++ by doxygen 1.3.2