diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/Foundation/include/Poco/Channel.h | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/Foundation/include/Poco/Channel.h')
-rw-r--r-- | contrib/libs/poco/Foundation/include/Poco/Channel.h | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/contrib/libs/poco/Foundation/include/Poco/Channel.h b/contrib/libs/poco/Foundation/include/Poco/Channel.h index d3633ae897..f820a2c3c7 100644 --- a/contrib/libs/poco/Foundation/include/Poco/Channel.h +++ b/contrib/libs/poco/Foundation/include/Poco/Channel.h @@ -1,78 +1,78 @@ -// -// Channel.h -// -// Library: Foundation -// Package: Logging -// Module: Channel -// -// Definition of the Channel class. -// -// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Foundation_Channel_INCLUDED -#define Foundation_Channel_INCLUDED - - -#include "Poco/Foundation.h" -#include "Poco/Configurable.h" -#include "Poco/Mutex.h" -#include "Poco/RefCountedObject.h" - - -namespace Poco { - - -class Message; - - -class Foundation_API Channel: public Configurable, public RefCountedObject - /// The base class for all Channel classes. - /// - /// Supports reference counting based garbage - /// collection and provides trivial implementations - /// of getProperty() and setProperty(). -{ -public: - Channel(); - /// Creates the channel and initializes - /// the reference count to one. - - virtual void open(); - /// Does whatever is necessary to open the channel. - /// The default implementation does nothing. - - virtual void close(); - /// Does whatever is necessary to close the channel. - /// The default implementation does nothing. - - virtual void log(const Message& msg) = 0; - /// Logs the given message to the channel. Must be - /// overridden by subclasses. - /// - /// If the channel has not been opened yet, the log() - /// method will open it. - - void setProperty(const std::string& name, const std::string& value); - /// Throws a PropertyNotSupportedException. - - std::string getProperty(const std::string& name) const; - /// Throws a PropertyNotSupportedException. - -protected: - virtual ~Channel(); - -private: - Channel(const Channel&); - Channel& operator = (const Channel&); -}; - - -} // namespace Poco - - -#endif // Foundation_Channel_INCLUDED +// +// Channel.h +// +// Library: Foundation +// Package: Logging +// Module: Channel +// +// Definition of the Channel class. +// +// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef Foundation_Channel_INCLUDED +#define Foundation_Channel_INCLUDED + + +#include "Poco/Foundation.h" +#include "Poco/Configurable.h" +#include "Poco/Mutex.h" +#include "Poco/RefCountedObject.h" + + +namespace Poco { + + +class Message; + + +class Foundation_API Channel: public Configurable, public RefCountedObject + /// The base class for all Channel classes. + /// + /// Supports reference counting based garbage + /// collection and provides trivial implementations + /// of getProperty() and setProperty(). +{ +public: + Channel(); + /// Creates the channel and initializes + /// the reference count to one. + + virtual void open(); + /// Does whatever is necessary to open the channel. + /// The default implementation does nothing. + + virtual void close(); + /// Does whatever is necessary to close the channel. + /// The default implementation does nothing. + + virtual void log(const Message& msg) = 0; + /// Logs the given message to the channel. Must be + /// overridden by subclasses. + /// + /// If the channel has not been opened yet, the log() + /// method will open it. + + void setProperty(const std::string& name, const std::string& value); + /// Throws a PropertyNotSupportedException. + + std::string getProperty(const std::string& name) const; + /// Throws a PropertyNotSupportedException. + +protected: + virtual ~Channel(); + +private: + Channel(const Channel&); + Channel& operator = (const Channel&); +}; + + +} // namespace Poco + + +#endif // Foundation_Channel_INCLUDED |