2012-04-29 18:52:25 +00:00
|
|
|
//
|
|
|
|
// TestChannel.h
|
|
|
|
//
|
|
|
|
// $Id: //poco/1.4/Foundation/testsuite/src/TestChannel.h#1 $
|
|
|
|
//
|
|
|
|
// Definition of the TestChannel class.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2012-04-29 18:52:25 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TestChannel_INCLUDED
|
|
|
|
#define TestChannel_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/Channel.h"
|
|
|
|
#include "Poco/Message.h"
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
|
|
|
|
class TestChannel: public Poco::Channel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef std::list<Poco::Message> MsgList;
|
|
|
|
|
|
|
|
TestChannel();
|
|
|
|
~TestChannel();
|
|
|
|
|
|
|
|
void log(const Poco::Message& msg);
|
|
|
|
MsgList& list();
|
|
|
|
void clear();
|
2012-08-04 10:40:58 +00:00
|
|
|
const Poco::Message& getLastMessage() const { return _lastMessage; }
|
2012-04-29 18:52:25 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
MsgList _msgList;
|
2012-08-04 10:40:58 +00:00
|
|
|
Poco::Message _lastMessage;
|
2012-04-29 18:52:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TestChannel_INCLUDED
|