OpenDDS  Snapshot(2023/04/28-20:55)
LocalObject.cpp
Go to the documentation of this file.
1 #define TAOLIB_ERROR ACELIB_ERROR
2 #define TAOLIB_DEBUG ACELIB_DEBUG
3 
4 #include "tao/LocalObject.h"
5 
6 #if !defined (__ACE_INLINE__)
7 # include "tao/LocalObject.inl"
8 #endif /* ! __ACE_INLINE__ */
9 
10 #include "tao/SystemException.h"
11 #include "tao/debug.h"
12 #include "tao/ORB_Constants.h"
13 
14 #include "ace/Log_Msg.h"
15 #include "ace/Guard_T.h"
16 
18 
20 {
21 }
22 
23 // Quickly hash an object reference's representation data. Used to
24 // create hash tables.
25 
28 {
29  // Note that we reinterpret_cast to an "ptrdiff_t" instead of
30  // CORBA::ULong since we need to first cast to an integer large
31  // enough to hold an address to avoid compile-time warnings on some
32  // 64-bit platforms.
33 
34  CORBA::ULong const hash =
35  static_cast<CORBA::ULong> (reinterpret_cast<ptrdiff_t> (this));
36 
37  return hash % maximum;
38 }
39 
40 // Compare two object references to see if they point to the same
41 // object. Used in linear searches, as in hash buckets.
42 //
43 // XXX would be useful to also have a trivalued comparison predicate,
44 // such as strcmp(), to allow more comparison algorithms.
45 
48 {
49  return other_obj == this;
50 }
51 
52 // TAO's extensions
53 
54 
57 {
58  throw ::CORBA::NO_IMPLEMENT();
59 }
60 
61 #if (TAO_HAS_MINIMUM_CORBA == 0)
62 
63 // NON_EXISTENT ... send a simple call to the object, which will
64 // either elicit a FALSE response or a OBJECT_NOT_EXIST exception. In
65 // the latter case, return FALSE.
66 
69 {
70  return false;
71 }
72 
73 char *
75 {
76  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
77 }
78 
79 #if ! defined (CORBA_E_COMPACT) && ! defined (CORBA_E_MICRO)
80 void
82  const char *,
87 {
88  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
89 }
90 
91 void
93  const char *,
100 {
101  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
102 }
103 
105 CORBA::LocalObject::_request (const char *)
106 {
107  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
108 }
109 
112 {
113  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
114 }
115 
118 {
119  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
120 }
121 #endif
122 
123 #endif /* TAO_HAS_MINIMUM_CORBA */
124 
125 #if (TAO_HAS_CORBA_MESSAGING == 1)
126 
129 {
130  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
131 }
132 
135 {
136  throw ::CORBA::NO_IMPLEMENT ();
137 }
138 
142 {
143  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
144 }
145 
148 {
149  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
150 }
151 
153 CORBA::LocalObject::_validate_connection (CORBA::PolicyList_out)
154 {
155  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
156 }
157 
158 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
159 
162 {
163  throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
164 }
165 
virtual CORBA::InterfaceDef_ptr _get_interface(void)
#define TAO_BEGIN_VERSIONED_NAMESPACE_DECL
const ULong OMGVMCID
CORBA::Policy_ptr _get_policy(CORBA::PolicyType type)
int hash(const std::vector< const DDS::OctetSeq *> &src, DDS::OctetSeq &dst)
virtual ~LocalObject(void)
Definition: LocalObject.cpp:19
InterfaceDef * InterfaceDef_ptr
sequence< PolicyType > PolicyTypeSeq
virtual char * _repository_id(void)
Definition: LocalObject.cpp:74
CORBA::Boolean _validate_connection(CORBA::PolicyList_out inconsistent_policies)
CORBA::ULong PolicyType
ULong Flags
virtual CORBA::Request_ptr _request(const char *operation)
virtual CORBA::ORB_ptr _get_orb(void)
CORBA::PolicyList * _get_policy_overrides(const CORBA::PolicyTypeSeq &types)
virtual void _create_request(CORBA::Context_ptr ctx, const char *operation, CORBA::NVList_ptr arg_list, CORBA::NamedValue_ptr result, CORBA::Request_ptr &request, CORBA::Flags req_flags)
Definition: LocalObject.cpp:81
ACE_CDR::ULong ULong
ACE_CDR::Boolean Boolean
TAO_Cached_Policy_Type
virtual CORBA::Boolean _non_existent(void)
Definition: LocalObject.cpp:68
virtual CORBA::ULong _hash(CORBA::ULong maximum)
Definition: LocalObject.cpp:27
sequence< Policy > PolicyList
virtual CORBA::Object_ptr _get_component(void)
CORBA::Policy_ptr _get_cached_policy(TAO_Cached_Policy_Type type)
SetOverrideType
virtual TAO::ObjectKey * _key(void)
Definition: LocalObject.cpp:56
virtual CORBA::Boolean _is_equivalent(CORBA::Object_ptr other_obj)
Definition: LocalObject.cpp:47
#define TAO_END_VERSIONED_NAMESPACE_DECL
CORBA::Object_ptr _set_policy_overrides(const CORBA::PolicyList &policies, CORBA::SetOverrideType set_add)