コード例 #1
0
ファイル: Trace.cpp プロジェクト: SRabbelier/unsignedbyte
std::string Trace::ShowShort()
{
	std::string editedby = "unknown";
	
	try {
		AccountPtr account = mud::AccountManager::Get()->GetByKey(getAccount());
		editedby = account->getName();
	} catch(RowNotFoundException& e) {
		
	}
	
	return Global::Get()->sprintf("%s (%ld): %s\n", 
			editedby.c_str(),
			getTime(),
			getDescription().c_str());
}
コード例 #2
0
ファイル: Trace.cpp プロジェクト: SRabbelier/unsignedbyte
std::vector<std::string> Trace::Show()
{
	std::vector<std::string> result;
	std::string editedby = "unknown";
	
	try {
		AccountPtr account = mud::AccountManager::Get()->GetByKey(getAccount());
		editedby = account->getName();
	} catch(RowNotFoundException& e) {
		
	}
	
	result.push_back(Global::Get()->sprintf("Account: '%s'.", editedby.c_str()));
	result.push_back(Global::Get()->sprintf("Description: '%s'.", getDescription().c_str()));
	result.push_back(Global::Get()->sprintf("Diff: %s.", getDiff().c_str()));
	result.push_back(Global::Get()->sprintf("Time: %ld.", getTime()));
	
	return result;
}