NetServices: format code using haiku-format
This commit formats all the netservices2 code with the `haiku-format` tool from https://github.com/owenca/haiku-format (commit aa7408e), with the following customizations: * SpaceBeforeRangeBasedForLoopColon is set to false * Braces before a catch block are not wrapped * Most headers, except for ExclusiveBorrow.h, have been manually reformatted to adhere to Haiku's header format (issue #19 in the repository) Change-Id: I693c4515cf26402e48f35d1213ab6d5fcf14bd1e
This commit is contained in:
@@ -18,74 +18,74 @@ namespace BPrivate {
|
||||
namespace Network {
|
||||
|
||||
|
||||
class BError {
|
||||
class BError
|
||||
{
|
||||
public:
|
||||
BError(const char* origin);
|
||||
BError(BString origin);
|
||||
virtual ~BError() noexcept;
|
||||
BError(const char* origin);
|
||||
BError(BString origin);
|
||||
virtual ~BError() noexcept;
|
||||
|
||||
BError(const BError& error);
|
||||
BError(BError&& error) noexcept;
|
||||
BError(const BError& error);
|
||||
BError(BError&& error) noexcept;
|
||||
|
||||
BError& operator=(const BError& error);
|
||||
BError& operator=(BError&& error) noexcept;
|
||||
BError& operator=(const BError& error);
|
||||
BError& operator=(BError&& error) noexcept;
|
||||
|
||||
virtual const char* Message() const noexcept = 0;
|
||||
virtual const char* Origin() const noexcept;
|
||||
virtual BString DebugMessage() const;
|
||||
void WriteToStream(std::ostream& stream) const;
|
||||
size_t WriteToOutput(BDataIO* output) const;
|
||||
virtual const char* Message() const noexcept = 0;
|
||||
virtual const char* Origin() const noexcept;
|
||||
virtual BString DebugMessage() const;
|
||||
void WriteToStream(std::ostream& stream) const;
|
||||
size_t WriteToOutput(BDataIO* output) const;
|
||||
|
||||
private:
|
||||
virtual void _ReservedError1();
|
||||
virtual void _ReservedError2();
|
||||
virtual void _ReservedError3();
|
||||
virtual void _ReservedError4();
|
||||
virtual void _ReservedError1();
|
||||
virtual void _ReservedError2();
|
||||
virtual void _ReservedError3();
|
||||
virtual void _ReservedError4();
|
||||
|
||||
private:
|
||||
BString fOrigin;
|
||||
BString fOrigin;
|
||||
};
|
||||
|
||||
|
||||
class BRuntimeError : public BError {
|
||||
class BRuntimeError : public BError
|
||||
{
|
||||
public:
|
||||
BRuntimeError(const char* origin, const char* message);
|
||||
BRuntimeError(const char* origin, BString message);
|
||||
BRuntimeError(BString origin, BString message);
|
||||
BRuntimeError(const char* origin, const char* message);
|
||||
BRuntimeError(const char* origin, BString message);
|
||||
BRuntimeError(BString origin, BString message);
|
||||
|
||||
BRuntimeError(const BRuntimeError& other);
|
||||
BRuntimeError(BRuntimeError&& other) noexcept;
|
||||
BRuntimeError(const BRuntimeError& other);
|
||||
BRuntimeError(BRuntimeError&& other) noexcept;
|
||||
|
||||
BRuntimeError& operator=(const BRuntimeError& other);
|
||||
BRuntimeError& operator=(BRuntimeError&& other) noexcept;
|
||||
BRuntimeError& operator=(const BRuntimeError& other);
|
||||
BRuntimeError& operator=(BRuntimeError&& other) noexcept;
|
||||
|
||||
virtual const char* Message() const noexcept override;
|
||||
virtual const char* Message() const noexcept override;
|
||||
|
||||
private:
|
||||
BString fMessage;
|
||||
BString fMessage;
|
||||
};
|
||||
|
||||
|
||||
class BSystemError : public BError
|
||||
{
|
||||
public:
|
||||
BSystemError(const char* origin, status_t error);
|
||||
BSystemError(BString origin, status_t error);
|
||||
BSystemError(const char* origin, status_t error);
|
||||
BSystemError(BString origin, status_t error);
|
||||
|
||||
BSystemError(const BSystemError& other);
|
||||
BSystemError& operator=(const BSystemError& other);
|
||||
BSystemError(const BSystemError& other);
|
||||
BSystemError& operator=(const BSystemError& other);
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
BSystemError(BSystemError&& other) noexcept;
|
||||
BSystemError& operator=(BSystemError&& other) noexcept;
|
||||
#endif
|
||||
BSystemError(BSystemError&& other) noexcept;
|
||||
BSystemError& operator=(BSystemError&& other) noexcept;
|
||||
|
||||
virtual const char* Message() const noexcept override;
|
||||
virtual BString DebugMessage() const override;
|
||||
status_t Error() noexcept;
|
||||
virtual const char* Message() const noexcept override;
|
||||
virtual BString DebugMessage() const override;
|
||||
status_t Error() noexcept;
|
||||
|
||||
private:
|
||||
status_t fErrorCode;
|
||||
status_t fErrorCode;
|
||||
};
|
||||
|
||||
} // namespace Network
|
||||
|
||||
Reference in New Issue
Block a user