summaryrefslogtreecommitdiff
path: root/CIAO/CCF/CCF/IDL2/Parsing/Action.hpp
diff options
context:
space:
mode:
authorseibelr <seibelr@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-11-24 22:12:20 +0000
committerseibelr <seibelr@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-11-24 22:12:20 +0000
commit47b676670dc9373bc77af80388e0b51e36134738 (patch)
treeaacce0809279e1d142e7b196a84ff10dfbdae4d0 /CIAO/CCF/CCF/IDL2/Parsing/Action.hpp
parent3dd4e2fe6c64de3a9db04757eade78d764b578f1 (diff)
downloadATCD-GH5_0port.tar.gz
Added the ACE and TAO for this branchGH5_0port
Diffstat (limited to 'CIAO/CCF/CCF/IDL2/Parsing/Action.hpp')
-rw-r--r--CIAO/CCF/CCF/IDL2/Parsing/Action.hpp142
1 files changed, 0 insertions, 142 deletions
diff --git a/CIAO/CCF/CCF/IDL2/Parsing/Action.hpp b/CIAO/CCF/CCF/IDL2/Parsing/Action.hpp
deleted file mode 100644
index 2737abafb58..00000000000
--- a/CIAO/CCF/CCF/IDL2/Parsing/Action.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// file : CCF/IDL2/Parsing/Action.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_IDL2_PARSING_ACTION_HPP
-#define CCF_IDL2_PARSING_ACTION_HPP
-
-#include "CCF/IDL2/Parsing/Elements.hpp"
-
-namespace CCF
-{
- namespace IDL2
- {
- namespace Parsing
- {
- //
- //
- //
- template <typename Obj>
- class ActionExecutor
- {
- public:
-
- typedef
- void (Obj::*SemanticAction)(Iterator, Iterator) const;
-
- ActionExecutor (Obj const* obj, SemanticAction action)
- : obj_ (obj), action_ (action)
- {
- }
-
- void operator () (Iterator begin, Iterator end) const
- {
- (obj_->*action_) (begin, end);
- }
-
- private:
- Obj const* obj_;
- SemanticAction action_;
- };
-
-
- //
- //
- //
- template <typename Obj>
- class NoArgAction
- {
- public:
-
- typedef
- void (Obj::*Action)();
-
- NoArgAction (Obj& obj, Action action)
- : obj_ (obj), action_ (action)
- {
- }
-
- void operator () (Iterator, Iterator) const
- {
- (obj_.*action_) ();
- }
-
- private:
- Obj& obj_;
- Action action_;
- };
-
-
- //@@ Should prbably use Type instead of TypePtr
- //
- //
- //
- template <typename TypePtr, typename Obj>
- class OneArgAction
- {
- public:
-
- typedef
- void (Obj::*Action)(TypePtr const&);
-
- OneArgAction (Obj& obj, Action action)
- : obj_ (obj), action_ (action)
- {
- }
-
- void operator () (Iterator begin, Iterator end) const
- {
- if (end - begin != 1 )
- {
- //@@ throw
- }
-
- //@@ error handling if the strict_cast fails
- (obj_.*action_) (
- ReferenceCounting::strict_cast<typename TypePtr::Type> (*begin));
- }
-
- private:
- Obj& obj_;
- Action action_;
- };
-
-
- //
- //
- //
- template <typename Arg1, typename Arg2, typename Obj>
- class TwoArgAction
- {
- public:
-
- typedef
- void (Obj::*Action)(Arg1 const&, Arg2 const&);
-
- TwoArgAction (Obj& obj, Action action)
- : obj_ (obj), action_ (action)
- {
- }
-
- void operator () (Iterator begin, Iterator end) const
- {
- if (end - begin != 2 )
- {
- //@@ throw
- }
-
- //@@ error handling if strict_cast fails
- (obj_.*action_) (
- ReferenceCounting::strict_cast<typename Arg1::Type> (*begin),
- ReferenceCounting::strict_cast<typename Arg2::Type> (*(begin + 1)));
- }
-
- private:
- Obj& obj_;
- Action action_;
- };
- }
- }
-}
-
-#endif // CCF_IDL2_PARSING_ACTION_HPP