llnl.visit
Class AttributeSubject

java.lang.Object
  extended by llnl.visit.AttributeSubject
Direct Known Subclasses:
AnimationAttributes, AnnotationAttributes, AnnotationObject, AnnotationObjectList, AppearanceAttributes, avtBaseVarMetaData, avtDatabaseMetaData, avtDefaultPlotMetaData, avtMatSpeciesMetaData, avtMeshMetaData, avtSimulationCommandSpecification, avtSimulationInformation, avtSpeciesMetaData, Axes2D, Axes3D, AxesArray, AxisAttributes, AxisLabels, AxisRestrictionAttributes, AxisTickMarks, AxisTitles, BoxExtents, ClientInformation, ClientInformationList, ClientMethod, ColorAttribute, ColorAttributeList, ColorControlPoint, ColorControlPointList, ColorTableAttributes, CompactSILRestrictionAttributes, ConstructDataBinningAttributes, ContourOpAttributes, DatabaseAttributes, DatabaseCorrelation, DatabaseCorrelationList, DBOptionsAttributes, DBPluginInfoAttributes, EngineList, EngineProperties, ExportDBAttributes, Expression, ExpressionList, FileOpenOptions, FontAttributes, GaussianControlPoint, GaussianControlPointList, GlobalAttributes, GlobalLineoutAttributes, HostProfileList, InteractorAttributes, InternalResampleAttributes, KeyframeAttributes, LaunchProfile, LightAttributes, LightList, Line, LinearTransformAttributes, MachineProfile, MaterialAttributes, MeshManagementAttributes, MessageAttributes, MovieAttributes, NameschemeAttributes, NamespaceAttributes, PickAttributes, PickVarInfo, PlaneAttributes, Plot, PlotInfoAttributes, PlotList, PlotQueryInfo, PluginManagerAttributes, PointAttributes, PostponedAction, PrinterAttributes, ProcessAttributes, QueryAttributes, QueryList, QueryOverTimeAttributes, RenderingAttributes, SaveSubWindowAttributes, SaveSubWindowsAttributes, SaveWindowAttributes, SelectionList, SelectionProperties, SelectionSummary, SelectionVariableSummary, SILArrayAttributes, SILAttributes, SILMatrixAttributes, SILRestrictionAttributes, SimilarityTransformAttributes, SimulationCommand, SimulationUIValues, SphereAttributes, StatusAttributes, SurfaceFilterAttributes, SyncAttributes, ThresholdOpAttributes, TimeFormat, View2DAttributes, View3DAttributes, ViewAttributes, ViewAxisArrayAttributes, ViewCurveAttributes, ViewerClientAttributes, ViewerClientInformation, ViewerClientInformationElement, ViewerRPC, VisualCueInfo, VisualCueList, WindowAttributes, WindowInformation

public abstract class AttributeSubject
extends java.lang.Object

Base class for state objects.


Constructor Summary
AttributeSubject(int nAtts)
          Constructor for the AttributeSubject class.
 
Method Summary
 void Attach(SimpleObserver o)
          Registers an observer to be called when this object's Notify() method is called.
protected  java.lang.String boolToString(java.lang.String name, boolean val, java.lang.String indent)
           
 void Detach(SimpleObserver o)
          Removes an observer from the list of observers to be called when this object's Notify() method is called.
protected  java.lang.String doubleArrayToString(java.lang.String name, double[] val, java.lang.String indent)
           
protected  java.lang.String doubleToString(java.lang.String name, double val, java.lang.String indent)
           
protected  java.lang.String doubleVectorToString(java.lang.String name, java.util.Vector val, java.lang.String indent)
           
protected  java.lang.String floatArrayToString(java.lang.String name, float[] val, java.lang.String indent)
           
protected  java.lang.String floatToString(java.lang.String name, float val, java.lang.String indent)
           
protected  java.lang.String floatVectorToString(java.lang.String name, java.util.Vector val, java.lang.String indent)
           
 int GetAttributeId()
          Gets the attribute id, which is the id used in the Xfer object when transmitting this object to the remote process.
 java.lang.String GetClassName()
          Returns the name of the state object's class.
 int GetNumAdditionalAttributes()
          Returns the number of attributes added in this level of the state object.
protected  java.lang.String intArrayToString(java.lang.String name, int[] val, java.lang.String indent)
           
protected  java.lang.String intToString(java.lang.String name, int val, java.lang.String indent)
           
protected  java.lang.String intVectorToString(java.lang.String name, java.util.Vector val, java.lang.String indent)
           
 boolean IsSelected(int index)
          Returns whether the specified attribute is selected.
 void Notify()
          Notifies all observers of this object that they need to be updated.
 int NumAttributes()
          Returns the total number of attributes in the state object.
 int NumAttributesSelected()
          Returns the number of selected attributes in the state object.
 int Offset()
          Returns the offset into the selected table where this state object's fields begin.
 void Read(CommunicationBuffer buf)
          Reads the object from a communication buffer, which is usually a socket containing input from the remote process.
abstract  void ReadAtts(int index, CommunicationBuffer buf)
          Reads the specified index's data from the buffer into the object.
protected  void Select(int index)
          Selects the i'th attribute in the object so it will be transmitted to the remote process when written to the communication buffer.
 void SelectAll()
          Selects all of the attributes in the state object so they will all be sent to the viewer when they are transmitted.
 void SetAttributeId(int id)
          Sets the attribute id, which is the id used in the Xfer object when transmitting this object to the remote process.
protected  java.lang.String stringToString(java.lang.String name, java.lang.String val, java.lang.String indent)
           
protected  java.lang.String stringVectorToString(java.lang.String name, java.util.Vector val, java.lang.String indent)
           
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String indent)
           
protected  java.lang.String ucharArrayToString(java.lang.String name, byte[] val, java.lang.String indent)
           
protected  java.lang.String ucharToString(java.lang.String name, byte val, java.lang.String indent)
           
protected  java.lang.String ucharVectorToString(java.lang.String name, java.util.Vector val, java.lang.String indent)
           
 void UnSelectAll()
          Unselects all of the fields in the state object.
 void Write(CommunicationBuffer buf)
          Writes the object to a communication buffer, which is usually a socket headed for the remote process.
 void WriteAtts(CommunicationBuffer buf)
          Writes the selected fields of the object to the buffer.
protected  boolean WriteSelect(int index, CommunicationBuffer buf)
          If the attribute is selected then its index is written to the communcation buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeSubject

public AttributeSubject(int nAtts)
Constructor for the AttributeSubject class.

Parameters:
nAtts - The number of attributes that make up the state object.
Method Detail

Attach

public void Attach(SimpleObserver o)
Registers an observer to be called when this object's Notify() method is called.

Parameters:
o - The observer whose Update() method will be called.

Detach

public void Detach(SimpleObserver o)
Removes an observer from the list of observers to be called when this object's Notify() method is called.

Parameters:
o - The observer to be removed.

GetClassName

public java.lang.String GetClassName()
Returns the name of the state object's class.

Returns:
The name of the state object's class.

Notify

public void Notify()
Notifies all observers of this object that they need to be updated.


SelectAll

public void SelectAll()
Selects all of the attributes in the state object so they will all be sent to the viewer when they are transmitted.


UnSelectAll

public void UnSelectAll()
Unselects all of the fields in the state object.


Offset

public int Offset()
Returns the offset into the selected table where this state object's fields begin.

Returns:
An offset into the selected table.

NumAttributes

public int NumAttributes()
Returns the total number of attributes in the state object.

Returns:
The total number of attributes in the state object.

GetNumAdditionalAttributes

public int GetNumAdditionalAttributes()
Returns the number of attributes added in this level of the state object.

Returns:
The number of attributes added in this level of the state object.

NumAttributesSelected

public int NumAttributesSelected()
Returns the number of selected attributes in the state object.

Returns:
The number of selected attributes in the state object.

IsSelected

public boolean IsSelected(int index)
Returns whether the specified attribute is selected.

Parameters:
index - The index of the attribute to check.
Returns:
true if the attribute is selected; false otherwise.

SetAttributeId

public void SetAttributeId(int id)
Sets the attribute id, which is the id used in the Xfer object when transmitting this object to the remote process.

Parameters:
id - The new id

GetAttributeId

public int GetAttributeId()
Gets the attribute id, which is the id used in the Xfer object when transmitting this object to the remote process.

Returns:
The attribute id.

Write

public void Write(CommunicationBuffer buf)
Writes the object to a communication buffer, which is usually a socket headed for the remote process.

Parameters:
buf - The communication buffer to which the object will be written.

Read

public void Read(CommunicationBuffer buf)
Reads the object from a communication buffer, which is usually a socket containing input from the remote process.

Parameters:
buf - The communication buffer from which the object will be read.

WriteAtts

public void WriteAtts(CommunicationBuffer buf)
Writes the selected fields of the object to the buffer.

Parameters:
buf - The communication buffer to which the object will be written.

ReadAtts

public abstract void ReadAtts(int index,
                              CommunicationBuffer buf)
Reads the specified index's data from the buffer into the object.

Parameters:
buf - The communication buffer to from which the object will be read.

Select

protected void Select(int index)
Selects the i'th attribute in the object so it will be transmitted to the remote process when written to the communication buffer.

Parameters:
index - The index of the attribute to be selected.

WriteSelect

protected boolean WriteSelect(int index,
                              CommunicationBuffer buf)
If the attribute is selected then its index is written to the communcation buffer.

Parameters:
index - The index of the attribute to be selected.
buf - Communication buffer
Returns:
true if the attribute needs to be written; false otherwise.

boolToString

protected java.lang.String boolToString(java.lang.String name,
                                        boolean val,
                                        java.lang.String indent)

intToString

protected java.lang.String intToString(java.lang.String name,
                                       int val,
                                       java.lang.String indent)

intArrayToString

protected java.lang.String intArrayToString(java.lang.String name,
                                            int[] val,
                                            java.lang.String indent)

intVectorToString

protected java.lang.String intVectorToString(java.lang.String name,
                                             java.util.Vector val,
                                             java.lang.String indent)

floatToString

protected java.lang.String floatToString(java.lang.String name,
                                         float val,
                                         java.lang.String indent)

floatArrayToString

protected java.lang.String floatArrayToString(java.lang.String name,
                                              float[] val,
                                              java.lang.String indent)

floatVectorToString

protected java.lang.String floatVectorToString(java.lang.String name,
                                               java.util.Vector val,
                                               java.lang.String indent)

doubleToString

protected java.lang.String doubleToString(java.lang.String name,
                                          double val,
                                          java.lang.String indent)

doubleArrayToString

protected java.lang.String doubleArrayToString(java.lang.String name,
                                               double[] val,
                                               java.lang.String indent)

doubleVectorToString

protected java.lang.String doubleVectorToString(java.lang.String name,
                                                java.util.Vector val,
                                                java.lang.String indent)

ucharToString

protected java.lang.String ucharToString(java.lang.String name,
                                         byte val,
                                         java.lang.String indent)

ucharArrayToString

protected java.lang.String ucharArrayToString(java.lang.String name,
                                              byte[] val,
                                              java.lang.String indent)

ucharVectorToString

protected java.lang.String ucharVectorToString(java.lang.String name,
                                               java.util.Vector val,
                                               java.lang.String indent)

stringToString

protected java.lang.String stringToString(java.lang.String name,
                                          java.lang.String val,
                                          java.lang.String indent)

stringVectorToString

protected java.lang.String stringVectorToString(java.lang.String name,
                                                java.util.Vector val,
                                                java.lang.String indent)

toString

public java.lang.String toString(java.lang.String indent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object