imr_locatorc.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 1,238 行 · 第 1/3 页

CPP
1,238
字号

void
ImplementationRepository::Locator::ImplementationRepository_Locator_setup_collocation (int collocated)
{
  if (collocated)
    {
      this->the_TAO_Locator_Proxy_Broker_ =
        ::ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->ImplementationRepository_Administration_setup_collocation (collocated);
}

ImplementationRepository::Locator::~Locator (void)
{}

void 
ImplementationRepository::Locator::_tao_any_destructor (void *_tao_void_pointer)
{
  Locator *_tao_tmp_pointer =
    ACE_static_cast (Locator *, _tao_void_pointer);
  CORBA::release (_tao_tmp_pointer);
}

ImplementationRepository::Locator_ptr
ImplementationRepository::Locator::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<Locator>::narrow (
        _tao_objref,
        "IDL:ImplementationRepository/Locator:1.0",
        ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

ImplementationRepository::Locator_ptr
ImplementationRepository::Locator::_duplicate (Locator_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
ImplementationRepository::Locator::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:ImplementationRepository/Administration:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:ImplementationRepository/Locator:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
          value
          ACE_ENV_ARG_PARAMETER
        );
    }
}

const char* ImplementationRepository::Locator::_interface_repository_id (void) const
{
  return "IDL:ImplementationRepository/Locator:1.0";
}

CORBA::Boolean
ImplementationRepository::Locator::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_typecode/typecode_defn.cpp:284

static const CORBA::Long _oc_ImplementationRepository_Locator[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  41,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x496d706c), 
  ACE_NTOHL (0x656d656e), 
  ACE_NTOHL (0x74617469), 
  ACE_NTOHL (0x6f6e5265), 
  ACE_NTOHL (0x706f7369), 
  ACE_NTOHL (0x746f7279), 
  ACE_NTOHL (0x2f4c6f63), 
  ACE_NTOHL (0x61746f72), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:ImplementationRepository/Locator:1.0
    8,
  ACE_NTOHL (0x4c6f6361), 
  ACE_NTOHL (0x746f7200),  // name = Locator
  };

static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Locator (
    CORBA::tk_objref,
    sizeof (_oc_ImplementationRepository_Locator),
    (char *) &_oc_ImplementationRepository_Locator,
    0,
    sizeof (ImplementationRepository::Locator)
  );

namespace ImplementationRepository
{
  ::CORBA::TypeCode_ptr _tc_Locator =
    &_tc_TAO_tc_ImplementationRepository_Locator;
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_interface/any_op_cs.cpp:50

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<ImplementationRepository::Locator>::to_object (
    CORBA::Object_ptr &_tao_elem
  ) const
{
  _tao_elem = CORBA::Object::_duplicate (this->value_);
  return 1;
}

// Copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    ImplementationRepository::Locator_ptr _tao_elem
  )
{
  ImplementationRepository::Locator_ptr _tao_objptr =
    ImplementationRepository::Locator::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

// Non-copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    ImplementationRepository::Locator_ptr *_tao_elem
  )
{
  TAO::Any_Impl_T<ImplementationRepository::Locator>::insert (
      _tao_any,
      ImplementationRepository::Locator::_tao_any_destructor,
      ImplementationRepository::_tc_Locator,
      *_tao_elem
    );
}

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    ImplementationRepository::Locator_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<ImplementationRepository::Locator>::extract (
        _tao_any,
        ImplementationRepository::Locator::_tao_any_destructor,
        ImplementationRepository::_tc_Locator,
        _tao_elem
      );
}

// TAO_IDL - Generated from 
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_sequence/any_op_cs.cpp:54

// Copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    const ImplementationRepository::Locator::ServerNameList &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<ImplementationRepository::Locator::ServerNameList>::insert_copy (
      _tao_any,
      ImplementationRepository::Locator::ServerNameList::_tao_any_destructor,
      ImplementationRepository::Locator::_tc_ServerNameList,
      _tao_elem
    );
}

// Non-copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    ImplementationRepository::Locator::ServerNameList *_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<ImplementationRepository::Locator::ServerNameList>::insert (
      _tao_any,
      ImplementationRepository::Locator::ServerNameList::_tao_any_destructor,
      ImplementationRepository::Locator::_tc_ServerNameList,
      _tao_elem
    );
}

// Extraction to non-const pointer (deprecated).
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    ImplementationRepository::Locator::ServerNameList *&_tao_elem
  )
{
  return _tao_any >>= ACE_const_cast (
      const ImplementationRepository::Locator::ServerNameList *&,
      _tao_elem
    );
}

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const ImplementationRepository::Locator::ServerNameList *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<ImplementationRepository::Locator::ServerNameList>::extract (
        _tao_any,
        ImplementationRepository::Locator::ServerNameList::_tao_any_destructor,
        ImplementationRepository::Locator::_tc_ServerNameList,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_sequence/cdr_op_cs.cpp:95

#if !defined _TAO_CDR_OP_ImplementationRepository_Locator_ServerNameList_CPP_
#define _TAO_CDR_OP_ImplementationRepository_Locator_ServerNameList_CPP_

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const ImplementationRepository::Locator::ServerNameList &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len = _tao_sequence.length ();
  
  if (strm << _tao_seq_len)
    {
      // Encode all elements.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm << _tao_sequence[i].in ());
        }
      
      return _tao_marshal_flag;
    }
  
  return 0;
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    ImplementationRepository::Locator::ServerNameList &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len;
  
  if (strm >> _tao_seq_len)
    {
      // Add a check to the length of the sequence
      // to make sure it does not exceed the length
      // of the stream. (See bug 58.)
      if (_tao_seq_len > strm.length ())
        {
          return 0;
        }
      
      // Set the length of the sequence.
      _tao_sequence.length (_tao_seq_len);
      
      // If length is 0 we return true.
      if (0 >= _tao_seq_len) 
        {
          return 1;
        }
      
      // Retrieve all the elements.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm >> _tao_sequence[i].out ());
        
      }
    
    return _tao_marshal_flag;
  
  }

return 0;
}

#endif /* _TAO_CDR_OP_ImplementationRepository_Locator_ServerNameList_CPP_ */

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_interface/cdr_op_cs.cpp:63

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const ImplementationRepository::Locator_ptr _tao_objref
  )
{
  CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    ImplementationRepository::Locator_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::ImplementationRepository::Locator RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function_pointer
      );
    
  return 1;
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_root/root.cpp:1725

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)

  template class
    TAO::Objref_Traits<
        ImplementationRepository::Locator
      >;

  template class
    TAO_Objref_Var_T<
        ImplementationRepository::Locator
      >;
  
  template class
    TAO_Objref_Out_T<
        ImplementationRepository::Locator
      >;

  template class
    TAO::Narrow_Utils<
        ImplementationRepository::Locator
      >;

  template class
    TAO::Any_Impl_T<
        ImplementationRepository::Locator
      >;

#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)

# pragma instantiate \
    TAO::Objref_Traits< \
        ImplementationRepository::Locator \
      >

# pragma instantiate \
    TAO_Objref_Var_T< \
        ImplementationRepository::Locator
      >
  
# pragma instantiate \
    TAO_Objref_Out_T< \
        ImplementationRepository::Locator
      >

# pragma instantiate \
    TAO::Narrow_Utils< \
        ImplementationRepository::Locator \
      >

# pragma instantiate \
    TAO::Any_Impl_T< \
        ImplementationRepository::Locator \
      >

#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?