Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PolicyFactory / IORInterceptor.h
blob8645f7923fdd81a705bbb44c9e5682b5f300a155
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file IORInterceptor.h
7 * Implementation header for the IOR test interceptor.
9 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
11 //=============================================================================
13 #ifndef IOR_INTERCEPTOR_H
14 #define IOR_INTERCEPTOR_H
16 #include "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/IORInterceptor/IORInterceptor.h"
23 #include "tao/PortableInterceptorC.h"
24 #include "tao/LocalObject.h"
26 #if defined(_MSC_VER)
27 #pragma warning(push)
28 #pragma warning(disable:4250)
29 #endif /* _MSC_VER */
31 /**
32 * @class IORInterceptor
34 * @brief Simple concrete IOR interceptor.
36 * This is a test IOR interceptor that embeds a tagged component in an
37 * IOR. That tagged component will then be verified on the client
38 * side to ensure that IOR interceptor support is functioning
39 * properly.
41 class IORInterceptor
42 : public virtual PortableInterceptor::IORInterceptor,
43 public virtual ::CORBA::LocalObject
45 public:
47 /// Constructor
48 IORInterceptor (void);
50 /**
51 * @name Methods Required by the IOR Interceptor Interface
53 * These are methods that must be implemented since they are pure
54 * virtual in the abstract base class. They are the canonical
55 * methods required for all IOR interceptors.
57 //@{
58 /// Return the name of this IORInterceptor.
59 virtual char * name (void);
61 /// Cleanup resources acquired by this IORInterceptor.
62 virtual void destroy (void);
64 /// Add the tagged components to the IOR.
65 virtual void establish_components (
66 PortableInterceptor::IORInfo_ptr info);
67 //@}
69 protected:
71 /// Destructor.
72 /**
73 * Protected destructor to enforce proper memory management through
74 * the reference counting mechanism.
76 ~IORInterceptor (void);
78 private:
80 /// IORInterceptor successfully called and executed.
81 bool success_;
85 #if defined(_MSC_VER)
86 #pragma warning(pop)
87 #endif /* _MSC_VER */
89 #endif /* IOR_INTERCEPTOR_H */