summaryrefslogtreecommitdiff
path: root/modules/TAO/TAO_IDL/be_include/be_visitor_component/context_svs.h
blob: 4b5e2c7b807c7f7404ff76d050f1763857050787 (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
//
// $Id$
//
/* -*- c++ -*- */
// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    context_svs.h
//
// = DESCRIPTION
//    Concrete visitor for the Component node.
//    This provides for code generation for the Context
//    class definition
//
// = AUTHOR
//    Jeff Parsons
//
// ============================================================================

#ifndef _BE_COMPONENT_CONTEXT_SVS_H_
#define _BE_COMPONENT_CONTEXT_SVS_H_

class be_visitor_context_svs : public be_visitor_component_scope
{
  //
  // = TITLE
  //   be_visitor_context_svs
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate the context class defn
  //   for a component.
  //
  //
public:
  be_visitor_context_svs (be_visitor_context *ctx);
  
  ~be_visitor_context_svs (void);
  
  virtual int visit_component (be_component *node);
  virtual int visit_uses (be_uses *node);
  virtual int visit_publishes (be_publishes *node);
  virtual int visit_emits (be_emits *node);
  virtual int visit_extended_port (be_extended_port *node);
  virtual int visit_mirror_port (be_mirror_port *node);
  
private:
  void gen_uses_simplex (AST_Type *obj,
                         const char *port_name);       
  void gen_uses_multiplex (AST_Type *obj,
                           const char *port_name);
};

// ======================================================

class be_visitor_swapping_get_consumer
  : public be_visitor_component_scope
{
  //
  // = TITLE
  //   be_visitor_swapping_get_comsumer
  //
  // = DESCRIPTION
  //   This is a concrete visitor to generate a block of code
  //   for each publishes port, including inherited ports.
  //
  //
public:
  be_visitor_swapping_get_consumer (be_visitor_context *ctx);
  
  ~be_visitor_swapping_get_consumer (void);
  
  virtual int visit_publishes (be_publishes *node);
};

#endif /* _BE_COMPONENT_CONTEXT_SVS_H_ */