00001 /*************************************************************************** 00002 LOW_platformMiscFactory.h - description 00003 ------------------- 00004 begin : Thu Aug 1 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_PLATFORMMISCFACTORY_H 00019 #define LOW_PLATFORMMISCFACTORY_H 00020 00021 00022 #ifdef __linux__ 00023 #include <sys/types.h> 00024 #endif 00025 00026 00027 class LOW_platformMisc; // forward declaration to avoid circular reference 00028 00029 00030 /** Factory class for platform specific objects of LOW_platformMisc. 00031 00032 This class also contains platform specific type definitions. 00033 00034 This class is thread-safe. 00035 00036 @see LOW_platformMisc 00037 00038 @author Harald Roelle 00039 */ 00040 class LOW_platformMiscFactory { 00041 00042 //======================================================================================= 00043 public: 00044 00045 //===================================================================================== 00046 // 00047 // type definitions 00048 // 00049 00050 #ifdef __linux__ 00051 /** Linux specific type for thread identifier. */ 00052 typedef pid_t threadIdent_t; 00053 #endif 00054 00055 //===================================================================================== 00056 // 00057 // static factory 00058 // 00059 00060 /** Platform aware replacement for creating dynamic instances of LOW_platformMisc. 00061 @return Pointer to new instance of LOW_platformMisc. 00062 */ 00063 static LOW_platformMisc* new_platformMisc(); 00064 00065 00066 //======================================================================================= 00067 private: 00068 00069 //===================================================================================== 00070 // 00071 // constructors 00072 // 00073 00074 /** Constructor. 00075 Private to prevent instaciation as this is a static factory. 00076 */ 00077 LOW_platformMiscFactory(); 00078 00079 /** Destructor. 00080 Private to prevent instaciation as this is a static factory. 00081 */ 00082 virtual ~LOW_platformMiscFactory(); 00083 00084 }; 00085 00086 #endif