OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librtcltools/] [RtclCmdBase.hpp] - Blame information for rev 19

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: RtclCmdBase.hpp 486 2013-02-10 22:34:43Z mueller $
2 10 wfjm
//
3 19 wfjm
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16 19 wfjm
// 2013-02-02   480   1.0    Initial version (refactored out from ProxyBase)
17 10 wfjm
// ---------------------------------------------------------------------------
18
 
19
/*!
20
  \file
21 19 wfjm
  \version $Id: RtclCmdBase.hpp 486 2013-02-10 22:34:43Z mueller $
22
  \brief   Declaration of class RtclCmdBase.
23 10 wfjm
*/
24
 
25 19 wfjm
#ifndef included_Retro_RtclCmdBase
26
#define included_Retro_RtclCmdBase 1
27 10 wfjm
 
28
#include "tcl.h"
29
 
30
#include <string>
31
#include <map>
32
 
33 12 wfjm
#include "boost/utility.hpp"
34
#include "boost/function.hpp"
35
 
36 10 wfjm
#include "RtclArgs.hpp"
37
 
38
namespace Retro {
39
 
40 19 wfjm
  class RtclCmdBase : private boost::noncopyable {
41 10 wfjm
    public:
42 12 wfjm
      typedef boost::function<int(RtclArgs&)> methfo_t;
43
 
44
      typedef std::map<std::string, methfo_t> mmap_t;
45 10 wfjm
      typedef mmap_t::iterator         mmap_it_t;
46
      typedef mmap_t::const_iterator   mmap_cit_t;
47
      typedef mmap_t::value_type       mmap_val_t;
48
 
49 19 wfjm
                    RtclCmdBase();
50
      virtual      ~RtclCmdBase();
51 10 wfjm
 
52 19 wfjm
      int           DispatchCmd(RtclArgs& args);
53 10 wfjm
 
54 19 wfjm
    // some constants (also defined in cpp)
55
      static const int kOK  = TCL_OK;       //<!
56
      static const int kERR = TCL_ERROR;    //<!
57 10 wfjm
 
58
    protected:
59 12 wfjm
      void          AddMeth(const std::string& name, const methfo_t& methfo);
60 10 wfjm
 
61
    protected:
62
      mmap_t        fMapMeth;               //!< map for named methods
63
  };
64
 
65
} // end namespace Retro
66
 
67 19 wfjm
//#include "RtclCmdBase.ipp"
68 10 wfjm
 
69
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.