Studierstube 4 Documentation Project

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

SoStringMap Class Reference

#include <SoStringMap.h>

List of all members.

Public Types

enum  Mode {
  MAPPING = 0, UNION, INTERSECTION, INDEX,
  MAPPING = 0, UNION, INTERSECTION, INDEX
}
enum  Mode {
  MAPPING = 0, UNION, INTERSECTION, INDEX,
  MAPPING = 0, UNION, INTERSECTION, INDEX
}

Public Member Functions

 SoStringMap ()
 SoStringMap ()

Static Public Member Functions

static void initClass ()
static void initClass ()

Public Attributes

SoMFString a
 provides the domain of input a
SoMFString b
 provides the domain of input b
SoMFString aIn
 input values in the domain a
SoMFString bIn
 input values in the domain b
SoEngineOutput aOut
 mapped input values from bIn in domain a
SoEngineOutput bOut
 mapped input values from aIn in domain b
SoSFEnum mode
 the mode to operate in
SoSFBool compact
 filter empty results in the output lists

Private Member Functions

 SO_ENGINE_HEADER (SoStringMap)
virtual ~SoStringMap ()
virtual void evaluate ()
 SO_ENGINE_HEADER (SoStringMap)
virtual ~SoStringMap ()
virtual void evaluate ()


Detailed Description

The SoStringMap is a utility engine to map strings onto other strings. Three modes are supported MAPPING, UNION and INTERSECTION.

In MAPPING mode the mapping is given as two lists of strings that are matched by the same index. Two inputs provide either values of the a or b domain and two outputs will then provide the mapping of the input data. Therefore data in aIn will map to bOut and bIn to aOut. It is assumed that every data item appears only once and only the first one is always selected to compute the mapping.

In UNION mode the values with the same indices in the fields a and b provide the ordered pairs of a relation. The inputs aIn and bIn will be mapped to any values in the b or a domain that match a pair together with values from aIn and bIn. The outputs will be put into bOut and aOut respectively. In this mode the outputs are treated as sets and every value will only appear once in the output, as a single input can generate more than one output etc. This computes the UNION of the cylinder sets associated with each input value.

In INTERSECTION modes a relation is assumed as in UNION, however only values related to all input values are generated. This basically computes the intersection of the cylinder sets associated with each input value.

In INDEX mode, only a and aIn to bOut is used. It maps the incoming strings to the respective indices they have in the field a. If a string is not found, no output value is created for it. This mode simply allows to compute the indices of strings in lists and can be combined with SoMultiSwitch to build more intelligent switches.

The compact flag controls what to do with empty outputs which are created if inputs in MAPPING or INDEX more are not found in the map. If compact is TRUE, these are filtered out and not added to the output list. This is also the default setting.

Don't worry about the SoMFString fields, remember that OpenInventor does automatic conversion between SoMFFields an SoSFFields of the same type.

File format syntax :

SoStringMap {
    SoMFString a   []
    SoMFString b   []

    SoMFString aIn []
    SoMFString bIn []
  
    SoEngineOutput aOut
    SoEngineOutput bOut  

    SoSFEnum mode MAPPING | UNION | INTERSECTION | INDEX

    SoSFBool compact FALSE
}

Author:
Gerhard Reitmayr

Definition at line 100 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.


Member Enumeration Documentation

enum Mode

Enumerator:
MAPPING 
UNION 
INTERSECTION 
INDEX 
MAPPING 
UNION 
INTERSECTION 
INDEX 

Definition at line 125 of file include/stb/components/starlight/SoStringMap.h.

enum Mode

Enumerator:
MAPPING 
UNION 
INTERSECTION 
INDEX 
MAPPING 
UNION 
INTERSECTION 
INDEX 

Definition at line 125 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.


Constructor & Destructor Documentation

SoStringMap (  ) 

virtual ~SoStringMap (  )  [private, virtual]


Member Function Documentation

virtual void evaluate (  )  [private, virtual]

void evaluate ( void   )  [private, virtual]

static void initClass (  )  [static]

Initializes this class for use in scene graphs. This should be called after database initialization and before any instance of this node is constructed.

void initClass ( void   )  [static]

Initializes this class for use in scene graphs. This should be called after database initialization and before any instance of this node is constructed.

Definition at line 55 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/src/components/starlight/SoStringMap.cpp.

Referenced by Starlight::init().

SO_ENGINE_HEADER ( SoStringMap   )  [private]

SO_ENGINE_HEADER ( SoStringMap   )  [private]


Member Data Documentation

SoMFString a

provides the domain of input a

Definition at line 111 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoMFString aIn

input values in the domain a

Definition at line 116 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoEngineOutput aOut

mapped input values from bIn in domain a

Definition at line 121 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoMFString b

provides the domain of input b

Definition at line 113 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoMFString bIn

input values in the domain b

Definition at line 118 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoEngineOutput bOut

mapped input values from aIn in domain b

Definition at line 123 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoSFBool compact

filter empty results in the output lists

Definition at line 131 of file _CPack_Packages/Linux-Source/TBZ2/studierstube-4.3/include/stb/components/starlight/SoStringMap.h.

Referenced by evaluate(), and SoStringMap().

SoSFEnum mode


The documentation for this class was generated from the following files:
 This page was generated at Wed Oct 27 13:03:24 2010 for Studierstube 4 by Doxygen.
 If you have any comments, please send a message to schmalstieg#icg.tu-graz.ac.at.
www.studierstube.org