00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021
00029 #include "CommandObject.h"
00030
00039 template<class T>
00040 class CommandInfoObject : public CommandObject<T>
00041 {
00042 public:
00043 typedef void (T::*CommandFunction)(const std::string& argument);
00046 CommandInfoObject(const char* name, CommandFunction command, bool needobject = false, bool needlock = false, bool fullname = false);
00047
00049 bool needObject() const;
00050
00052 bool needLock() const;
00053
00054 private:
00055 bool m_needobject;
00056 bool m_needlock;
00057 };
00058
00059 template <class T>
00060 CommandInfoObject<T>::CommandInfoObject(const char* name, CommandFunction command, bool needobject, bool needlock, bool fullname) :
00061 CommandObject<T>(name, command, fullname),
00062 m_needobject(needobject),
00063 m_needlock(needlock)
00064 {
00065
00066 }
00067
00068 template <class T>
00069 bool CommandInfoObject<T>::needObject() const
00070 {
00071 return m_needobject;
00072 }
00073
00074 template <class T>
00075 bool CommandInfoObject<T>::needLock() const
00076 {
00077 return m_needlock;
00078 }