summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Sender_comp/src/Shapes_Sender_comp_exec.h
blob: 98a2fdc55249bb8686c2e064331dba5c8f5a9778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// -*- C++ -*-
/**
 * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.1
 * TAO and the TAO IDL Compiler have been developed by:
 *       Center for Distributed Object Computing
 *       Washington University
 *       St. Louis, MO
 *       USA
 *       http://www.cs.wustl.edu/~schmidt/doc-center.html
 * and
 *       Distributed Object Computing Laboratory
 *       University of California at Irvine
 *       Irvine, CA
 *       USA
 * and
 *       Institute for Software Integrated Systems
 *       Vanderbilt University
 *       Nashville, TN
 *       USA
 *       http://www.isis.vanderbilt.edu/
 *
 * Information about TAO is available at:
 *     http://www.dre.vanderbilt.edu/~schmidt/TAO.html
 **/
#ifndef CIAO_SHAPES_SENDER_COMP_EXEC_IEMJ0O_H_
#define CIAO_SHAPES_SENDER_COMP_EXEC_IEMJ0O_H_

#include /**/ "ace/pre.h"

#include "Shapes_Sender_compEC.h"

#include /**/ "Shapes_Sender_comp_exec_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/LocalObject.h"

/// Namespace for implementation of Shapes::Sender_comp component
namespace CIAO_Shapes_Sender_comp_Impl
{
  class Sender_comp_exec_i;

  ///  Executor implementation class for control facet
  class SHAPES_SENDER_COMP_EXEC_Export control_exec_i
    : public virtual ::Shapes::CCM_Control_obj,
      public virtual ::CORBA::LocalObject
  {
  public:
    /// Constructor
    /// @param[in] ctx - Container context
    control_exec_i (
      ::Shapes::CCM_Sender_comp_Context_ptr ctx,
       Sender_comp_exec_i &callback);
    /// Destructor
    virtual ~control_exec_i (void);

    /** @name Operations and attributes from Shapes::Control_obj */
    //@{

    virtual
    ::Shapes::ReturnStatus setSize (
      ::CORBA::UShort size);

    virtual
    ::Shapes::ReturnStatus setLocation (
      ::CORBA::UShort x,
      ::CORBA::UShort y);
    //@}

  private:
    /// Context for component instance. Used for all middleware communication.
    ::Shapes::CCM_Sender_comp_Context_var ciao_context_;
    Sender_comp_exec_i &callback_;
  };

  /// Component Executor Implementation Class: Sender_comp_exec_i
  class SHAPES_SENDER_COMP_EXEC_Export Sender_comp_exec_i
    : public virtual Sender_comp_Exec,
      public virtual ::CORBA::LocalObject
  {
  public:
    /// Constructor
    Sender_comp_exec_i (void);
    /// Destructor
    virtual ~Sender_comp_exec_i (void);

    /** @name Supported operations and attributes. */
    //@{

    //@}

    /** @name Component attributes and port operations. */
    //@{

    /// Factory method and getter for control facet
    /// @return existing instance of facet if one exists, else creates one
    virtual ::Shapes::CCM_Control_obj_ptr
    get_control (void);
    //@}

    /** @name Session component operations */
    //@{

    /// Setter for container context for this component
    /// @param[in] ctx - Container context
    virtual void set_session_context (::Components::SessionContext_ptr ctx);

    /// Component state change method to configuration_complete state
    virtual void configuration_complete (void);

    /// Component state change method to activated state
    virtual void ccm_activate (void);

    /// Component state change method to passivated state
    virtual void ccm_passivate (void);

    /// Component state change method to removed state
    virtual void ccm_remove (void);
    //@}

    /** @name User defined public operations. */
    //@{
    ::Shapes::ReturnStatus setSize (::CORBA::UShort size);

    ::Shapes::ReturnStatus setLocation (::CORBA::UShort x,
                                         ::CORBA::UShort y);
    //@}

  private:
    /// Context for component instance. Used for all middleware communication
    ::Shapes::CCM_Sender_comp_Context_var ciao_context_;

    /** @name Component attributes. */
    //@{
    //@}

    /** @name Component facets. */
    //@{

    /// Object reference to control facet
    ::Shapes::CCM_Control_obj_var ciao_control_;
    //@}

    /** @name User defined members. */
    //@{
    ::DDS::InstanceHandle_t instance_handle_;
     ShapeType square_;

    //@}

    /** @name User defined private operations. */
    //@{
     ::Shapes::ReturnStatus update_square (void);

    //@}

  };

  /// Factory method and library entry point used by the middleware
  /// @return new component instance
  extern "C"  SHAPES_SENDER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_Shapes_Sender_comp_Impl (void);
}

#include /**/ "ace/post.h"
#endif /* ifndef */