Open Inventor Reference
|
#include <Inventor/misc/upgraders/SoUpgrader.h>
Public Member Functions | |
virtual SbBool | upgrade (SoInput *in, const SbName &refName, SoBase *&result) |
This is the key method that reads in fields, calls the createNewNode() method (which is responsible for looking at the fields read and setting the appropriate fields in the new node), and then reads in and adds children to the new node if it is derived from SoGroup. | |
Static Public Member Functions | |
static SoUpgrader * | getUpgrader (const SbName &className, float fileFormatVersion) |
Find out if an upgrader exists for a specific class and a specific version of the file format. | |
static void | initClass () |
Initializes base node class. | |
static void | initClasses () |
Initialize ALL upgraders. | |
Protected Member Functions | |
virtual SoNode * | createNewNode ()=0 |
Subclasses MUST define this... | |
SoUpgrader () | |
Constructor. | |
virtual | ~SoUpgrader () |
Static Protected Member Functions | |
static void | registerUpgrader (const SoType &type, const SbName &className, float version) |
Register a converter for a specific class and a specific file format. | |
Protected Attributes | |
SbBool | isGroup |
This is set to TRUE in the SoUpgrader constructor. |
Definition at line 68 of file SoUpgrader.h.
SoUpgrader::SoUpgrader | ( | ) | [protected] |
Subclass constructors should be protected or private (upgraders are created on demand by SoDB, and should never be created using 'new').
virtual SoUpgrader::~SoUpgrader | ( | ) | [protected, virtual] |
virtual SoNode* SoUpgrader::createNewNode | ( | ) | [protected, pure virtual] |
Implemented in SoV1CustomNode.
static SoUpgrader* SoUpgrader::getUpgrader | ( | const SbName & | className, |
float | fileFormatVersion | ||
) | [static] |
static void SoUpgrader::initClass | ( | ) | [static] |
Reimplemented from SoGroup.
Reimplemented in SoV1CustomNode.
static void SoUpgrader::initClasses | ( | ) | [static] |
Reimplemented from SoNode.
static void SoUpgrader::registerUpgrader | ( | const SoType & | type, |
const SbName & | className, | ||
float | version | ||
) | [static, protected] |
virtual SbBool SoUpgrader::upgrade | ( | SoInput * | in, |
const SbName & | refName, | ||
SoBase *& | result | ||
) | [virtual] |
Reimplemented in SoV1CustomNode.
SbBool SoUpgrader::isGroup [protected] |
A subclass should set this to FALSE in its constructor if its createNewNode() method returns a group node but the node being upgraded is not really a group; it keeps children from being read.
Definition at line 103 of file SoUpgrader.h.