Class: Ice::Current

Inherits:
Object
  • Object
show all
Defined in:
lib/Ice/Current.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(adapter = nil, con = nil, id = ::Ice::Identity.new, facet = '', operation = '', mode = ::Ice::OperationMode::Normal, ctx = nil, requestId = 0, encoding = ::Ice::EncodingVersion.new) ⇒ Current

Returns a new instance of Current.



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/Ice/Current.rb', line 90

def initialize(adapter=nil, con=nil, id=::Ice::Identity.new, facet='', operation='', mode=::Ice::OperationMode::Normal, ctx=nil, requestId=0, encoding=::Ice::EncodingVersion.new)
    @adapter = adapter
    @con = con
    @id = id
    @facet = facet
    @operation = operation
    @mode = mode
    @ctx = ctx
    @requestId = requestId
    @encoding = encoding
end

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def adapter
  @adapter
end

#conObject

Returns the value of attribute con.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def con
  @con
end

#ctxObject

Returns the value of attribute ctx.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def ctx
  @ctx
end

#encodingObject

Returns the value of attribute encoding.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def encoding
  @encoding
end

#facetObject

Returns the value of attribute facet.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def facet
  @facet
end

#idObject

Returns the value of attribute id.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def id
  @id
end

#modeObject

Returns the value of attribute mode.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def mode
  @mode
end

#operationObject

Returns the value of attribute operation.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def operation
  @operation
end

#requestIdObject

Returns the value of attribute requestId.



138
139
140
# File 'lib/Ice/Current.rb', line 138

def requestId
  @requestId
end

Instance Method Details

#==(other) ⇒ Object



116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/Ice/Current.rb', line 116

def ==(other)
    return false if !other.is_a? ::Ice::Current or
        @adapter != other.adapter or
        @con != other.con or
        @id != other.id or
        @facet != other.facet or
        @operation != other.operation or
        @mode != other.mode or
        @ctx != other.ctx or
        @requestId != other.requestId or
        @encoding != other.encoding
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/Ice/Current.rb', line 130

def eql?(other)
    return other.class == self.class && other == self
end

#hashObject



102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/Ice/Current.rb', line 102

def hash
    _h = 0
    _h = 5 * _h + @adapter.hash
    _h = 5 * _h + @con.hash
    _h = 5 * _h + @id.hash
    _h = 5 * _h + @facet.hash
    _h = 5 * _h + @operation.hash
    _h = 5 * _h + @mode.hash
    _h = 5 * _h + @ctx.hash
    _h = 5 * _h + @requestId.hash
    _h = 5 * _h + @encoding.hash
    _h % 0x7fffffff
end

#inspectObject



134
135
136
# File 'lib/Ice/Current.rb', line 134

def inspect
    ::Ice::__stringify(self, T_Current)
end