Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_array.h
blob1d7e9dc64059e9253beff9347fdcd14bfa513de6
2 //=============================================================================
3 /**
4 * @file be_array.h
6 * Extension of class AST_Array that provides additional means for C++
7 * mapping.
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
14 #ifndef BE_ARRAY_H
15 #define BE_ARRAY_H
17 #include "be_type.h"
18 #include "ast_array.h"
20 class UTL_ExprList;
21 class TAO_OutStream;
22 class be_visitor;
24 class be_array : public virtual AST_Array,
25 public virtual be_type
27 public:
28 be_array (UTL_ScopedName *n,
29 unsigned long ndims,
30 UTL_ExprList *dims,
31 bool local,
32 bool abstract);
34 ~be_array (void);
36 /// Generate dimensions. If slice == 1, generate dimensions for the slice
37 /// definition.
38 int gen_dimensions (TAO_OutStream *os,
39 unsigned short slice = 0);
41 /// Overridden from class be_type.
42 virtual void gen_ostream_operator (TAO_OutStream *os,
43 bool use_underscore);
44 virtual void gen_member_ostream_operator (TAO_OutStream *os,
45 const char *instance_name,
46 bool use_underscore,
47 bool accessor);
49 // Visiting.
50 virtual int accept (be_visitor *visitor);
52 // Cleanup.
53 virtual void destroy (void);
55 // Narrowing.
57 DEF_NARROW_FROM_DECL (be_array);
59 protected:
60 /// Create a name for us.
61 virtual int create_name (void);
63 virtual void compute_tc_name (void);
66 #endif