GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOTYPE (3)

NAME

SoType — stores runtime type information

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoType

SYNOPSIS

#include <Inventor/SoType.h>

Methods from class SoType:

    static SoType    
                    
static SoType        fromName(SbName name)    
SbName    
                    
SbName               getName() const    
SoType    
                    
SoType               getParent() const    
static SoType    
                    
static SoType        badType()    
SbBool    
                    
SbBool               isBad() const    
SbBool    
                    
SbBool               isDerivedFrom(SoType t) const    
static int    
                    
static int           getAllDerivedFrom(SoType type, SoTypeList &list)    
SbBool    
                    
SbBool               canCreateInstance() const    
void *    
                    
void *               createInstance() const    
int    
                    
int                  operator ==(const SoType t) const    
int    
                    
int                  operator !=(const SoType t) const    
int    
                    
int                  operator <(const SoType t) const

DESCRIPTION

The SoType class keeps track of runtime type information in Inventor. Each type is associated with a given name, so lookup is possible in either direction.

Many Inventor classes request a unique SoType when they are initialized. This type can then be used to find out the actual class of an instance when only its base class is known, or to obtain an instance of a particular class given its type or name.

Note that the names associated with types of Inventor classes do not contain the "So" prefix.

METHODS

    static SoType    
                    
static SoType        fromName(SbName name)
Returns the type associated with the given name.

    SbName    
                    
SbName               getName() const
Returns the name associated with a type.

    SoType    
                    
SoType               getParent() const
Returns the type of the parent class.

    static SoType    
                    
static SoType        badType()
Returns an always-illegal type. Useful for returning errors.

    SbBool    
                    
SbBool               isBad() const
Returns TRUE if the type is a bad type.

    SbBool    
                    
SbBool               isDerivedFrom(SoType t) const
Returns TRUE if the type is derived from type t.

    static int    
                    
static int           getAllDerivedFrom(SoType type, SoTypeList &list)
Adds all types derived from the given type to the given type list. Returns the number of types added.

    SbBool    
                    
SbBool               canCreateInstance() const
Some types are able to create instances; for example, most nodes and engines (those which are not abstract classes) can be created this way. This method returns TRUE if the type supports such creation.

    void *    
                    
void *               createInstance() const
Creates and returns a pointer to an instance of the type. Returns NULL if an instance could not be created for some reason. The pointer is returned as a generic pointer, but can be cast to the appropriate type. For example:




SoCube *c = (SoCube *) SoCube::getClassTypeId().createInstance();



is a convoluted way of creating a new instance of an SoCube.

    int    
                    
int                  operator ==(const SoType t) const    
int    
                    
int                  operator !=(const SoType t) const
Returns TRUE if this type is the same as or not the same as the given type.

    int    
                    
int                  operator <(const SoType t) const
Less-than comparison operator that can be used to sort types. This is pretty useless otherwise.

SEE ALSO

SoAction, SoBase, SoDetail, SoError, SoEvent, SoField

Search for    or go to Top of page |  Section 3 |  Main Index


SOTYPE(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.