Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / ast / ast_fixed.cpp
blobded0d58b581fffcd1bdd39aa11ac95fbe2d81d43
1 #include "ast_fixed.h"
3 #include "ast_visitor.h"
5 AST_Fixed::AST_Fixed (UTL_ScopedName *name,
6 AST_Expression *digits,
7 AST_Expression *scale)
8 : COMMON_Base (),
9 AST_Decl (AST_Decl::NT_fixed, name, true),
10 AST_Type (AST_Decl::NT_fixed, name),
11 AST_ConcreteType (AST_Decl::NT_fixed, name),
12 pd_digits (digits),
13 pd_scale (scale)
17 AST_Fixed::~AST_Fixed ()
21 void AST_Fixed::dump (ACE_OSTREAM_TYPE &os)
23 dump_i (os, "fixed<");
24 pd_digits->dump (os);
25 dump_i (os, ", ");
26 pd_scale->dump (os);
27 dump_i (os, ">");
30 void AST_Fixed::destroy ()
32 pd_digits->destroy ();
33 delete pd_digits;
34 pd_digits = 0;
36 pd_scale->destroy ();
37 delete pd_scale;
38 pd_scale = 0;
40 AST_ConcreteType::destroy ();
43 int AST_Fixed::ast_accept (ast_visitor *visitor)
45 return visitor->visit_fixed (this);
48 AST_Expression *AST_Fixed::digits ()
50 return pd_digits;
53 AST_Expression *AST_Fixed::scale ()
55 return pd_scale;
58 IMPL_NARROW_FROM_DECL(AST_Fixed)