Skip to content

Commit

Permalink
Remove fixed_size_string file in fastrtps (#4269)
Browse files Browse the repository at this point in the history
* Refs #20392: Remove fastrtps fixed_size_string lib

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Update tests dependencies

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Update namespace fastcdr

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Reorder libraries to follow google style order

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Remove include of unused fixed_size_string

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Remove deprecated tests of fixed_size_string

Signed-off-by: elianalf <[email protected]>

* Refs #20392: Uncrustify

Signed-off-by: elianalf <[email protected]>

---------

Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf authored and richiprosima committed Mar 9, 2024
1 parent ca96ee1 commit 59f9758
Show file tree
Hide file tree
Showing 129 changed files with 10,255 additions and 11,122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
#ifndef _FAST_DDS_GENERATED_ADVANCEDCONFIGURATION_H_
#define _FAST_DDS_GENERATED_ADVANCEDCONFIGURATION_H_


#include <fastrtps/utils/fixed_size_string.hpp>

#include <array>
#include <bitset>
#include <cstdint>
Expand All @@ -37,6 +34,7 @@
#include <string>
#include <vector>


#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
Expand Down Expand Up @@ -208,11 +206,11 @@ class AdvancedConfiguration


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -246,18 +244,17 @@ class AdvancedConfiguration


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint32_t m_index;
Expand Down
1 change: 0 additions & 1 deletion examples/cpp/dds/BasicConfigurationExample/HelloWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>

Expand Down
23 changes: 11 additions & 12 deletions examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define _FAST_DDS_GENERATED_HELLOWORLD_H_


#include <fastrtps/utils/fixed_size_string.hpp>
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <array>
#include <bitset>
Expand Down Expand Up @@ -179,11 +179,11 @@ class HelloWorld


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -217,18 +217,17 @@ class HelloWorld


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint32_t m_index;
Expand Down
23 changes: 11 additions & 12 deletions examples/cpp/dds/Configurability/samplev1.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define _FAST_DDS_GENERATED_SAMPLE_H_


#include <fastrtps/utils/fixed_size_string.hpp>
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <array>
#include <bitset>
Expand Down Expand Up @@ -172,11 +172,11 @@ class sample


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -210,18 +210,17 @@ class sample


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint8_t m_index;
Expand Down
1 change: 0 additions & 1 deletion examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>

Expand Down
24 changes: 11 additions & 13 deletions examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_
#define _FAST_DDS_GENERATED_HELLOWORLD_H_


#include <fastrtps/utils/fixed_size_string.hpp>
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <array>
#include <bitset>
Expand Down Expand Up @@ -179,11 +178,11 @@ class HelloWorld


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -217,18 +216,17 @@ class HelloWorld


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint32_t m_index;
Expand Down
23 changes: 11 additions & 12 deletions examples/cpp/dds/CustomListenerExample/Topicv1.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define _FAST_DDS_GENERATED_TOPIC_H_


#include <fastrtps/utils/fixed_size_string.hpp>
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <array>
#include <bitset>
Expand Down Expand Up @@ -179,11 +179,11 @@ class Topic


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -217,18 +217,17 @@ class Topic


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint32_t m_index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>

Expand Down
23 changes: 11 additions & 12 deletions examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_


#include <fastrtps/utils/fixed_size_string.hpp>
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <array>
#include <bitset>
Expand Down Expand Up @@ -179,11 +179,11 @@ class CustomPayloadPoolData


/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down Expand Up @@ -217,18 +217,17 @@ class CustomPayloadPoolData


/*!
* @brief This function tells you if the Key has been defined for this type
*/
* @brief This function tells you if the Key has been defined for this type
*/
eProsima_user_DllExport static bool isKeyDefined();

/*!
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
* @brief This function serializes the key members of an object using CDR serialization.
* @param cdr CDR serialization object.
*/
eProsima_user_DllExport void serializeKey(
eprosima::fastcdr::Cdr& cdr) const;


private:

uint32_t m_index;
Expand Down
14 changes: 7 additions & 7 deletions examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ void HelloMsg::serializeKey(
eprosima::fastcdr::Cdr& scdr) const
{
(void) scdr;

scdr << m_deadlinekey;


}

/*!
Expand Down Expand Up @@ -255,7 +255,7 @@ uint16_t& HelloMsg::deadlinekey()
* @param _payload New value to be copied in member payload
*/
void HelloMsg::payload(
const eprosima::fastrtps::fixed_string<256>& _payload)
const eprosima::fastcdr::fixed_string<256>& _payload)
{
m_payload = _payload;
}
Expand All @@ -265,7 +265,7 @@ void HelloMsg::payload(
* @param _payload New value to be moved in member payload
*/
void HelloMsg::payload(
eprosima::fastrtps::fixed_string<256>&& _payload)
eprosima::fastcdr::fixed_string<256>&& _payload)
{
m_payload = std::move(_payload);
}
Expand All @@ -274,7 +274,7 @@ void HelloMsg::payload(
* @brief This function returns a constant reference to member payload
* @return Constant reference to member payload
*/
const eprosima::fastrtps::fixed_string<256>& HelloMsg::payload() const
const eprosima::fastcdr::fixed_string<256>& HelloMsg::payload() const
{
return m_payload;
}
Expand All @@ -283,7 +283,7 @@ const eprosima::fastrtps::fixed_string<256>& HelloMsg::payload() const
* @brief This function returns a reference to member payload
* @return Reference to member payload
*/
eprosima::fastrtps::fixed_string<256>& HelloMsg::payload()
eprosima::fastcdr::fixed_string<256>& HelloMsg::payload()
{
return m_payload;
}
Expand Down
Loading

0 comments on commit 59f9758

Please sign in to comment.