Package com.openinventor.inventor.misc
Class SoTranSender
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoTranSender
-
public class SoTranSender extends Inventor
Sends database changes for transcription. This class is used for transcribing Open Inventor data. Transcription is the process of packaging changes to a database and sending them over a "wire" to another database.The
SoTranSender
class is used on the sending side of transcription. It packages up changes to an Open Inventor database into a file or memory area defined by anSoOutput
instance. It supports a limited set of changes to a database; each change is stored as a command in the transcription area. TheSoTranReceiver
class can be used at the other end to interpret the transcribed commands.- See Also:
SoOutput
,SoTranReceiver
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoTranSender(SoOutput output)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoOutput
getOutput()
void
insert(SoNode node)
Adds an INSERT command to the transcription area.void
insert(SoNode node, SoNode parent, int n)
Adds an INSERT command to the transcription area.void
modify(SoNode node)
Adds a MODIFY command to the transcription area.void
prepareToSend()
Prepares anSoTranSender
instance for transcription, making sure the transcription area is complete and all packaged to go.void
remove(SoNode parent, int n)
Adds a REMOVE command to the transcription area.void
replace(SoNode parent, int n, SoNode newNode)
Adds a REPLACE command to the transcription area.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoTranSender
public SoTranSender(SoOutput output)
Constructor.- Parameters:
output
- Determines what the transcription area is (file or memory).
-
-
Method Detail
-
replace
public void replace(SoNode parent, int n, SoNode newNode)
Adds a REPLACE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be replaced with newNode .
-
prepareToSend
public void prepareToSend()
Prepares anSoTranSender
instance for transcription, making sure the transcription area is complete and all packaged to go. This must be called before the transcription can be performed.
-
modify
public void modify(SoNode node)
Adds a MODIFY command to the transcription area. Updates the field data for the given node to the new contents. Note that this changes only field data; children of groups are not affected, nor is any non-field instance data.
-
remove
public void remove(SoNode parent, int n)
Adds a REMOVE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be removed.
-
insert
public void insert(SoNode node)
Adds an INSERT command to the transcription area. The given node will be added as the last child of the root node on the receiving end.
-
-