00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects Software Inc. 00009 * 20 Maud St. 00010 * Toronto, Ontario, M5V 2M5 00011 * Canada 00012 * 416-366-4607 00013 * 00014 * NAME: Geometry Conversion Utility Library (C++) 00015 * 00016 * COMMENTS: 00017 * This is the base class for all conversion types. 00018 * 00019 */ 00020 00021 #ifndef __GEO_IOTranslator_h__ 00022 #define __GEO_IOTranslator_h__ 00023 00024 #include "GEO_API.h" 00025 #include <iostream.h> 00026 00027 class GEO_Detail; 00028 class UT_IStream; 00029 00030 class GEO_API GEO_IOTranslator { 00031 public: 00032 GEO_IOTranslator(); 00033 virtual ~GEO_IOTranslator(); 00034 00035 /// Returns the label for the geometry format that this 00036 /// translator supports. 00037 virtual const char *formatName() const = 0; 00038 00039 /// Method to check the extension of the name to see if it matches one that 00040 /// we can handle. 00041 virtual int checkExtension(const char *name) = 0; 00042 00043 /// Method to check if the given magic number matches the magic number. 00044 /// Note that this can return 0 if there is no magic number. 00045 virtual int checkMagicNumber(unsigned magic) = 0; 00046 00047 /// Method to load from a stream. If the ate_magic flag is on, then the 00048 /// library has already read the magic number and the loader should 00049 /// not expect it. 00050 virtual bool fileLoad(GEO_Detail *, UT_IStream &, int ate_magic); 00051 00052 /// Method to save a gdp to another format 00053 virtual int fileSave(const GEO_Detail *, ostream &) = 0; 00054 }; 00055 00056 #endif
1.5.9