summaryrefslogtreecommitdiff
path: root/TAO_IDL/be_include/be_visitor_attribute/attribute.h
blob: a18cd89c116fa8d2393567ad4331b682193526d3 (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
/* -*- c++ -*- */

//=============================================================================
/**
 *  @file    attribute.h
 *
 *  $Id$
 *
 *  Visitor for the Attribute class.
 *
 *
 *  @author Aniruddha Gokhale
 */
//=============================================================================


#ifndef _BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H
#define _BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H

// ************************************************************
// Attribute visitor
// ************************************************************

/**
 * @class be_visitor_attribute
 *
 * @brief be_visitor_attribute
 *
 * This is a concrete visitor to generate code for attributes. We have one
 * class for mapping into the client and server.
 */
class be_visitor_attribute : public be_visitor_decl
{
public:
  /// constructor
  be_visitor_attribute (be_visitor_context *ctx);

  /// destructor
  ~be_visitor_attribute (void);

  /// visit attribute. We provide code for this method in the derived class
  virtual int visit_attribute (be_attribute *node);

  void for_facets (bool val);
  void op_scope (be_decl *node);
  void exec_class_extension (const char *extension);

private:
  bool for_facets_;
  be_decl *op_scope_;
  
  /// Defaults to "exec_i" but in special cases we want to
  /// modify it.
  ACE_CString exec_class_extension_;
};

#endif /* _BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H*/