Skip to content

Commit

Permalink
Refs #20817: Uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf committed May 24, 2024
1 parent b75b28b commit 529e765
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 75 deletions.
9 changes: 3 additions & 6 deletions examples/cpp/rtps/AsSocket/TestReaderSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

#include <fastdds/rtps/reader/ReaderListener.h>

namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
Expand Down
9 changes: 3 additions & 6 deletions examples/cpp/rtps/AsSocket/TestWriterSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
#include <cstdio>
#include <string>

namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
class RTPSWriter;
Expand Down
9 changes: 3 additions & 6 deletions examples/cpp/rtps/Persistent/TestReaderPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

#include <fastdds/rtps/reader/ReaderListener.h>

namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
Expand Down
9 changes: 3 additions & 6 deletions examples/cpp/rtps/Persistent/TestWriterPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

#include <fastdds/rtps/writer/WriterListener.h>

namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
class RTPSWriter;
Expand Down
9 changes: 3 additions & 6 deletions examples/cpp/rtps/Registered/TestReaderRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
#include <fastdds/rtps/reader/ReaderListener.h>


namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
Expand Down
9 changes: 3 additions & 6 deletions examples/cpp/rtps/Registered/TestWriterRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

#include <fastdds/rtps/writer/WriterListener.h>

namespace eprosima
{
namespace fastrtps
{
namespace rtps
{
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
} // namespace rtps
Expand Down
51 changes: 27 additions & 24 deletions include/fastdds/rtps/security/cryptography/CryptoKeyExchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ class SecurityException;

class CryptoKeyExchange
{
public:
public:

virtual ~CryptoKeyExchange()
{
}

virtual ~CryptoKeyExchange(){}
/**
* Creates Crypto Tokens containing the info to decrypt text encoded by the local Participant.
* To be sent to the remote participant.
Expand All @@ -56,10 +59,10 @@ class CryptoKeyExchange
* @return TRUE if successful
*/
virtual bool set_remote_participant_crypto_tokens(
const ParticipantCryptoHandle &local_participant_crypto,
ParticipantCryptoHandle &remote_participant_crypto,
const ParticipantCryptoTokenSeq &remote_participant_tokens,
SecurityException &exception) = 0;
const ParticipantCryptoHandle& local_participant_crypto,
ParticipantCryptoHandle& remote_participant_crypto,
const ParticipantCryptoTokenSeq& remote_participant_tokens,
SecurityException& exception) = 0;

/**
* Creates CryptoTokens containing the info to decrypt text encoded by the local DataWriter.
Expand All @@ -70,10 +73,10 @@ class CryptoKeyExchange
* @return TRUE if successful
*/
virtual bool create_local_datawriter_crypto_tokens(
DatawriterCryptoTokenSeq &local_datawriter_crypto_tokens,
DatawriterCryptoHandle &local_datawriter_crypto,
DatareaderCryptoHandle &remote_datareader_crypto,
SecurityException &exception) = 0;
DatawriterCryptoTokenSeq& local_datawriter_crypto_tokens,
DatawriterCryptoHandle& local_datawriter_crypto,
DatareaderCryptoHandle& remote_datareader_crypto,
SecurityException& exception) = 0;

/**
* Creates CryptoTokens containing the info to decrypt text encoded by the local DataReader.
Expand All @@ -84,10 +87,10 @@ class CryptoKeyExchange
* @return TRUE if successful
*/
virtual bool create_local_datareader_crypto_tokens(
DatareaderCryptoTokenSeq &local_datareader_crypto_tokens,
DatareaderCryptoHandle &local_datareader_crypto,
DatawriterCryptoHandle &remote_datawriter_crypto,
SecurityException &exception) = 0;
DatareaderCryptoTokenSeq& local_datareader_crypto_tokens,
DatareaderCryptoHandle& local_datareader_crypto,
DatawriterCryptoHandle& remote_datawriter_crypto,
SecurityException& exception) = 0;

/**
* Configures the Cryptographic Plugin with the material needed to interpret messages coming from the remote DataReader.
Expand All @@ -98,10 +101,10 @@ class CryptoKeyExchange
* @return TRUE if successful
*/
virtual bool set_remote_datareader_crypto_tokens(
DatawriterCryptoHandle &local_datawriter_crypto,
DatareaderCryptoHandle &remote_datareader_crypto,
const DatareaderCryptoTokenSeq &remote_datareader_tokens,
SecurityException &exception) = 0;
DatawriterCryptoHandle& local_datawriter_crypto,
DatareaderCryptoHandle& remote_datareader_crypto,
const DatareaderCryptoTokenSeq& remote_datareader_tokens,
SecurityException& exception) = 0;

/**
* Configures the Cryptographic Plugin with the material needed to interpret messages coming from the remote DataWriter.
Expand All @@ -113,10 +116,10 @@ class CryptoKeyExchange
*/

virtual bool set_remote_datawriter_crypto_tokens(
DatareaderCryptoHandle &local_datareader_crypto,
DatawriterCryptoHandle &remote_datawriter_crypto,
const DatawriterCryptoTokenSeq &remote_datawriter_tokens,
SecurityException &exception) = 0;
DatareaderCryptoHandle& local_datareader_crypto,
DatawriterCryptoHandle& remote_datawriter_crypto,
const DatawriterCryptoTokenSeq& remote_datawriter_tokens,
SecurityException& exception) = 0;

/**
* Release resources associated with a CryptoTokenSeq
Expand All @@ -125,8 +128,8 @@ class CryptoKeyExchange
* @return TRUE if successful
*/
virtual bool return_crypto_tokens(
const CryptoTokenSeq &crypto_tokens,
SecurityException &exception) = 0;
const CryptoTokenSeq& crypto_tokens,
SecurityException& exception) = 0;

};

Expand Down
30 changes: 23 additions & 7 deletions src/cpp/rtps/exceptions/Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,45 @@

using namespace eprosima::fastrtps::rtps;

Exception::Exception(const char* const& message) : message_(message), minor_(0)
Exception::Exception(
const char* const& message)
: message_(message)
, minor_(0)
{
}

Exception::Exception(const Exception &ex) : message_(ex.message_), minor_(ex.minor_)
Exception::Exception(
const Exception& ex)
: message_(ex.message_)
, minor_(ex.minor_)
{
}

Exception::Exception(Exception&& ex) : message_(std::move(ex.message_)), minor_(ex.minor_)
Exception::Exception(
Exception&& ex)
: message_(std::move(ex.message_))
, minor_(ex.minor_)
{
}

Exception::Exception(const char* const& message, const int32_t minor) : message_(message), minor_(minor)
Exception::Exception(
const char* const& message,
const int32_t minor)
: message_(message)
, minor_(minor)
{
}

Exception& Exception::operator=(const Exception &ex)
Exception& Exception::operator =(
const Exception& ex)
{
message_ = ex.message_;
minor_ = ex.minor_;
return *this;
}

Exception& Exception::operator=(Exception&& ex)
Exception& Exception::operator =(
Exception&& ex)
{
message_ = std::move(ex.message_);
minor_ = ex.minor_;
Expand All @@ -55,7 +70,8 @@ const int32_t& Exception::minor() const
return minor_;
}

void Exception::minor(const int32_t &minor)
void Exception::minor(
const int32_t& minor)
{
minor_ = minor;
}
Expand Down
24 changes: 16 additions & 8 deletions src/cpp/rtps/security/exceptions/SecurityException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,37 @@

using namespace eprosima::fastrtps::rtps::security;

SecurityException::SecurityException(const SecurityException &ex) : Exception(ex)
SecurityException::SecurityException(
const SecurityException& ex)
: Exception(ex)
{
}

SecurityException::SecurityException(SecurityException&& ex) : Exception(std::move(ex))
SecurityException::SecurityException(
SecurityException&& ex)
: Exception(std::move(ex))
{
}

SecurityException& SecurityException::operator=(const SecurityException &ex)
SecurityException& SecurityException::operator =(
const SecurityException& ex)
{
if(this != &ex)
if (this != &ex)
{
Exception::operator=(ex);
Exception::operator =(
ex);
}

return *this;
}

SecurityException& SecurityException::operator=(SecurityException&& ex)
SecurityException& SecurityException::operator =(
SecurityException&& ex)
{
if(this != &ex)
if (this != &ex)
{
Exception::operator=(std::move(ex));
Exception::operator =(
std::move(ex));
}

return *this;
Expand Down

0 comments on commit 529e765

Please sign in to comment.