|
|
|
#include "viewmodel/displayString/SimpleDisplayProviderCreator.h"
|
|
|
|
|
|
|
|
#include "viewmodel/displayString/SimpleThreadIdDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleIdDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleLevelDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleTimeStampDisplay.h"
|
|
|
|
#include "viewmodel/displayString/FilenameDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleFunctionDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleLineNumber.h"
|
|
|
|
#include "viewmodel/displayString/SimpleScopeNameDisplay.h"
|
|
|
|
#include "viewmodel/displayString/SimpleMessageDisplay.h"
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createDisplayProvider(ELogColumn column)
|
|
|
|
const
|
|
|
|
{
|
|
|
|
switch(column)
|
|
|
|
{
|
|
|
|
case threadId:
|
|
|
|
return createThreadId();
|
|
|
|
|
|
|
|
case id:
|
|
|
|
return createId();
|
|
|
|
|
|
|
|
case level:
|
|
|
|
return createLevel();
|
|
|
|
|
|
|
|
case timestamp:
|
|
|
|
return createTimestamp();
|
|
|
|
|
|
|
|
case file:
|
|
|
|
return createFile();
|
|
|
|
|
|
|
|
case func:
|
|
|
|
return createFunc();
|
|
|
|
|
|
|
|
case lineno:
|
|
|
|
return createLineno();
|
|
|
|
|
|
|
|
case scope:
|
|
|
|
return createScope();
|
|
|
|
|
|
|
|
case msg:
|
|
|
|
return createMsg();
|
|
|
|
|
|
|
|
default:
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createId() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleIdDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createLevel() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleLevelDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createTimestamp() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleTimeStampDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createFile() const
|
|
|
|
{
|
|
|
|
return std::make_shared<FilenameDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createFunc() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleFunctionDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createLineno() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleLineNumberDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createMsg() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleMessageDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createScope() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleScopeNameDisplay>();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************************/
|
|
|
|
DisplayStringProvider_ptr SimpleDisplayProviderCreator::createThreadId() const
|
|
|
|
{
|
|
|
|
return std::make_shared<SimpleThreadIdDisplay>();
|
|
|
|
}
|