Sha256: af3d0ee605f71bb14d568e92721755fb1df12f229942894c9311726cda81ec4a

Contents?: true

Size: 767 Bytes

Versions: 4

Compression:

Stored size: 767 Bytes

Contents

module WWMD
  class VSStubs::VSStringArray
    include VSStubHelpers

    attr_accessor :value

    def initialize()
      @value = []
    end

    def add(obj)
      @value << obj
    end

    def serialize
      stack = super
      stack << self.write_7bit_encoded_int(self.size)
      self.value.each do |v|
        stack << self.write_7bit_encoded_int(v.size)
        stack << v
      end
      return stack
    end

    def to_xml
      xml = super
      xml.add_attribute("size",self.value.size.to_s)
      self.value.each do |v|
        xml.add_element(VSStubs::VSString.new(v).to_xml)
      end
      xml
    end

    def from_xml
# serliazed with VSString (for convenience)
# make sure not to deserialize the opcode when you write this out
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
iZsh-wwmd-0.2.19 lib/wwmd/viewstate/vs_stubs/vs_string_array.rb
miketracy-wwmd-0.2.17 lib/wwmd/viewstate/vs_stubs/vs_string_array.rb
miketracy-wwmd-0.2.19 lib/wwmd/viewstate/vs_stubs/vs_string_array.rb
wwmd-0.2.20.3 lib/wwmd/viewstate/vs_stubs/vs_string_array.rb