Toshihiro Shimizu 890ddd
#ifndef TCLI_INCLUDED
Toshihiro Shimizu 890ddd
#define TCLI_INCLUDED
Toshihiro Shimizu 890ddd
Shinya Kitaoka 262a92
#include <memory></memory>
Shinya Kitaoka 262a92
Toshihiro Shimizu 890ddd
//#include "tcommon.h"   contenuto in tconvert.h
Toshihiro Shimizu 890ddd
#include "tconvert.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tfilepath.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TAPPTOOLS_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//forward declaration
Toshihiro Shimizu 890ddd
class TFilePath;
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace TCli
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
inline bool fromStr(int &value, std::string s)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	if (isInt(s)) {
Toshihiro Shimizu 890ddd
		value = toInt(s);
Toshihiro Shimizu 890ddd
		return true;
Toshihiro Shimizu 890ddd
	} else
Toshihiro Shimizu 890ddd
		return false;
Toshihiro Shimizu 890ddd
}
Shinya Kitaoka 3bfa54
inline bool fromStr(double &value, std::string s)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	if (isDouble(s)) {
Toshihiro Shimizu 890ddd
		value = toDouble(s);
Toshihiro Shimizu 890ddd
		return true;
Toshihiro Shimizu 890ddd
	} else
Toshihiro Shimizu 890ddd
		return false;
Toshihiro Shimizu 890ddd
}
Shinya Kitaoka 3bfa54
inline bool fromStr(std::string &value, std::string s)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	value = s;
Toshihiro Shimizu 890ddd
	return true;
Toshihiro Shimizu 890ddd
}
Shinya Kitaoka 3bfa54
inline bool fromStr(TFilePath &value, std::string s)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	value = TFilePath(s);
Toshihiro Shimizu 890ddd
	return true;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class UsageError
Toshihiro Shimizu 890ddd
{
Shinya Kitaoka 3bfa54
	std::string m_msg;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	UsageError(std::string msg) : m_msg(msg){};
Toshihiro Shimizu 890ddd
	~UsageError(){};
Shinya Kitaoka 3bfa54
	std::string getError() const { return m_msg; };
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI UsageElement
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 3bfa54
	std::string m_name, m_help;
Toshihiro Shimizu 890ddd
	bool m_selected;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	UsageElement(std::string name, std::string help);
Toshihiro Shimizu 890ddd
	virtual ~UsageElement(){};
Shinya Kitaoka 3bfa54
	std::string getName() const { return m_name; };
Toshihiro Shimizu 890ddd
	bool isSelected() const { return m_selected; };
Toshihiro Shimizu 890ddd
	void select() { m_selected = true; };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual bool isHidden() const { return false; };
Toshihiro Shimizu 890ddd
	virtual bool isSwitcher() const { return false; };
Toshihiro Shimizu 890ddd
	virtual bool isArgument() const { return false; };
Toshihiro Shimizu 890ddd
	virtual bool isMultiArgument() const { return false; };
Shinya Kitaoka 3bfa54
	void setHelp(std::string help) { m_help = help; };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	virtual void print(std::ostream &out) const;
Shinya Kitaoka 3bfa54
	virtual void printHelpLine(std::ostream &out) const;
Shinya Kitaoka 3bfa54
	virtual void dumpValue(std::ostream &out) const = 0;
Toshihiro Shimizu 890ddd
	virtual void resetValue() = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	// not implemented
Toshihiro Shimizu 890ddd
	UsageElement(const UsageElement &);
Toshihiro Shimizu 890ddd
	UsageElement &operator=(const UsageElement &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Qualifier : public UsageElement
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	bool m_switcher;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	Qualifier(std::string name, std::string help)
Toshihiro Shimizu 890ddd
		: UsageElement(name, help), m_switcher(false){};
Toshihiro Shimizu 890ddd
	~Qualifier(){};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual bool isSwitcher() const { return m_switcher; };
Toshihiro Shimizu 890ddd
	virtual bool isHidden() const { return m_help == ""; };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	operator bool() const { return isSelected(); };
Toshihiro Shimizu 890ddd
	virtual void fetch(int index, int &argc, char *argv[]) = 0;
Shinya Kitaoka 3bfa54
	virtual void print(std::ostream &out) const;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI SimpleQualifier : public Qualifier
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	SimpleQualifier(std::string name, std::string help)
Toshihiro Shimizu 890ddd
		: Qualifier(name, help){};
Toshihiro Shimizu 890ddd
	~SimpleQualifier(){};
Toshihiro Shimizu 890ddd
	void fetch(int index, int &argc, char *argv[]);
Shinya Kitaoka 3bfa54
	void dumpValue(std::ostream &out) const;
Toshihiro Shimizu 890ddd
	void resetValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Switcher : public SimpleQualifier
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	Switcher(std::string name, std::string help)
Toshihiro Shimizu 890ddd
		: SimpleQualifier(name, help) { m_switcher = true; };
Toshihiro Shimizu 890ddd
	~Switcher(){};
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <class t=""></class>
Toshihiro Shimizu 890ddd
class QualifierT : public Qualifier
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	T m_value;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	QualifierT<t>(std::string name, std::string help)</t>
Toshihiro Shimizu 890ddd
		: Qualifier(name, help), m_value(){};
Toshihiro Shimizu 890ddd
	~QualifierT<t>(){};</t>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	T getValue() const { return m_value; };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void fetch(int index, int &argc, char *argv[])
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		if (index + 1 >= argc)
Toshihiro Shimizu 890ddd
			throw UsageError("missing argument");
Toshihiro Shimizu 890ddd
		if (!fromStr(m_value, argv[index + 1]))
Toshihiro Shimizu 890ddd
			throw UsageError(
Shinya Kitaoka 3bfa54
				m_name + ": bad argument type /" + std::string(argv[index + 1]) + "/");
Toshihiro Shimizu 890ddd
		for (int i = index; i < argc - 1; i++)
Toshihiro Shimizu 890ddd
			argv[i] = argv[i + 2];
Toshihiro Shimizu 890ddd
		argc -= 2;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	void dumpValue(std::ostream &out) const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		out << m_name << " = " << (isSelected() ? "on" : "off") << " : "
Toshihiro Shimizu 890ddd
			<< m_value << "\n";
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void resetValue()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_value = T();
Toshihiro Shimizu 890ddd
		m_selected = false;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Argument : public UsageElement
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	Argument(std::string name, std::string help)
Toshihiro Shimizu 890ddd
		: UsageElement(name, help){};
Toshihiro Shimizu 890ddd
	~Argument(){};
Toshihiro Shimizu 890ddd
	virtual void fetch(int index, int &argc, char *argv[]);
Toshihiro Shimizu 890ddd
	virtual bool assign(char *) = 0;
Toshihiro Shimizu 890ddd
	bool isArgument() const { return true; };
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <class t=""></class>
Toshihiro Shimizu 890ddd
class ArgumentT : public Argument
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	T m_value;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	ArgumentT<t>(std::string name, std::string help) : Argument(name, help){};</t>
Toshihiro Shimizu 890ddd
	~ArgumentT<t>(){};</t>
Toshihiro Shimizu 890ddd
	operator T() const { return m_value; };
Toshihiro Shimizu 890ddd
	T getValue() const { return m_value; };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool assign(char *src) { return fromStr(m_value, src); };
Shinya Kitaoka 3bfa54
	void dumpValue(std::ostream &out) const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		out << m_name << " = " << m_value << "\n";
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
	void resetValue()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_value = T();
Toshihiro Shimizu 890ddd
		m_selected = false;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI MultiArgument : public Argument
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	int m_count, m_index;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	MultiArgument(std::string name, std::string help)
Toshihiro Shimizu 890ddd
		: Argument(name, help), m_count(0), m_index(0){};
Toshihiro Shimizu 890ddd
	~MultiArgument(){};
Toshihiro Shimizu 890ddd
	int getCount() const { return m_count; };
Toshihiro Shimizu 890ddd
	virtual void fetch(int index, int &argc, char *argv[]);
Toshihiro Shimizu 890ddd
	bool isMultiArgument() const { return true; };
Toshihiro Shimizu 890ddd
	virtual void allocate(int count) = 0;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <class t=""></class>
Toshihiro Shimizu 890ddd
class MultiArgumentT : public MultiArgument
Toshihiro Shimizu 890ddd
{
Shinya Kitaoka 6a4e01
	std::unique_ptr<t[]> m_values;</t[]>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	MultiArgumentT(std::string name, std::string help)
Shinya Kitaoka 6a4e01
		: MultiArgument(name, help) {}
Toshihiro Shimizu 890ddd
	T operator[](int index)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		assert(0 <= index && index < m_count);
Toshihiro Shimizu 890ddd
		return m_values[index];
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
	virtual bool assign(char *src)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		assert(0 <= m_index && m_index < m_count);
Toshihiro Shimizu 890ddd
		return fromStr(m_values[m_index], src);
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	void dumpValue(std::ostream &out) const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		out << m_name << " = {";
Toshihiro Shimizu 890ddd
		for (int i = 0; i < m_count; i++)
Toshihiro Shimizu 890ddd
			out << " " << m_values[i];
Toshihiro Shimizu 890ddd
		out << "}" << std::endl;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void resetValue()
Toshihiro Shimizu 890ddd
	{
Shinya Kitaoka 6a4e01
		m_values.reset();
Toshihiro Shimizu 890ddd
		m_count = m_index = 0;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void allocate(int count)
Toshihiro Shimizu 890ddd
	{
Shinya Kitaoka 6a4e01
		m_values.reset((count > 0) ? new T[count] : nullptr);
Toshihiro Shimizu 890ddd
		m_count = count;
Toshihiro Shimizu 890ddd
		m_index = 0;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef UsageElement *UsageElementPtr;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI UsageLine
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 6a4e01
	std::unique_ptr<usageelementptr[]> m_elements;</usageelementptr[]>
Toshihiro Shimizu 890ddd
	int m_count;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	UsageLine();
Toshihiro Shimizu 890ddd
	virtual ~UsageLine();
Toshihiro Shimizu 890ddd
	UsageLine(const UsageLine &ul);
Toshihiro Shimizu 890ddd
	UsageLine &operator=(const UsageLine &ul);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	UsageLine(int count);
Toshihiro Shimizu 890ddd
	UsageLine(const UsageLine &, UsageElement &elem);
Toshihiro Shimizu 890ddd
	UsageLine(UsageElement &elem);
Toshihiro Shimizu 890ddd
	UsageLine(UsageElement &a, UsageElement &b);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	UsageLine operator+(UsageElement &);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int getCount() const { return m_count; };
Toshihiro Shimizu 890ddd
	UsageElementPtr &operator[](int index) { return m_elements[index]; };
Toshihiro Shimizu 890ddd
	const UsageElementPtr &operator[](int index) const { return m_elements[index]; };
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
DVAPI UsageLine operator+(UsageElement &a, UsageElement &b);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Optional : public UsageLine
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	Optional(const UsageLine &ul);
Toshihiro Shimizu 890ddd
	~Optional(){};
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
DVAPI UsageLine operator+(const UsageLine &a, const Optional &b);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class UsageImp;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Usage
Toshihiro Shimizu 890ddd
{
Shinya Kitaoka 262a92
	std::unique_ptr<usageimp> m_imp;</usageimp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	Usage(std::string progName);
Toshihiro Shimizu 890ddd
	~Usage();
Toshihiro Shimizu 890ddd
	void add(const UsageLine &);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	void print(std::ostream &out) const;
Shinya Kitaoka 3bfa54
	void dumpValues(std::ostream &out) const; // per debug
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	bool parse(int argc, char *argv[], std::ostream &err = std::cerr);
Shinya Kitaoka 3bfa54
	bool parse(const char *argvString, std::ostream &err = std::cerr);
Toshihiro Shimizu 890ddd
	void clear(); // per debug
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	//not implemented
Toshihiro Shimizu 890ddd
	Usage(const Usage &);
Toshihiro Shimizu 890ddd
	Usage &operator=(const Usage &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef QualifierT<int> IntQualifier;</int>
Toshihiro Shimizu 890ddd
typedef QualifierT<double> DoubleQualifier;</double>
Shinya Kitaoka 3bfa54
typedef QualifierT<std::string> StringQualifier;</std::string>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef ArgumentT<int> IntArgument;</int>
Toshihiro Shimizu 890ddd
typedef ArgumentT<double> DoubleArgument;</double>
Shinya Kitaoka 3bfa54
typedef ArgumentT<std::string> StringArgument;</std::string>
Toshihiro Shimizu 890ddd
typedef ArgumentT<tfilepath> FilePathArgument;</tfilepath>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef MultiArgumentT<int> IntMultiArgument;</int>
Toshihiro Shimizu 890ddd
typedef MultiArgumentT<double> DoubleMultiArgument;</double>
Shinya Kitaoka 3bfa54
typedef MultiArgumentT<std::string> StringMultiArgument;</std::string>
Toshihiro Shimizu 890ddd
typedef MultiArgumentT<tfilepath> FilePathMultiArgument;</tfilepath>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI RangeQualifier : public Qualifier
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	int m_from, m_to;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	RangeQualifier();
Toshihiro Shimizu 890ddd
	~RangeQualifier(){};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int getFrom() const { return m_from; };
Toshihiro Shimizu 890ddd
	int getTo() const { return m_to; };
Toshihiro Shimizu 890ddd
	bool contains(int frame) const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		return m_from <= frame && frame <= m_to;
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
	void fetch(int index, int &argc, char *argv[]);
Shinya Kitaoka 3bfa54
	void dumpValue(std::ostream &out) const;
Toshihiro Shimizu 890ddd
	void resetValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
} // namespace TCli
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // TCLI_INCLUDED