Class: Mapi::Pst::ID2Assoc64
- Inherits:
-
Struct
- Object
- Struct
- Mapi::Pst::ID2Assoc64
- Defined in:
- lib/mapi/pst.rb
Constant Summary collapse
- UNPACK_STR =
'VVT2'
- SIZE =
24
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#id2 ⇒ Object
Returns the value of attribute id2.
-
#table2 ⇒ Object
Returns the value of attribute table2.
-
#u1 ⇒ Object
Returns the value of attribute u1.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ ID2Assoc64
constructor
A new instance of ID2Assoc64.
Constructor Details
#initialize(data) ⇒ ID2Assoc64
Returns a new instance of ID2Assoc64.
800 801 802 803 804 805 |
# File 'lib/mapi/pst.rb', line 800 def initialize data if String === data data = Pst.unpack data, UNPACK_STR end super(*data) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
796 797 798 |
# File 'lib/mapi/pst.rb', line 796 def id @id end |
#id2 ⇒ Object
Returns the value of attribute id2
796 797 798 |
# File 'lib/mapi/pst.rb', line 796 def id2 @id2 end |
#table2 ⇒ Object
Returns the value of attribute table2
796 797 798 |
# File 'lib/mapi/pst.rb', line 796 def table2 @table2 end |
#u1 ⇒ Object
Returns the value of attribute u1
796 797 798 |
# File 'lib/mapi/pst.rb', line 796 def u1 @u1 end |
Class Method Details
.load_chain(idx) ⇒ Object
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/mapi/pst.rb', line 807 def self.load_chain idx buf = idx.read type, count = buf.unpack 'v2' unless type == 0x0002 raise 'unknown id2 type 0x%04x' % type #return end id2 = [] count.times do |i| assoc = new buf[8 + SIZE * i, SIZE] id2 << assoc if assoc.table2 != 0 id2 += load_chain idx.pst.idx_from_id(assoc.table2) end end id2 end |