|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ohrasys.cad.gds.GDSRecord
public class GDSRecord
This class represents a generic GDSII stream record. A stream record is a byte stream that is divided into four parts.
| Field Summary | |
|---|---|
static byte |
ANGLE
ANGLE record type |
static byte |
AREF
AREF record type |
static int |
AREF_ELEM_TYPE
AREF element identifier |
static byte |
ATTRTABLE
ATTRTABLE record type |
static byte |
BGNEXTN
BGNEXTN record type |
static byte |
BGNLIB
BGNLIB record type |
static byte |
BGNSTR
BGNSTR record type |
static byte |
BIT_ARRAY_TYPE
Indicates that record data is a two byte bit array. |
static byte |
BORDER
BORDER record type |
static byte |
BOUNDARY
BOUNDARY record type |
static int |
BOUNDARY_ELEM_TYPE
BOUNDARY element identifier |
static byte |
BOX
BOX record type |
static int |
BOX_ELEM_TYPE
BOX element identifier |
static byte |
BOXTYPE
BOXTYPE record type |
static byte |
COLROW
COLROW record type |
static byte |
CONTACT
CONTACT record type |
static int |
CONTACT_ELEM_TYPE
CONTACT element identifier |
protected byte[] |
data
The record data. |
static byte |
DATATYPE
DATATYPE record type |
protected byte |
dattype
The data type of the record. |
static byte |
DOUBLE_TYPE
Indicates the record data is eight byte floating point. |
static byte |
ELFLAGS
ELFLAGS record type |
static byte |
ELKEY
ELKEY record type |
static byte |
ENDEL
ENDEL record type |
static byte |
ENDEXTN
ENDEXTN record type |
static byte |
ENDLIB
ENDLIB record type |
static byte |
ENDMASKS
ENDMASKS record type |
static byte |
ENDSTR
ENDSTR record type |
static byte |
FLOAT_TYPE
Indicates the record data is four byte floating point. |
static byte |
FONTS
FONTS record type |
static byte |
FORMAT
FORMAT record type |
static byte |
GENERATIONS
GENERATIONS record type |
static byte |
HARDFENCE
HARDFENCE record type |
static byte |
HARDWIRE
HARDWIRE record type |
static byte |
HEADER
HEADER record type |
protected com.ohrasys.cad.gds.GDSI18NFactory |
i18n
The internationalized message factory |
static byte |
INT_TYPE
Indicates the record data type is four byte signed integer. |
static byte |
LAYER
LAYER record type |
protected short |
length
The sum total length of all record fields. |
static byte |
LIBDIRSIZE
LIBDIRSIZE record type |
static byte |
LIBNAME
LIBNAME record type |
static byte |
LIBSECUR
LIBSECUR record type |
static byte |
LINKKEYS
LINKKEYS record type |
static byte |
LINKTYPE
LINKTYPE record type |
static byte |
MAG
MAG record type |
static byte |
MASK
MASK record type |
static int |
MAX_REC_LEN
The maximum number of data bytes a record may contain |
static byte |
NO_DATA_TYPE
Indicates a record has no data associated with it. |
static byte |
NODE
NODE record type |
static int |
NODE_ELEM_TYPE
NODE element identifier |
static byte |
NODEPORT
NODEPORT record type |
static byte |
NODETYPE
NODETYPE record type |
static byte |
NULL
NULL record type |
static byte |
PATH
PATH record type |
static int |
PATH_ELEM_TYPE
PATH element identifier |
static byte |
PATHPORT
PATHPORT record type |
static byte |
PATHTYPE
PATHTYPE record type |
static byte |
PLEX
PLEX record type |
static byte |
PRESENTATION
PRESENTATION record type |
static byte |
PROPATTR
PROPATTR record type |
static byte |
PROPVALUE
PROPVALUE record type |
protected byte |
rectype
The record type. |
static byte |
REFLIBS
REFLIBS record type |
static byte |
RESERVED
RESERVED record type |
static byte |
SHORT_TYPE
Indicates the record data type is two byte signed integer. |
static byte |
SNAME
SNAME record type |
static byte |
SOFTFENCE
SOFTFENCE record type |
static byte |
SOFTWIRE
SOFTWIRE record type |
static byte |
SPACER_ERROR
SPACER_ERROR record type |
static byte |
SPACING
SPACING record type |
static byte |
SREF
SREF record type |
static int |
SREF_ELEM_TYPE
SREF element identifier |
static byte |
SRFNAME
SRFNAME record type |
static byte |
STRANS
STRANS record type |
static byte |
STRCLASS
STRCLASS record type |
static byte |
STRING
STRING record type |
static byte |
STRING_TYPE
Indicates the record data is ASCII string data. |
static byte |
STRNAME
STRNAME record type |
static byte |
STRTYPE
STRTYPE record type |
static byte |
STYPTABLE
STYPTABLE record type |
static byte |
TAPECODE
TAPECODE record type |
static byte |
TAPENUM
TAPENUM record type |
static byte |
TEXT
TEXT record type |
static int |
TEXT_ELEM_TYPE
TEXT element identifier |
static byte |
TEXTNODE
TEXTNODE record type |
static byte |
TEXTTYPE
TEXTTYPE record type |
static byte |
UINTEGER
UINTEGER record type |
static byte |
UNITS
UNITS record type |
static byte |
USERCONSTRAINT
USERCONSTRAINT record type |
static byte |
USTRING
USTRING record type |
static byte |
WIDTH
WIDTH record type |
static byte |
XY
XY record type |
| Constructor Summary | |
|---|---|
GDSRecord()
Creates a new NULL GDSRecord object. |
|
GDSRecord(GDSRecord rec)
Creates a new GDSRecord object from an existing record. |
|
GDSRecord(short length,
byte rectype,
byte dattype,
byte[] data)
Creates a new GDSRecord object. |
|
| Method Summary | |
|---|---|
byte[] |
getData()
Returns a copy of the data |
byte |
getDattype()
The datatype of the record |
short |
getLength()
Return the total record length |
byte |
getRectype()
Return the record type |
byte[] |
toBytes()
Creates a byte array representation of this gds record suitable for consumption by a stream reader/writer. |
java.lang.String |
toString()
Returns a descriptive string representation of the record. |
protected void |
validateBitarrayRec(byte rectype,
short validbits)
Ensures a record is well formed, of the expected record type, of bit array datatype and that no reserved fields are being utilized. |
protected void |
validateDoubleRec(byte rectype)
Ensures a record is well formed, of the expected record type and of double datatype |
protected void |
validateDoubleRec(byte rectype,
int len)
Ensures a record is well formed, of the expected record type, of double datatype and contains len number of data bytes |
protected void |
validateDoubleRec(byte rectype,
int maxlen,
int minlen)
Ensures a record is well formed, of the expected record type, of double datatype and contains between min and max number of data bytes |
protected void |
validateFloatRec(byte rectype)
Ensures a record is well formed, of the expected record type and of float datatype |
protected void |
validateFloatRec(byte rectype,
int len)
Ensures a record is well formed, of the expected record type, of float datatype and contains len number of data bytes |
protected void |
validateFloatRec(byte rectype,
int maxlen,
int minlen)
Ensures a record is well formed, of the expected record type, of float datatype and contains between min and max number of data bytes |
protected void |
validateIntRec(byte rectype)
Ensures a record is well formed, of the expected record type and of int datatype |
protected void |
validateIntRec(byte rectype,
int len)
Ensures a record is well formed, of the expected record type, of int datatype and contains len number of data bytes |
protected void |
validateIntRec(byte rectype,
int maxlen,
int minlen)
Ensures a record is well formed, of the expected record type, of int datatype and contains between min and max number of data bytes |
protected void |
validateNodataRec(byte rectype)
Ensures a record is well formed, of the expected record type and of no data type |
protected void |
validateShortRec(byte rectype)
Ensures a record is well formed, of the expected record type and of short datatype |
protected void |
validateShortRec(byte rectype,
int len)
Ensures a record is well formed, of the expected record type, of short datatype and contains len number of data bytes |
protected void |
validateShortRec(byte rectype,
int maxlen,
int minlen)
Ensures a record is well formed, of the expected record type, of short datatype and contains between min and max number of data bytes |
protected void |
validateStringRec(byte rectype,
int len)
Ensures a record is well formed, of the expected record type, of string datatype and contains len number of data bytes |
protected void |
validateStringRec(byte rectype,
int maxlen,
int minlen)
Ensures a record is well formed, of the expected record type, of string datatype and contains between min and max number of data bytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte NO_DATA_TYPE
public static final byte BIT_ARRAY_TYPE
public static final byte SHORT_TYPE
public static final byte INT_TYPE
public static final byte FLOAT_TYPE
public static final byte DOUBLE_TYPE
public static final byte STRING_TYPE
public static final byte NULL
public static final byte HEADER
public static final byte BGNLIB
public static final byte LIBNAME
public static final byte UNITS
public static final byte ENDLIB
public static final byte BGNSTR
public static final byte STRNAME
public static final byte ENDSTR
public static final byte BOUNDARY
public static final byte PATH
public static final byte SREF
public static final byte AREF
public static final byte TEXT
public static final byte LAYER
public static final byte DATATYPE
public static final byte WIDTH
public static final byte XY
public static final byte ENDEL
public static final byte SNAME
public static final byte COLROW
public static final byte TEXTNODE
public static final byte NODE
public static final byte TEXTTYPE
public static final byte PRESENTATION
public static final byte SPACING
public static final byte STRING
public static final byte STRANS
public static final byte MAG
public static final byte ANGLE
public static final byte UINTEGER
public static final byte USTRING
public static final byte REFLIBS
public static final byte FONTS
public static final byte PATHTYPE
public static final byte GENERATIONS
public static final byte ATTRTABLE
public static final byte STYPTABLE
public static final byte STRTYPE
public static final byte ELFLAGS
public static final byte ELKEY
public static final byte LINKTYPE
public static final byte LINKKEYS
public static final byte NODETYPE
public static final byte PROPATTR
public static final byte PROPVALUE
public static final byte BOX
public static final byte BOXTYPE
public static final byte PLEX
public static final byte BGNEXTN
public static final byte ENDEXTN
public static final byte TAPENUM
public static final byte TAPECODE
public static final byte STRCLASS
public static final byte RESERVED
public static final byte FORMAT
public static final byte MASK
public static final byte ENDMASKS
public static final byte LIBDIRSIZE
public static final byte SRFNAME
public static final byte LIBSECUR
public static final byte BORDER
public static final byte SOFTFENCE
public static final byte HARDFENCE
public static final byte SOFTWIRE
public static final byte HARDWIRE
public static final byte PATHPORT
public static final byte NODEPORT
public static final byte USERCONSTRAINT
public static final byte SPACER_ERROR
public static final byte CONTACT
public static final int PATH_ELEM_TYPE
public static final int BOUNDARY_ELEM_TYPE
public static final int TEXT_ELEM_TYPE
public static final int CONTACT_ELEM_TYPE
public static final int SREF_ELEM_TYPE
public static final int NODE_ELEM_TYPE
public static final int BOX_ELEM_TYPE
public static final int AREF_ELEM_TYPE
public static final int MAX_REC_LEN
protected byte[] data
protected byte dattype
protected com.ohrasys.cad.gds.GDSI18NFactory i18n
protected short length
protected byte rectype
| Constructor Detail |
|---|
public GDSRecord()
throws GDSRecordException
GDSRecordException - If there is an error creating the record
public GDSRecord(GDSRecord rec)
throws GDSRecordException
rec - The record to duplicate
GDSRecordException - If the record is malformed
public GDSRecord(short length,
byte rectype,
byte dattype,
byte[] data)
throws GDSRecordException
length - The total record lengthrectype - The record typedattype - The datatypedata - The record data
GDSRecordException - If any of the input parameters would create a
malformed record| Method Detail |
|---|
public byte[] getData()
public byte getDattype()
public short getLength()
public byte getRectype()
public byte[] toBytes()
public java.lang.String toString()
toString in class java.lang.Object
protected void validateBitarrayRec(byte rectype,
short validbits)
throws GDSRecordException
rectype - The expected record typevalidbits - A bit mask identifying valid bit positions by a '1'
GDSRecordException - Thrown if the record is invalid
protected void validateDoubleRec(byte rectype)
throws GDSRecordException
rectype - Expected record type
GDSRecordException - Thrown if the record is invalid
protected void validateDoubleRec(byte rectype,
int len)
throws GDSRecordException
rectype - Expected record typelen - Expected number of data bytes
GDSRecordException - Thrown if the record is invalid
protected void validateDoubleRec(byte rectype,
int maxlen,
int minlen)
throws GDSRecordException
rectype - Expected record typemaxlen - Max number of data bytesminlen - Min number of databytes
GDSRecordException - Thrown if the record is invalid
protected void validateFloatRec(byte rectype)
throws GDSRecordException
rectype - Expected record type
GDSRecordException - Thrown if the record is invalid
protected void validateFloatRec(byte rectype,
int len)
throws GDSRecordException
rectype - Expected record typelen - Expected number of data bytes
GDSRecordException - Thrown if the record is invalid
protected void validateFloatRec(byte rectype,
int maxlen,
int minlen)
throws GDSRecordException
rectype - Expected record typemaxlen - Max number of data bytesminlen - Min number of databytes
GDSRecordException - Thrown if the record is invalid
protected void validateIntRec(byte rectype)
throws GDSRecordException
rectype - Expected record type
GDSRecordException - Thrown if the record is invalid
protected void validateIntRec(byte rectype,
int len)
throws GDSRecordException
rectype - Expected record typelen - Expected number of data bytes
GDSRecordException - Thrown if the record is invalid
protected void validateIntRec(byte rectype,
int maxlen,
int minlen)
throws GDSRecordException
rectype - Expected record typemaxlen - Max number of data bytesminlen - Min number of databytes
GDSRecordException - Thrown if the record is invalid
protected void validateNodataRec(byte rectype)
throws GDSRecordException
rectype - Expected record type
GDSRecordException - Thrown if the record is invalid
protected void validateShortRec(byte rectype)
throws GDSRecordException
rectype - Expected record type
GDSRecordException - Thrown if the record is invalid
protected void validateShortRec(byte rectype,
int len)
throws GDSRecordException
rectype - Expected record typelen - Expected number of data bytes
GDSRecordException - Thrown if the record is invalid
protected void validateShortRec(byte rectype,
int maxlen,
int minlen)
throws GDSRecordException
rectype - Expected record typemaxlen - Max number of data bytesminlen - Min number of databytes
GDSRecordException - Thrown if the record is invalid
protected void validateStringRec(byte rectype,
int len)
throws GDSRecordException
rectype - Expected record typelen - Expected number of data bytes
GDSRecordException - Thrown if the record is invalid
protected void validateStringRec(byte rectype,
int maxlen,
int minlen)
throws GDSRecordException
rectype - Expected record typemaxlen - Max number of data bytesminlen - Min number of databytes
GDSRecordException - Thrown if the record is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||