Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.pqt.autorib.rib
Class RIBAttributeRec  view RIBAttributeRec download RIBAttributeRec.java

java.lang.Object
  extended byorg.pqt.autorib.rib.RIBStateRec
      extended byorg.pqt.autorib.rib.RIBAttributeRec
All Implemented Interfaces:
java.lang.Cloneable

public class RIBAttributeRec
extends RIBStateRec

Stores various attribute information for an object (color, shaders etc) it uses two types of special content = one for Declares and one for implementation dependent Attributes. Declare statements are, of course, not strictly attributes, but are treated as such in AutoRIB. Note also that Attribute "identifier" "name" is treated in a special way - it is stored in the name variable and must be written out separately.

Version:
$Header: /home/CVSRepository/autoribnew/org/pqt/autorib/rib/RIBAttributeRec.java,v 1.5 2003/12/02 17:10:42 remote Exp $

Field Summary
private  RIBAttributeRec ancestor
          another RIBAttribute rec which is searched for attributes if they are not found in the present AttributeRec
 java.lang.String name
          the name of the object, as set by Attribute "identifier" "name" in the RIB
 
Fields inherited from class org.pqt.autorib.rib.RIBStateRec
inheritsFrom, newContent, newSpecialContent
 
Constructor Summary
RIBAttributeRec()
          default constructor
RIBAttributeRec(RIBAttributeRec a)
          Create an attribute record that inherits attributes from the given record.
 
Method Summary
 java.lang.Object clone()
          standard clone
 org.pqt.autorib.util.Color getColor()
          get the color from the Attribute record
 RIBShader getShader(java.lang.String type)
          retrieve a shader of the given type, returning null if a shader of this type has not been defined
 boolean put(RIBRequest rq)
          add an attribute to the store of attributes, return true if this was indeed an attribute
 void setInheritance(RIBAttributeRec inheritsFrom)
          Set a RIBAttributeRec that is searched for attributes if the given attribute is not found in the current RIBAttributeRec.
static int shaderType(java.lang.String type)
          a static method converting a string description of a shader into an integer tag, as defined in RIBGlobals
 
Methods inherited from class org.pqt.autorib.rib.RIBStateRec
filteredWrite, filteredWriteNonSpecial, filteredWriteSpecial, filteredWriteSpecial, get, put, write, writeNonSpecial, writeSpecial, writeSpecial
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
the name of the object, as set by Attribute "identifier" "name" in the RIB


ancestor

private RIBAttributeRec ancestor
another RIBAttribute rec which is searched for attributes if they are not found in the present AttributeRec

Constructor Detail

RIBAttributeRec

public RIBAttributeRec()
default constructor


RIBAttributeRec

public RIBAttributeRec(RIBAttributeRec a)
Create an attribute record that inherits attributes from the given record. It does not inherit / copy across Declares.

Method Detail

put

public boolean put(RIBRequest rq)
add an attribute to the store of attributes, return true if this was indeed an attribute

Overrides:
put in class RIBStateRec

getColor

public org.pqt.autorib.util.Color getColor()
get the color from the Attribute record


shaderType

public static int shaderType(java.lang.String type)
a static method converting a string description of a shader into an integer tag, as defined in RIBGlobals


getShader

public RIBShader getShader(java.lang.String type)
retrieve a shader of the given type, returning null if a shader of this type has not been defined


clone

public java.lang.Object clone()
standard clone

Overrides:
clone in class RIBStateRec

setInheritance

public void setInheritance(RIBAttributeRec inheritsFrom)
Set a RIBAttributeRec that is searched for attributes if the given attribute is not found in the current RIBAttributeRec. Thus a call to getColor for instance will search the RIBAttributeRec that this rec inherits from if no Color attribute has been set in this rec. Note that the RIBAttributeRec given as a parameter is not cloned.