Class TCOffsets


  • public class TCOffsets
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int offset  
      private java.util.Hashtable<java.lang.String,​java.lang.Integer> tcs  
    • Constructor Summary

      Constructors 
      Constructor Description
      TCOffsets()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int alignStrLen​(java.lang.String string)
      Return the full length of the string type: 4 byte length, x bytes for string + 1 for the null terminator, align it so it ends on a 4-byte boundary.
      void bumpCurrentOffset​(int value)  
      int currentOffset()  
      int offset​(java.lang.String name)
      Return -1 if the given name is not in the list of types.
      void set​(SymtabEntry entry)  
      void setMember​(SymtabEntry entry)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tcs

        private java.util.Hashtable<java.lang.String,​java.lang.Integer> tcs
      • offset

        private int offset
    • Constructor Detail

      • TCOffsets

        public TCOffsets()
    • Method Detail

      • offset

        public int offset​(java.lang.String name)
        Return -1 if the given name is not in the list of types.
      • alignStrLen

        public int alignStrLen​(java.lang.String string)
        Return the full length of the string type: 4 byte length, x bytes for string + 1 for the null terminator, align it so it ends on a 4-byte boundary. This method assumes the string starts at a 4-byte boundary since it doesn't do any leading alignment.
      • setMember

        public void setMember​(SymtabEntry entry)
      • currentOffset

        public int currentOffset()
      • bumpCurrentOffset

        public void bumpCurrentOffset​(int value)