Abstract base class for foreign file format support in coin.
#include <ForeignFiles/SoForeignFileKit.h>
Inherits SoBaseKit.
Inherited by SoSTLFileKit.
virtual SoType getTypeId (void) const
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. virtual const SoNodekitCatalog * getNodekitCatalog (void) const
virtual SbBool canReadFile (const char *filename=NULL) const
virtual SbBool readFile (const char *filename)
virtual SbBool canWriteFile (const char *filename=NULL) const
virtual SbBool writeFile (const char *filename)
virtual class SoSeparator * convert ()=0
static SoType getClassTypeId (void)
static const SoNodekitCatalog * getClassNodekitCatalog (void)
static void initClass (void)
static SbBool isFileSupported (SoInput *in, SbBool exhaust=FALSE)
static SbBool isFileSupported (const char *filename, SbBool exhaust=FALSE)
static SoForeignFileKit * createForeignFileKit (SoInput *in, SbBool exhaust=FALSE)
static SoForeignFileKit * createForeignFileKit (const char *filename, SbBool exhaust=FALSE)
virtual const SoFieldData * getFieldData (void) const
static const SoFieldData ** getFieldDataPtr (void)
static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void)
static void initClasses (void)
static SbBool registerFileExtension (SoType handler, SbName extension, SoForeignFileIdentifyFunc *identify)
SoSFNode topSeparator
Abstract base class for foreign file format support in Coin.
Abstract base class for foreign file format support in Coin.
Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since:
Coin 3.0
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example:
void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } }
For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.
For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.
Reimplemented from SoBaseKit.
Reimplemented in SoSTLFileKit.
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.
Reimplemented from SoBaseKit.
Reimplemented in SoSTLFileKit.
Returns the nodekit catalog which defines the layout of this class' kit.
Reimplemented from SoBaseKit.
Reimplemented in SoSTLFileKit.
Convenience method. Will extract the filename from in and call the other ieFileSupported() method.
Will return false if file is not supported or /e in is not representing a normal file.
Checks if the filename can be read by a registered SoForeignFileKit handler.
FIXME: exhaust is not implemented.
Convenience method. Will extract the filename from in and call the other ieFileSupported() method.
Creates an instance of a suitable SoForeignFileKit subtype from the given file and reads its content. Returns NULL on failure or a kit with refcount of 0 on success.
FIXME: exhaust is not implemented.
Checks if this concrete class can read the given file.
Reimplemented in SoSTLFileKit.
Reads the given file into the internal representation. If successful, Coin should now be able to render the scene. If you need a pure Coin scenegraph, call convert().
Reimplemented in SoSTLFileKit.
Checks if this concrete class can write to the given file.
Reimplemented in SoSTLFileKit.
Writes the current contents to the given file.
See also:
canWriteFile
Reimplemented in SoSTLFileKit.
Converts (if necessary) the internal representation of the foreign file to a pure Coin scenegraph. Returns the root node with a refcount of 0.
Implemented in SoSTLFileKit.
Registers a concrete SoForeignFileKit subtype to be a handler for files with the given extension. One class can be a handler for multiple filename extensions.
FIXME: identify is not implemented
Generated automatically by Doxygen for Coin from the source code.