00001 /*===========================================================================*\ 00002 * * 00003 * OpenMesh * 00004 * Copyright (C) 2003 by Computer Graphics Group, RWTH Aachen * 00005 * www.openmesh.org * 00006 * * 00007 *---------------------------------------------------------------------------* 00008 * * 00009 * License * 00010 * * 00011 * This library is free software; you can redistribute it and/or modify it * 00012 * under the terms of the GNU Library General Public License as published * 00013 * by the Free Software Foundation, version 2. * 00014 * * 00015 * This library is distributed in the hope that it will be useful, but * 00016 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00018 * Library General Public License for more details. * 00019 * * 00020 * You should have received a copy of the GNU Library General Public * 00021 * License along with this library; if not, write to the Free Software * 00022 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00023 * * 00024 \*===========================================================================*/ 00025 00026 00027 //============================================================================= 00028 // 00029 // Helper file for static builds 00030 // 00031 // In opposite to dynamic builds where the instance of every reader module 00032 // is generated within the OpenMesh library, static builds only instanciate 00033 // objects that are at least referenced once. As all reader modules are 00034 // never used directly, they will not be part of a static build, hence 00035 // this file. 00036 // 00037 //============================================================================= 00038 00039 00040 #ifndef __IOINSTANCES_HH__ 00041 #define __IOINSTANCES_HH__ 00042 00043 #if defined(OM_STATIC_BUILD) 00044 00045 //============================================================================= 00046 00047 #include <OpenMesh/Core/System/config.h> 00048 #include <OpenMesh/Core/Utils/SingletonT.hh> 00049 00050 #include <OpenMesh/Core/IO/reader/BaseReader.hh> 00051 #include <OpenMesh/Core/IO/reader/OBJReader.hh> 00052 #include <OpenMesh/Core/IO/reader/OFFReader.hh> 00053 #include <OpenMesh/Core/IO/reader/STLReader.hh> 00054 #include <OpenMesh/Core/IO/reader/OMReader.hh> 00055 00056 #include <OpenMesh/Core/IO/writer/BaseWriter.hh> 00057 #include <OpenMesh/Core/IO/writer/OBJWriter.hh> 00058 #include <OpenMesh/Core/IO/writer/OFFWriter.hh> 00059 #include <OpenMesh/Core/IO/writer/STLWriter.hh> 00060 #include <OpenMesh/Core/IO/writer/OMWriter.hh> 00061 00062 00063 //=== NAMESPACES ============================================================== 00064 00065 namespace OpenMesh { 00066 namespace IO { 00067 00068 //============================================================================= 00069 00070 00071 // Instanciate every Reader module 00072 static BaseReader* OFFReaderInstance = &OFFReader::Instance(); 00073 static BaseReader* OBJReaderInstance = &OBJReader::Instance(); 00074 static BaseReader* STLReaderInstance = &STLReader::Instance(); 00075 static BaseReader* OMReaderInstance = &OMReader::Instance(); 00076 00077 // Instanciate every writer module 00078 static BaseWriter* OBJWriterInstance = &OBJWriter::Instance(); 00079 static BaseWriter* OFFWriterInstance = &OFFWriter::Instance(); 00080 static BaseWriter* STLWriterInstance = &STLWriter::Instance(); 00081 static BaseWriter* OMWriterInstance = &OMWriter::Instance(); 00082 00083 00084 //============================================================================= 00085 } // namespace IO 00086 } // namespace OpenMesh 00087 //============================================================================= 00088 #endif // static ? 00089 #endif //__IOINSTANCES_HH__ 00090 //=============================================================================