Class: VirtualBox::COM::AbstractImplementer
- Inherits:
-
Object
- Object
- VirtualBox::COM::AbstractImplementer
- 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
Instance Attribute Summary collapse
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
-
#lib ⇒ Object
readonly
Returns the value of attribute lib.
Instance Method Summary collapse
-
#call_function(name, args, opts) ⇒ Object
Calls a function on the interface.
-
#initialize(interface, lib) ⇒ AbstractImplementer
constructor
Initializes an implementer for the given AbstractInterface.
-
#read_property(name, opts) ⇒ Object
Read a property of the interface.
-
#write_property(name, value, opts) ⇒ Object
Writes a property of the interface.
Constructor Details
#initialize(interface, lib) ⇒ AbstractImplementer
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
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
10 11 12 |
# File 'lib/virtualbox/com/abstract_implementer.rb', line 10 def interface @interface end |
#lib ⇒ Object (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
#call_function(name, args, opts) ⇒ Object
Calls a function on the interface.
41 42 |
# File 'lib/virtualbox/com/abstract_implementer.rb', line 41 def call_function(name, args, opts) end |
#read_property(name, opts) ⇒ Object
Read a property of the interface.
27 28 |
# File 'lib/virtualbox/com/abstract_implementer.rb', line 27 def read_property(name, opts) end |
#write_property(name, value, opts) ⇒ Object
Writes a property of the interface.
34 35 |
# File 'lib/virtualbox/com/abstract_implementer.rb', line 34 def write_property(name, value, opts) end |