Class: VirtualBox::COM::AbstractImplementer

Inherits:
Object
  • Object
show all
Defined in:
lib/virtualbox/com/abstract_implementer.rb

Overview

Base class for a COM interface implementer. Any child of this class is responsible for properly handling the various method and propery calls of a given AbstractInterface and making them do actual work.

This abstraction is necessary to change the behavior of calls between Windows (COM) and Unix (XPCOM), which have different calling conventions.

Direct Known Subclasses

Implementer::Base, Implementer::Nil

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (AbstractImplementer) initialize(interface, lib)

Initializes an implementer for the given VirtualBox::COM::AbstractInterface. The implementor's other methods, such as read_property or call_function are responsible for executing the said action on the interface.



19
20
21
22
# File 'lib/virtualbox/com/abstract_implementer.rb', line 19

def initialize(interface, lib)
  @interface = interface
  @lib = lib
end

Instance Attribute Details

- (Object) interface (readonly)

Returns the value of attribute interface



10
11
12
# File 'lib/virtualbox/com/abstract_implementer.rb', line 10

def interface
  @interface
end

- (Object) lib (readonly)

Returns the value of attribute lib



11
12
13
# File 'lib/virtualbox/com/abstract_implementer.rb', line 11

def lib
  @lib
end

Instance Method Details

- (Object) call_function(name, args, opts)

Calls a function on the interface.



41
42
# File 'lib/virtualbox/com/abstract_implementer.rb', line 41

def call_function(name, args, opts)
end

- (Object) read_property(name, opts)

Read a property of the interface.



27
28
# File 'lib/virtualbox/com/abstract_implementer.rb', line 27

def read_property(name, opts)
end

- (Object) write_property(name, value, opts)

Writes a property of the interface.



34
35
# File 'lib/virtualbox/com/abstract_implementer.rb', line 34

def write_property(name, value, opts)
end