Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoDB.h
1 #ifndef COIN_SODB_H
2 #define COIN_SODB_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) by Kongsberg Oil & Gas Technologies.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Kongsberg Oil & Gas Technologies
18  * about acquiring a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/SbBasic.h>
28 #include <Inventor/SbString.h>
29 #include <Inventor/SoType.h>
30 #include <Inventor/sensors/SoSensorManager.h>
31 
32 class SbName;
33 class SbTime;
34 class SoBase;
35 class SoField;
36 class SoInput;
37 class SoNode;
38 class SoPath;
39 class SoSeparator;
40 class SoVRMLGroup;
41 class SoGroup;
42 
43 typedef void SoDBHeaderCB(void * data, SoInput * input);
44 
45 
46 class COIN_DLL_API SoDB {
47 public:
48  static void init(void);
49  static void finish(void);
50  static void cleanup(void);
51 
52  static const char * getVersion(void);
53  static SbBool read(SoInput * input, SoPath *& path);
54  static SbBool read(SoInput * input, SoBase *& base);
55  static SbBool read(SoInput * input, SoNode *& rootnode);
56  static SoSeparator * readAll(SoInput * input);
57  static SoVRMLGroup * readAllVRML(SoInput * input);
58  static SbBool isValidHeader(const char * teststring);
59  static SbBool registerHeader(const SbString & headerstring,
60  SbBool isbinary,
61  float ivversion,
62  SoDBHeaderCB * precallback,
63  SoDBHeaderCB * postcallback,
64  void * userdata = NULL);
65  static SbBool getHeaderData(const SbString & headerstring,
66  SbBool & isbinary,
67  float & ivversion,
68  SoDBHeaderCB *& precallback,
69  SoDBHeaderCB *& postcallback,
70  void *& userdata,
71  SbBool substringok = FALSE);
72  static int getNumHeaders(void);
73  static SbString getHeaderString(const int i);
74  static SoField * createGlobalField(const SbName & name, SoType type);
75  static SoField * getGlobalField(const SbName & name);
76  static void renameGlobalField(const SbName & from, const SbName & to);
77 
78  static void setRealTimeInterval(const SbTime & interval);
79  static const SbTime & getRealTimeInterval(void);
80  static void enableRealTimeSensor(SbBool on);
81 
82  static SoSensorManager * getSensorManager(void);
83  static void setDelaySensorTimeout(const SbTime & t);
84  static const SbTime & getDelaySensorTimeout(void);
85  static int doSelect(int nfds, void * readfds, void * writefds,
86  void * exceptfds, struct timeval * usertimeout);
87 
88  static void addConverter(SoType from, SoType to, SoType converter);
89  static SoType getConverter(SoType from, SoType to);
90 
91  static SbBool isInitialized(void);
92 
93  static void startNotify(void);
94  static SbBool isNotifying(void);
95  static void endNotify(void);
96 
97  typedef SbBool ProgressCallbackType(const SbName & itemid, float fraction,
98  SbBool interruptible, void * userdata);
99  static void addProgressCallback(ProgressCallbackType * func, void * userdata);
100  static void removeProgressCallback(ProgressCallbackType * func, void * userdata);
101 
102  static SbBool isMultiThread(void);
103  static void readlock(void);
104  static void readunlock(void);
105  static void writelock(void);
106  static void writeunlock(void);
107 
108  static void createRoute(SoNode * from, const char * eventout,
109  SoNode * to, const char * eventin);
110  static void removeRoute(SoNode * from, const char * eventout,
111  SoNode * to, const char * eventin);
112 
113 private:
114  static SoGroup * readAllWrapper(SoInput * input, const SoType & grouptype);
115 };
116 
117 #endif // !COIN_SODB_H
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:36
The SoDB class keeps track of internal global data.This class collects various methods for initializi...
Definition: SoDB.h:46
The SoField class is the top-level abstract base class for fields.Fields is the mechanism used throug...
Definition: SoField.h:38
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
The SoPath class is a container class for traversal path descriptions.SoPath objects contain a list o...
Definition: SoPath.h:43
The SoGroup class is a node which managed other node instances.The internal scene data structures in ...
Definition: SoGroup.h:31
The SbTime class instances represents time values.SbTime is a convenient way of doing system independ...
Definition: SbTime.h:41
SbBool ProgressCallbackType(const SbName &itemid, float fraction, SbBool interruptible, void *userdata)
Definition: SoDB.h:97
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
The SoSensorManager class handles the sensor queues.There are two major sensor types in Coin...
Definition: SoSensorManager.h:34
The SoVRMLGroup class is used for grouping VRML nodes.The detailed class documentation is taken verba...
Definition: SoVRMLGroup.h:35
The SbString class is a string class with convenience functions for string operations.This is the class used for storing and working with character strings. It automatically takes care of supporting all the &quot;bookkeeping&quot; tasks usually associated with working with character strings, like memory allocation and deallocation etc.
Definition: SbString.h:42
The SoSeparator class is a state-preserving group node.Subgraphs parented by SoSeparator nodes will n...
Definition: SoSeparator.h:35
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:50
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Fri Sep 9 2016 for Coin by Doxygen 1.8.5.