7 #include <boost/shared_ptr.hpp>
12 const struct cmdinfo
*cmds
;
14 const std::string name
;
15 const struct cmdinfo
*cmdbase() const { return cmds
; }
16 const struct cmdinfo
*getcmd(int idx
) const {
17 assert(idx
>= 0 && idx
< cmdcnt
);
18 return cmdbase() + idx
;
20 int cmdcount() const { return cmdcnt
; }
22 const cmdinfo
*find_command(const char *name
) const;
24 Dialect(const cmdinfo
*cmds
, const std::string
&n
);
26 int cmd_index(const cmdinfo
*) const;
29 extern std::map
<std::string
, boost::shared_ptr
<Dialect
> > dialects
;
31 void registerDelegates();