diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-DS-main.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp')
-rw-r--r-- | modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp b/modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp new file mode 100644 index 00000000000..c781cdcfb97 --- /dev/null +++ b/modules/CIAO/CCF/CCF/IDL2/Traversal/Sequence.cpp @@ -0,0 +1,111 @@ +// file : CCF/IDL2/Traversal/Sequence.cpp +// author : Boris Kolpackov <boris@dre.vanderbilt.edu> +// cvs-id : $Id$ + +#include "CCF/IDL2/Traversal/Sequence.hpp" + +namespace CCF +{ + namespace IDL2 + { + namespace Traversal + { + + // UnboundedSequence + // + + void UnboundedSequence:: + traverse (Type& us) + { + pre (us); + arguments_with_type (us); + name (us); + post (us); + } + + void UnboundedSequence:: + pre (Type&) + { + } + + void UnboundedSequence:: + arguments_with_type (Type& us, EdgeDispatcherBase& d) + { + d.traverse (**us.arguments_begin ()); + } + + void UnboundedSequence:: + arguments_with_type (Type& us) + { + arguments_with_type (us, edge_traverser ()); + } + + void UnboundedSequence:: + name (Type&) + { + } + + void UnboundedSequence:: + post (Type&) + { + } + + + // BoundedSequence + // + + void BoundedSequence:: + traverse (Type& bs) + { + pre (bs); + arguments_with_type (bs); + arguments_with_value (bs); + name (bs); + post (bs); + } + + void BoundedSequence:: + pre (Type&) + { + } + + void BoundedSequence:: + arguments_with_type (Type& bs, EdgeDispatcherBase& d) + { + d.traverse (**bs.arguments_begin ()); + } + + void BoundedSequence:: + arguments_with_type (Type& bs) + { + arguments_with_type (bs, edge_traverser ()); + } + + void BoundedSequence:: + arguments_with_value (Type& bs, EdgeDispatcherBase& d) + { + Type::ArgumentsIterator i (bs.arguments_begin ()); + + ++i; // Bound is always second to the type. + + d.traverse (**i); + } + + void BoundedSequence:: + arguments_with_value (Type& bs) + { + arguments_with_value (bs, edge_traverser ()); + } + + void BoundedSequence:: + name (Type&) + { + } + + void BoundedSequence:: + post (Type&) + { + } + } + } +} |