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

SoForeignFileKit.h
1#ifndef COIN_SOFOREIGNFILEKIT_H
2#define COIN_SOFOREIGNFILEKIT_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
29#include <Inventor/nodekits/SoSubKit.h>
30#include <Inventor/nodekits/SoBaseKit.h>
31
32#include <Inventor/fields/SoSFString.h>
33
34typedef SbBool SoForeignFileIdentifyFunc(const char *);
35
36class SoForeignFileKitP;
37
38class COIN_DLL_API SoForeignFileKit : public SoBaseKit {
39 typedef SoBaseKit inherited;
40
41 SO_KIT_ABSTRACT_HEADER(SoForeignFileKit);
42 SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
43
44public:
45 static void initClass(void);
46
47 SoSFString filename;
48
49 static SbBool isFileSupported(SoInput * in, SbBool exhaust = FALSE);
50 static SoForeignFileKit * createForeignFileKit(SoInput * in, SbBool exhaust = FALSE);
51
52 static SbBool isFileSupported(const char * filename, SbBool exhaust = FALSE);
53 static SoForeignFileKit * createForeignFileKit(const char * filename, SbBool exhaust = FALSE);
54
55 // read support
56 virtual SbBool canReadFile(const char * filename = NULL) const;
57 virtual SbBool readFile(const char * filename);
58 virtual SbBool canReadScene(void) const;
59 virtual SbBool readScene(SoNode * scene);
60 // write support
61 virtual SbBool canWriteFile(const char * filename = NULL) const;
62 virtual SbBool writeFile(const char * filename);
63 virtual SbBool canWriteScene(const char * format = NULL) const;
64 virtual SbBool writeScene(SoNode *& root, const char * format = NULL);
65
66protected:
67 static void initClasses(void);
68
69 SoForeignFileKit(void);
70 virtual ~SoForeignFileKit(void);
71
72 static SbBool registerFileExtension(SoType handler, SbName extension, SoForeignFileIdentifyFunc * identify);
73
74private:
75 SoForeignFileKitP * pimpl;
76
77}; // SoForeignFileKit
78
79#endif // !COIN_SOFOREIGNFILEKIT_H
The SbName class stores strings by reference.
Definition SbName.h:31
The SoBaseKit class is the toplevel superclass for nodekits.
Definition SoBaseKit.h:57
Abstract base class for foreign file format support in Coin.
Definition SoForeignFileKit.h:38
The SoInput class is an abstraction of file import functionality.
Definition SoInput.h:52
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
static void initClasses(void)
Definition SoNode.cpp:533
The SoSFString class is a container for an SbString.
Definition SoSFString.h:31
The SoType class is the basis for the run-time type system in Coin.
Definition SoType.h:50

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

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.