-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'FastDDS_security_interoperability_test'
- Loading branch information
Showing
23 changed files
with
1,623 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,4 @@ src/.vscode/launch.json | |
.vscode/* | ||
.idea/ | ||
logging-config.yaml | ||
dev | ||
FastDDS_security_interoperability_test | ||
dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
project("secure_shapes") | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
find_package(fastcdr 2 REQUIRED) | ||
find_package(fastrtps 2.12 REQUIRED) | ||
|
||
add_library(shape_type Shape.cxx) | ||
target_link_libraries(shape_type fastcdr fastrtps) | ||
|
||
add_executable(secure_shapes ShapePubSubTypes.cxx ShapePublisher.cpp ShapeSubscriber.cpp main.cpp) | ||
target_link_libraries(secure_shapes fastcdr fastrtps shape_type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/*! | ||
* @file Shape.cpp | ||
* This source file contains the implementation of the described types in the IDL file. | ||
* | ||
* This file was generated by the tool fastddsgen. | ||
*/ | ||
|
||
#ifdef _WIN32 | ||
// Remove linker warning LNK4221 on Visual Studio | ||
namespace { | ||
char dummy; | ||
} // namespace | ||
#endif // _WIN32 | ||
|
||
#include "Shape.h" | ||
#include <fastcdr/Cdr.h> | ||
|
||
|
||
#include <fastcdr/exceptions/BadParamException.h> | ||
using namespace eprosima::fastcdr::exception; | ||
|
||
#include <utility> | ||
|
||
|
||
ShapeType::ShapeType() | ||
{ | ||
|
||
} | ||
|
||
ShapeType::~ShapeType() | ||
{ | ||
} | ||
|
||
ShapeType::ShapeType( | ||
const ShapeType& x) | ||
{ | ||
m_color = x.m_color; | ||
m_x = x.m_x; | ||
m_y = x.m_y; | ||
m_shape_size = x.m_shape_size; | ||
} | ||
|
||
ShapeType::ShapeType( | ||
ShapeType&& x) noexcept | ||
{ | ||
m_color = std::move(x.m_color); | ||
m_x = x.m_x; | ||
m_y = x.m_y; | ||
m_shape_size = x.m_shape_size; | ||
} | ||
|
||
ShapeType& ShapeType::operator =( | ||
const ShapeType& x) | ||
{ | ||
|
||
m_color = x.m_color; | ||
m_x = x.m_x; | ||
m_y = x.m_y; | ||
m_shape_size = x.m_shape_size; | ||
|
||
return *this; | ||
} | ||
|
||
ShapeType& ShapeType::operator =( | ||
ShapeType&& x) noexcept | ||
{ | ||
|
||
m_color = std::move(x.m_color); | ||
m_x = x.m_x; | ||
m_y = x.m_y; | ||
m_shape_size = x.m_shape_size; | ||
|
||
return *this; | ||
} | ||
|
||
bool ShapeType::operator ==( | ||
const ShapeType& x) const | ||
{ | ||
return (m_color == x.m_color && | ||
m_x == x.m_x && | ||
m_y == x.m_y && | ||
m_shape_size == x.m_shape_size); | ||
} | ||
|
||
bool ShapeType::operator !=( | ||
const ShapeType& x) const | ||
{ | ||
return !(*this == x); | ||
} | ||
|
||
/*! | ||
* @brief This function copies the value in member color | ||
* @param _color New value to be copied in member color | ||
*/ | ||
void ShapeType::color( | ||
const std::string& _color) | ||
{ | ||
m_color = _color; | ||
} | ||
|
||
/*! | ||
* @brief This function moves the value in member color | ||
* @param _color New value to be moved in member color | ||
*/ | ||
void ShapeType::color( | ||
std::string&& _color) | ||
{ | ||
m_color = std::move(_color); | ||
} | ||
|
||
/*! | ||
* @brief This function returns a constant reference to member color | ||
* @return Constant reference to member color | ||
*/ | ||
const std::string& ShapeType::color() const | ||
{ | ||
return m_color; | ||
} | ||
|
||
/*! | ||
* @brief This function returns a reference to member color | ||
* @return Reference to member color | ||
*/ | ||
std::string& ShapeType::color() | ||
{ | ||
return m_color; | ||
} | ||
|
||
|
||
/*! | ||
* @brief This function sets a value in member x | ||
* @param _x New value for member x | ||
*/ | ||
void ShapeType::x( | ||
int32_t _x) | ||
{ | ||
m_x = _x; | ||
} | ||
|
||
/*! | ||
* @brief This function returns the value of member x | ||
* @return Value of member x | ||
*/ | ||
int32_t ShapeType::x() const | ||
{ | ||
return m_x; | ||
} | ||
|
||
/*! | ||
* @brief This function returns a reference to member x | ||
* @return Reference to member x | ||
*/ | ||
int32_t& ShapeType::x() | ||
{ | ||
return m_x; | ||
} | ||
|
||
|
||
/*! | ||
* @brief This function sets a value in member y | ||
* @param _y New value for member y | ||
*/ | ||
void ShapeType::y( | ||
int32_t _y) | ||
{ | ||
m_y = _y; | ||
} | ||
|
||
/*! | ||
* @brief This function returns the value of member y | ||
* @return Value of member y | ||
*/ | ||
int32_t ShapeType::y() const | ||
{ | ||
return m_y; | ||
} | ||
|
||
/*! | ||
* @brief This function returns a reference to member y | ||
* @return Reference to member y | ||
*/ | ||
int32_t& ShapeType::y() | ||
{ | ||
return m_y; | ||
} | ||
|
||
|
||
/*! | ||
* @brief This function sets a value in member shape_size | ||
* @param _shape_size New value for member shape_size | ||
*/ | ||
void ShapeType::shape_size( | ||
int32_t _shape_size) | ||
{ | ||
m_shape_size = _shape_size; | ||
} | ||
|
||
/*! | ||
* @brief This function returns the value of member shape_size | ||
* @return Value of member shape_size | ||
*/ | ||
int32_t ShapeType::shape_size() const | ||
{ | ||
return m_shape_size; | ||
} | ||
|
||
/*! | ||
* @brief This function returns a reference to member shape_size | ||
* @return Reference to member shape_size | ||
*/ | ||
int32_t& ShapeType::shape_size() | ||
{ | ||
return m_shape_size; | ||
} | ||
|
||
|
||
// Include auxiliary functions like for serializing/deserializing. | ||
#include "ShapeCdrAux.ipp" |
Oops, something went wrong.