ENH: Add a way to set options of the handler genericly
This commit is contained in:
parent
e2ec4a1845
commit
ab7668de3f
@ -27,4 +27,34 @@ cmCTestGenericHandler::~cmCTestGenericHandler()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmCTestGenericHandler::SetOption(const char* op, const char* value)
|
||||||
|
{
|
||||||
|
if ( !op )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( !value )
|
||||||
|
{
|
||||||
|
cmCTestGenericHandler::t_StringToString::iterator remit
|
||||||
|
= m_Options.find(op);
|
||||||
|
if ( remit != m_Options.end() )
|
||||||
|
{
|
||||||
|
m_Options.erase(remit);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Options[op] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* cmCTestGenericHandler::GetOption(const char* op)
|
||||||
|
{
|
||||||
|
cmCTestGenericHandler::t_StringToString::iterator remit
|
||||||
|
= m_Options.find(op);
|
||||||
|
if ( remit == m_Options.end() )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return remit->second.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -58,9 +58,15 @@ public:
|
|||||||
cmCTestGenericHandler();
|
cmCTestGenericHandler();
|
||||||
virtual ~cmCTestGenericHandler();
|
virtual ~cmCTestGenericHandler();
|
||||||
|
|
||||||
|
typedef std::map<cmStdString,cmStdString> t_StringToString;
|
||||||
|
|
||||||
|
void SetOption(const char* op, const char* value);
|
||||||
|
const char* GetOption(const char* op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_Verbose;
|
bool m_Verbose;
|
||||||
cmCTest *m_CTest;
|
cmCTest *m_CTest;
|
||||||
|
t_StringToString m_Options;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user