sub_arctic.constraints
Class ext_objpart_encoding

java.lang.Object
  |
  +--sub_arctic.constraints.ext_objpart_encoding

public class ext_objpart_encoding
extends java.lang.Object
implements std_encoding_consts

Class to provide a non-standard object/part encoding. Unlike standard references, these may refer to arbitrary objects and not just the local neighborhood. Either non-standard (given by a part number) or standard parts (given by one of the standard part codes plus an orientation value) may be used with the reference.

Methods are provided for creating a new instance from an existing instance by filling in the part portion only. This allows a cleaner notation (i.e., EXT.OBJ(other).W()).


Field Summary
protected  int _orientation
          The orientation of this part.
protected  interactor _ref_obj
          The object being referenced.
protected  int _ref_part
          Encoding of the referenced part.
protected  boolean _uses_std_part
          Indication of whether the referenced part is one of the standard ones (i.e,.
 
Constructor Summary
ext_objpart_encoding(interactor obj, int part_number)
          Constructor for a non-local reference to a non-standard part.
ext_objpart_encoding(interactor obj, int part_code, int orient_code)
          Constructor for a non-local reference to a standard part.
 
Method Summary
 ext_objpart_encoding BOTTOM()
          Method returning an instance designating the y2 part of this object.
 ext_objpart_encoding ENABLED()
          Method returning an instance designating the "enabled" part of this object
 ext_objpart_encoding H()
          Method returning an instance designating the h part of this object
 ext_objpart_encoding HCENTER()
          Method returning an instance designating the horizontal center part of this object
 ext_objpart_encoding LEFT()
          Method returning an instance designating the x part of this object.
 int orientation()
          The orientation of this part.
 ext_objpart_encoding PART_A()
          Method returning an instance designating the "part_a" part of this object.
 ext_objpart_encoding PART_B()
          Method returning an instance designating the "part_b" part of this object.
 ext_objpart_encoding PART(int part_num)
          Method returning an instance designating an arbitrary part of the object being referenced by this object.
 interactor ref_obj()
          The object being referenced.
 int ref_part()
          Encoding of the referenced part.
 ext_objpart_encoding RIGHT()
          Method returning an instance designating the x2 part of this object.
 ext_objpart_encoding TOP()
          Method returning an instance designating the y part of this object.
 boolean uses_std_part()
          Indication of whether the referenced part is one of the standard ones (i.e,.
 ext_objpart_encoding VCENTER()
          Method returning an instance designating the vertical center part of this object
 ext_objpart_encoding VISIBLE()
          Method returning an instance designating the "visible" part of this object
 ext_objpart_encoding W()
          Method returning an instance designating the w part of this object
 ext_objpart_encoding X()
          Method returning an instance designating the x part of this object
 ext_objpart_encoding X1()
          Method returning an instance designating the x part of this object.
 ext_objpart_encoding X2()
          Method returning an instance designating the x2 part of this object
 ext_objpart_encoding Y()
          Method returning an instance designating the y part of this object
 ext_objpart_encoding Y1()
          Method returning an instance designating the y part of this object.
 ext_objpart_encoding Y2()
          Method returning an instance designating the y2 part of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_uses_std_part

protected boolean _uses_std_part
Indication of whether the referenced part is one of the standard ones (i.e,. x, y, x2, y2, w, h, center, visible, part_a, or part_b). This controls the interpretation of the ref_part field. For standard parts this field contains a part encoding (and the orientation field is employed). For non-standard parts, ref_part contains a part number (and the orientation field is ignored).

_ref_obj

protected interactor _ref_obj
The object being referenced.

_orientation

protected int _orientation
The orientation of this part. This should be one of the values: std_encoding_consts.HORIZONTAL, std_encoding_consts.VERTICAL, or std_encoding_consts.NOT_ORIENTED. This is used only for standard part references (which care about the orientation), and is ignored for non-standard references.

_ref_part

protected int _ref_part
Encoding of the referenced part. If uses_std_part is true, then this contains a 3 bit standard part encoding (which is supplemented by the orientation field). If uses_std_part is false, then this contains a full part number (and the orientation field is ignored).
Constructor Detail

ext_objpart_encoding

public ext_objpart_encoding(interactor obj,
                            int part_code,
                            int orient_code)
Constructor for a non-local reference to a standard part.
Parameters:
interactor - obj object being referenced.
int - part_code value for part encoding. This must be between zero and PARTCODE_MAX. Values outside this range will be silently truncated.
int - orient_code code for the orientation of this part. Should be one of HORIZONTAL, VERTICAL, or NOT_ORIENTED

ext_objpart_encoding

public ext_objpart_encoding(interactor obj,
                            int part_number)
Constructor for a non-local reference to a non-standard part.
Parameters:
interactor - obj object being referenced.
int - part_number part number for non-standard part being referenced. Note: the PARTCODE_* values should NOT be used for this parameter.
Method Detail

uses_std_part

public boolean uses_std_part()
Indication of whether the referenced part is one of the standard ones (i.e,. x, y, x2, y2, w, h, center, visible, part_a, or part_b). This controls the interpretation of the ref_part field. For standard parts this field contains a part encoding (and the orientation field is employed). For non-standard parts, ref_part contains a part number (and the orientation field is ignored).

ref_obj

public interactor ref_obj()
The object being referenced.

orientation

public int orientation()
The orientation of this part. This should be one of the values: std_encoding_consts.HORIZONTAL, std_encoding_consts.VERTICAL, or std_encoding_consts.NOT_ORIENTED. This is used only for standard part references (which care about the orientation), and is ignored for non-standard references.

ref_part

public int ref_part()
Encoding of the referenced part. If uses_std_part is true, then this contains a 3 bit standard part encoding (which is supplemented by the orientation field). If uses_std_part is false, then this contains a full part number (and the orientation field is ignored).

X

public ext_objpart_encoding X()
Method returning an instance designating the x part of this object

X1

public ext_objpart_encoding X1()
Method returning an instance designating the x part of this object. This does exactly the same thing as X().

LEFT

public ext_objpart_encoding LEFT()
Method returning an instance designating the x part of this object. This does exactly the same thing as X().

Y

public ext_objpart_encoding Y()
Method returning an instance designating the y part of this object

Y1

public ext_objpart_encoding Y1()
Method returning an instance designating the y part of this object. This does the exactly the same thing as Y().

TOP

public ext_objpart_encoding TOP()
Method returning an instance designating the y part of this object. This does the exactly the same thing as Y().

X2

public ext_objpart_encoding X2()
Method returning an instance designating the x2 part of this object

RIGHT

public ext_objpart_encoding RIGHT()
Method returning an instance designating the x2 part of this object. This is the same as X2().

Y2

public ext_objpart_encoding Y2()
Method returning an instance designating the y2 part of this object

BOTTOM

public ext_objpart_encoding BOTTOM()
Method returning an instance designating the y2 part of this object. This is the same as Y2().

W

public ext_objpart_encoding W()
Method returning an instance designating the w part of this object

H

public ext_objpart_encoding H()
Method returning an instance designating the h part of this object

HCENTER

public ext_objpart_encoding HCENTER()
Method returning an instance designating the horizontal center part of this object

VCENTER

public ext_objpart_encoding VCENTER()
Method returning an instance designating the vertical center part of this object

VISIBLE

public ext_objpart_encoding VISIBLE()
Method returning an instance designating the "visible" part of this object

ENABLED

public ext_objpart_encoding ENABLED()
Method returning an instance designating the "enabled" part of this object

PART_A

public ext_objpart_encoding PART_A()
Method returning an instance designating the "part_a" part of this object.

PART_B

public ext_objpart_encoding PART_B()
Method returning an instance designating the "part_b" part of this object.

PART

public ext_objpart_encoding PART(int part_num)
Method returning an instance designating an arbitrary part of the object being referenced by this object.