diff -r 65781b048a47 -r ec6223c3b7ec tool/Command.h --- a/tool/Command.h Tue Feb 23 17:40:46 2010 +0100 +++ b/tool/Command.h Wed Feb 24 16:27:11 2010 +0100 @@ -33,9 +33,12 @@ #include #include #include +#include using namespace std; -#include "MasterDevice.h" +#include "../master/ioctl.h" + +class MasterDevice; /****************************************************************************/ @@ -76,6 +79,9 @@ const string &getName() const; const string &getBriefDescription() const; + typedef list MasterIndexList; + void setMasterIndices(const MasterIndexList &); + const MasterIndexList &getMasterIndices() const; enum Verbosity { Quiet, Normal, @@ -102,7 +108,7 @@ virtual string helpString() const = 0; typedef vector StringVector; - virtual void execute(MasterDevice &, const StringVector &) = 0; + virtual void execute(const StringVector &) = 0; static string numericInfo(); @@ -125,6 +131,7 @@ private: string name; string briefDesc; + MasterIndexList masterIndices; Verbosity verbosity; int alias; int position; @@ -152,6 +159,13 @@ /****************************************************************************/ +inline const Command::MasterIndexList &Command::getMasterIndices() const +{ + return masterIndices; +} + +/****************************************************************************/ + inline Command::Verbosity Command::getVerbosity() const { return verbosity;