![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef COIN_SODB_H 00002 #define COIN_SODB_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Systems in Motion about acquiring 00018 * a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/SbBasic.h> 00028 #include <Inventor/SbString.h> 00029 #include <Inventor/SoType.h> 00030 #include <Inventor/sensors/SoSensorManager.h> 00031 00032 class SbName; 00033 class SbTime; 00034 class SoBase; 00035 class SoField; 00036 class SoInput; 00037 class SoNode; 00038 class SoPath; 00039 class SoSeparator; 00040 class SoVRMLGroup; 00041 class SoGroup; 00042 00043 typedef void SoDBHeaderCB(void * data, SoInput * in); 00044 00045 00046 class COIN_DLL_API SoDB { 00047 public: 00048 static void init(void); 00049 static void finish(void); 00050 static void cleanup(void); 00051 00052 static const char * getVersion(void); 00053 static SbBool read(SoInput * in, SoPath *& path); 00054 static SbBool read(SoInput * in, SoBase *& base); 00055 static SbBool read(SoInput * in, SoNode *& rootnode); 00056 static SoSeparator * readAll(SoInput * in); 00057 static SoVRMLGroup * readAllVRML(SoInput * in); 00058 static SbBool isValidHeader(const char * teststring); 00059 static SbBool registerHeader(const SbString & headerstring, 00060 SbBool isbinary, 00061 float ivversion, 00062 SoDBHeaderCB * precallback, 00063 SoDBHeaderCB * postcallback, 00064 void * userdata = NULL); 00065 static SbBool getHeaderData(const SbString & headerstring, 00066 SbBool & isbinary, 00067 float & ivversion, 00068 SoDBHeaderCB *& precallback, 00069 SoDBHeaderCB *& postcallback, 00070 void *& userdata, 00071 SbBool substringok = FALSE); 00072 static int getNumHeaders(void); 00073 static SbString getHeaderString(const int i); 00074 static SoField * createGlobalField(const SbName & name, SoType type); 00075 static SoField * getGlobalField(const SbName & name); 00076 static void renameGlobalField(const SbName & from, const SbName & to); 00077 00078 static void setRealTimeInterval(const SbTime & interval); 00079 static const SbTime & getRealTimeInterval(void); 00080 static void enableRealTimeSensor(SbBool on); 00081 00082 static SoSensorManager * getSensorManager(void); 00083 static void setDelaySensorTimeout(const SbTime & t); 00084 static const SbTime & getDelaySensorTimeout(void); 00085 static int doSelect(int nfds, void * readfds, void * writefds, 00086 void * exceptfds, struct timeval * usertimeout); 00087 00088 static void addConverter(SoType from, SoType to, SoType converter); 00089 static SoType getConverter(SoType from, SoType to); 00090 00091 static SbBool isInitialized(void); 00092 00093 static void startNotify(void); 00094 static SbBool isNotifying(void); 00095 static void endNotify(void); 00096 00097 typedef SbBool ProgressCallbackType(const SbName & itemid, float fraction, 00098 SbBool interruptible, void * userdata); 00099 static void addProgressCallback(ProgressCallbackType * func, void * userdata); 00100 static void removeProgressCallback(ProgressCallbackType * func, void * userdata); 00101 00102 static SbBool isMultiThread(void); 00103 static void readlock(void); 00104 static void readunlock(void); 00105 static void writelock(void); 00106 static void writeunlock(void); 00107 00108 static void createRoute(SoNode * from, const char * eventout, 00109 SoNode * to, const char * eventin); 00110 static void removeRoute(SoNode * from, const char * eventout, 00111 SoNode * to, const char * eventin); 00112 00113 private: 00114 static SoGroup * readAllWrapper(SoInput * in, const SoType & grouptype); 00115 }; 00116 00117 #endif // !COIN_SODB_H
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Feb 28 2011 10:11:54 for Coin by Doxygen. 1.7.3