| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

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
34 typedef SbBool SoForeignFileIdentifyFunc(const char *);
35
36 class SoForeignFileKitP;
37
38 class 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
44 public:
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
66 protected:
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
74 private:
75 SoForeignFileKitP * pimpl;
76
77 }; // SoForeignFileKit
78
79 #endif // !COIN_SOFOREIGNFILEKIT_H

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