Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Protocol_Factory.h
blob2a74074622af47bc535b43e2c769aaccca986e08
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Protocol_Factory.h
7 * @author Fred Kuhns <fredk@cs.wustl.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_PROTOCOL_FACTORY_H
12 #define TAO_PROTOCOL_FACTORY_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Basic_Types.h"
24 #include "ace/Service_Object.h"
25 #include "ace/SStringfwd.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 class TAO_Acceptor;
30 class TAO_Connector;
32 class TAO_Export TAO_Protocol_Factory : public ACE_Service_Object
34 public:
35 TAO_Protocol_Factory (CORBA::ULong tag);
36 virtual ~TAO_Protocol_Factory ();
38 /// Initialization hook.
39 virtual int init (int argc, ACE_TCHAR *argv[]) = 0;
41 /// The protocol tag, each concrete class will have a specific tag
42 /// value.
43 CORBA::ULong tag () const;
45 /// Verify prefix is a match
46 virtual int match_prefix (const ACE_CString &prefix) = 0;
48 /// Returns the prefix used by the protocol.
49 virtual const char *prefix () const = 0;
51 /// Return the character used to mark where an endpoint ends and
52 /// where its options begin.
53 virtual char options_delimiter () const = 0;
55 // Factory methods
56 /// Create an acceptor
57 virtual TAO_Acceptor *make_acceptor () = 0;
59 /// Create a connector
60 virtual TAO_Connector *make_connector () = 0;
62 /**
63 * Some protocols should not create a default endpoint unless the
64 * user specifies a -ORBEndpoint option. For example, local IPC
65 * (aka UNIX domain sockets) is unable to remove the rendezvous
66 * point if the server crashes. For those protocols it is better to
67 * create the endpoint only if the user requests one.
69 virtual int requires_explicit_endpoint () const = 0;
71 private:
72 /// IOP protocol tag.
73 CORBA::ULong const tag_;
76 TAO_END_VERSIONED_NAMESPACE_DECL
78 #include /**/ "ace/post.h"
80 #endif /* TAO_PROTOCOL_FACTORY_H */