Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / LocateRequest_Invocation_Adapter.h
blob25fac77b6de43231c098fce4eefd3feea686a3e1
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LocateRequest_Invocation_Adapter.h
7 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
8 */
9 //=============================================================================
10 #ifndef TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H
11 #define TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H
13 #include /**/ "ace/pre.h"
15 #include "tao/Policy_ForwardC.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/Pseudo_VarOut_T.h"
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 class ACE_Time_Value;
25 ACE_END_VERSIONED_NAMESPACE_DECL
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 namespace CORBA
31 class Object;
32 typedef Object *Object_ptr;
33 typedef TAO_Pseudo_Var_T<Object> Object_var;
36 class TAO_Stub;
38 namespace TAO
40 /**
41 * @class LocateRequest_Invocation_Adapter
43 * @brief Adapter class for locate request invocations.
45 * This class provides a look and feel similar to the
46 * TAO::Invocation_Adapter though the functionalities are
47 * different. For the record, IDL compiler doesn't know the
48 * existence of this class. This class is concerned with the
49 * creation and invocation of locate request invocations to the
50 * target object
52 * @todo Need to think what happens if the target is
53 * collocated. Looks like there are no ways to utilize the
54 * opportunity that may have been presented.
56 class LocateRequest_Invocation_Adapter
58 public:
59 LocateRequest_Invocation_Adapter (CORBA::Object_ptr target);
61 /// Start the invocation on the target
62 void invoke ();
64 /// Accessor to the inconsistent policy list
65 CORBA::PolicyList *get_inconsistent_policies ();
67 private:
68 bool get_timeout (ACE_Time_Value &val);
70 /// Helper method that takes care of setting the profiles within
71 /// the stub object if the target gets forwarded
72 void object_forwarded (CORBA::Object_var &effective_target,
73 TAO_Stub *stub,
74 CORBA::Boolean permanent_forward);
76 private:
77 CORBA::Object_ptr target_;
78 CORBA::PolicyList_var list_;
82 TAO_END_VERSIONED_NAMESPACE_DECL
84 #include /**/ "ace/post.h"
86 #endif /*TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H*/