Module: Qpid::Proton::Util::SwigHelper
- Included in:
- Connection, Delivery, Disposition, Link, Reactor::Reactor, Receiver, SSL, Selectable, Session, Terminus, Transport
- Defined in:
- lib/util/swig_helper.rb
Overview
Provides helper functions for writing wrapper functions for the underlying C APIs.
Before defining any mutators the class must define the name of the prefix for methods with the constant PROTON_METOD_PREFIX.
Mutators, Setters And Getters
There are three types of wrappers that are supported:
- proton_writer
-
Defines a set-only method for the named attribute.
- proton_reader
-
Defines a get-only method for the named attribute.
- proton_accessor
-
Defines both a set- and a get-method for the named
attribute.
- proton_caller
-
A simple wrapper for calling an underlying method,
avoids repetitive boiler plate coding.
Arguments
- :is_or_get => :get
-
For both the getter and the mutator types
you can also declare that the method uses “is” instead of “get” in the underlying API. Such methods are then defined with “?”
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
66 67 68 |
# File 'lib/util/swig_helper.rb', line 66 def self.included(base) base.extend ClassMethods end |