Class: WWMD::VSStubs::VSIntEnum

Inherits:
Object
  • Object
show all
Includes:
WWMD::VSStubHelpers
Defined in:
lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WWMD::VSStubHelpers

#opcode, #size, #to_sym

Methods included from WWMD::ViewStateUtils

#deserialize_type, #dlog, #magic?, #next_type, #offset, #putd, #read, #read_7bit_encoded_int, #read_double, #read_int, #read_int32, #read_raw_byte, #read_short, #read_string, #serialize_type, #slog, #throw, #write_7bit_encoded_int, #write_double, #write_int, #write_int32, #write_short

Constructor Details

#initialize(typeref, typeval, index) ⇒ VSIntEnum

Returns a new instance of VSIntEnum.



9
10
11
12
13
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 9

def initialize(typeref,typeval,index)
  @typeref = typeref
  @typeval = typeval
  @value = index
end

Instance Attribute Details

#typerefObject (readonly)

Returns the value of attribute typeref.



6
7
8
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 6

def typeref
  @typeref
end

#typevalObject (readonly)

Returns the value of attribute typeval.



7
8
9
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 7

def typeval
  @typeval
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 5

def value
  @value
end

Instance Method Details

#serializeObject



15
16
17
18
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 15

def serialize
  stack = super
  stack << self.write_7bit_encoded_int(self.value)
end

#to_xmlObject



20
21
22
23
24
# File 'lib/wwmd/viewstate/vs_stubs/vs_int_enum.rb', line 20

def to_xml
  xml = super
  xml.add_text(self.value.to_s)
  xml
end