summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_root.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-23 17:00:00 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-23 17:00:00 +0000
commit287fa6d8b442a118650877c5b43b7802d2f99305 (patch)
tree8de6116f35ab63cabe7b93310e4e1afcf26bbc31 /TAO/TAO_IDL/be/be_root.cpp
parentbf12751e22e5d8bc31091b25ccbc4a9c5b1c71a6 (diff)
downloadATCD-287fa6d8b442a118650877c5b43b7802d2f99305.tar.gz
ChangeLogTag: Wed Aug 23 11:53:43 2000 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_root.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_root.cpp60
1 files changed, 34 insertions, 26 deletions
diff --git a/TAO/TAO_IDL/be/be_root.cpp b/TAO/TAO_IDL/be/be_root.cpp
index 43aa5ffa9ca..626f13ebdf3 100644
--- a/TAO/TAO_IDL/be/be_root.cpp
+++ b/TAO/TAO_IDL/be/be_root.cpp
@@ -25,73 +25,81 @@
ACE_RCSID(be, be_root, "$Id$")
-// Default Constructor
+// Default Constructor.
be_root::be_root (void)
{
}
-// Constructor used to build the root of the abstract syntax tree (AST)
-be_root::be_root (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Root (n, p),
- AST_Decl (AST_Decl::NT_root, n, p),
+// Constructor used to build the root of the abstract syntax tree (AST).
+be_root::be_root (UTL_ScopedName *n,
+ UTL_StrList *p)
+ : AST_Root (n,
+ p),
+ AST_Decl (AST_Decl::NT_root,
+ n,
+ p),
UTL_Scope (AST_Decl::NT_root)
{
}
// We had to provide these since the AST_Root::fe_* method was setting the
-// names of these three to "local type"
+// names of these three to "local type".
-/*
- * Add this AST_Sequence to the locally defined types in this scope
- */
+// Add this AST_Sequence to the locally defined types in this scope.
AST_Sequence *
be_root::fe_add_sequence (AST_Sequence *t)
{
- if (t == NULL)
- return NULL;
+ if (t == 0)
+ {
+ return 0;
+ }
add_to_local_types(t);
return t;
}
-/*
- * Add this AST_String to the locally defined types in this scope
- */
+// Add this AST_String to the locally defined types in this scope
AST_String *
be_root::fe_add_string (AST_String *t)
{
- if (t == NULL)
- return NULL;
+ if (t == 0)
+ {
+ return 0;
+ }
add_to_local_types (t);
-
return t;
}
-/*
- * Add this AST_Array to the locally defined types in this scope
- */
+// Add this AST_Array to the locally defined types in this scope
AST_Array *
be_root::fe_add_array (AST_Array *t)
{
- if (t == NULL)
- return NULL;
+ if (t == 0)
+ {
+ return 0;
+ }
add_to_local_types (t);
-
return t;
}
+void
+be_root::destroy (void)
+{
+ // Call the destroy methods of our base classes.
+ be_scope::destroy ();
+ be_decl::destroy ();
+}
+
int
be_root::accept (be_visitor *visitor)
{
return visitor->visit_root (this);
}
-/*
- * Narrowing methods
- */
+// Narrowing methods
IMPL_NARROW_METHODS3 (be_root, AST_Root, be_scope, be_decl)
IMPL_NARROW_FROM_DECL (be_root)
IMPL_NARROW_FROM_SCOPE (be_root)