Module: R2CORBA::CORBA

Defined in:
lib/corba/idl/IDL.rb,
lib/corba/cbase/ORB.rb,
lib/corba/jbase/Any.rb,
lib/corba/jbase/ORB.rb,
lib/corba/cbase/Stub.rb,
lib/corba/common/Any.rb,
lib/corba/common/IDL.rb,
lib/corba/common/ORB.rb,
lib/corba/jbase/Stub.rb,
lib/corba/common/Stub.rb,
lib/corba/cbase/Values.rb,
lib/corba/common/Union.rb,
lib/corba/common/const.rb,
lib/corba/jbase/Object.rb,
lib/corba/jbase/Values.rb,
lib/corba/cbase/Request.rb,
lib/corba/cbase/Streams.rb,
lib/corba/common/Object.rb,
lib/corba/common/Struct.rb,
lib/corba/common/Values.rb,
lib/corba/jbase/Request.rb,
lib/corba/jbase/Streams.rb,
lib/corba/jbase/require.rb,
lib/corba/cbase/Typecode.rb,
lib/corba/cbase/policies.rb,
lib/corba/common/Request.rb,
lib/corba/jbase/Typecode.rb,
lib/corba/jbase/policies.rb,
lib/corba/cbase/exception.rb,
lib/corba/common/Typecode.rb,
lib/corba/jbase/exception.rb,
lib/corba/common/exception.rb,
lib/corba/jbase/ServerRequest.rb

Defined Under Namespace

Modules: AbstractBase, AbstractValueBase, IDL, Native, ORB, Object, Policy, PolicyManager, Portable, Request, ServerRequest, Stub, ValueBase Classes: Any, Exception, InternalError, LongDouble, SystemException, TypeCode, UserException, ValueFactory

Constant Summary collapse

ENDIAN =
("Ruby".unpack("i")[0] == 2036495698)? LTL_ENDIAN: BIG_ENDIAN
ARG_IN =
1
ARG_OUT =
2
ARG_INOUT =
3
VM_NONE =

Portable

0
VM_CUSTOM =
1
VM_ABSTRACT =
2
VM_TRUNCATABLE =
3
VT_MODIFIERS =
{
  :none => VM_NONE,
  :abstract => VM_ABSTRACT,
  :truncatable => VM_TRUNCATABLE,
  :custom => VM_CUSTOM
}.freeze
PRIVATE_MEMBER =
0
PUBLIC_MEMBER =
1
COMPLETED_TXT =
["YES", "NO", "MAYBE"].freeze

Class Method Summary collapse

Class Method Details

._tc_CCHomeObject



1100
1101
1102
# File 'lib/corba/common/Typecode.rb', line 1100

def CORBA._tc_CCHome
  @@tc_CCHome ||= TypeCode::Home.new("IDL:omg.org/CORBA/CCHome:1.0", "CCHome", CORBA::Object).freeze
end

._tc_CCMObjectObject



1096
1097
1098
# File 'lib/corba/common/Typecode.rb', line 1096

def CORBA._tc_CCMObject
  @@tc_CCMObject ||= TypeCode::Component.new("IDL:omg.org/CORBA/CCMObject:1.0", "CCMObject", CORBA::Object).freeze
end

._tc_CompletionStatusObject

define system exception related typecode constants



1106
1107
1108
1109
# File 'lib/corba/common/Typecode.rb', line 1106

def CORBA._tc_CompletionStatus
  @@tc_CompletionStatus ||= TypeCode::Enum.new("IDL:omg.org/CORBA/CompletionStatus:1.0", "CompletionStatus",
                                               CORBA::COMPLETED_TXT.collect {|t| "COMPLETED_#{t}"})
end

._tc_ObjectObject



1092
1093
1094
# File 'lib/corba/common/Typecode.rb', line 1092

def CORBA._tc_Object
  @@tc_Object ||= TypeCode.get_primitive_tc(CORBA::TK_OBJREF)
end

._tc_PrincipalObject



1088
1089
1090
# File 'lib/corba/common/Typecode.rb', line 1088

def CORBA._tc_Principal
  @@tc_Principal ||= TypeCode.get_primitive_tc(CORBA::TK_PRINCIPAL)
end

._tc_stringObject



1074
1075
1076
# File 'lib/corba/common/Typecode.rb', line 1074

def CORBA._tc_string
  @@tc_string ||= TypeCode::String.new()
end

._tc_TypeCodeObject

define special typecode constants



1084
1085
1086
# File 'lib/corba/common/Typecode.rb', line 1084

def CORBA._tc_TypeCode
  @@tc_TypeCode ||= TypeCode.get_primitive_tc(CORBA::TK_TYPECODE)
end

._tc_wstringObject



1078
1079
1080
# File 'lib/corba/common/Typecode.rb', line 1078

def CORBA._tc_wstring
  @@tc_wstring ||= TypeCode::WString.new()
end

.define_system_exception(name) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/corba/common/exception.rb', line 38

def CORBA.define_system_exception(name)
  self.module_eval %Q^
    class #{name} < SystemException
      public_class_method :new
      def initialize(*args)
        super(*args)
      end
      Id = "IDL:omg.org/CORBA/#{name}:1.0"
      Name = "#{name}"
      def self._tc
        @@tc_ ||= TypeCode::SysExcept.new(self::Id, self::Name)
      end
    end
  ^
end

.implement(idlfile, params = {}, genbits = IDL::CLIENT_STUB, &block) ⇒ Object



16
17
18
# File 'lib/corba/idl/IDL.rb', line 16

def CORBA.implement(idlfile, params={}, genbits = IDL::CLIENT_STUB, &block)
  IDL.implement(idlfile, params, genbits, &block)
end

.is_nil(obj) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/corba/common/Object.rb', line 16

def CORBA.is_nil(obj)
  if obj.nil?
    return true
  elsif obj.is_a?(R2CORBA::CORBA::Object) || obj.respond_to?(:_is_nil?)
    return obj._is_nil?()
  end
  false
end

.ORB_init(*args) ⇒ Object



17
18
19
20
21
# File 'lib/corba/common/ORB.rb', line 17

def CORBA.ORB_init(*args)
  # actual CORBA wrapper implementation implements
  # the ORB.init method
  self::ORB.init(*args)
end