Skip to content

Commit 9f1e793

Browse files
elianalfEduPonz
authored andcommitted
Update fastrtps migrated headers (#318)
* Refs #20566: Change headers md5.h and SerializedPayload.h from fastrtps tp fastdds Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Refs #20566: Change header fixed_size_string Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Refs #20566: Change fixed_size_string namespace from fastrtps to fastcdr Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --------- Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
1 parent 83aa359 commit 9f1e793

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeaderv1.stg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ $endif$
3535

3636
$ctx.directIncludeDependencies : {include | #include "$include$.h"}; separator="\n"$
3737

38-
#include <fastrtps/utils/fixed_size_string.hpp>
39-
4038
#include <array>
4139
#include <bitset>
4240
#include <cstdint>
@@ -45,6 +43,8 @@ $ctx.directIncludeDependencies : {include | #include "$include$.h"}; separator="
4543
#include <string>
4644
#include <vector>
4745

46+
#include <fastcdr/cdr/fixed_size_string.hpp>
47+
4848
#if defined(_WIN32)
4949
#if defined(EPROSIMA_USER_DLL_EXPORT)
5050
#define eProsima_user_DllExport __declspec( dllexport )

src/main/java/com/eprosima/fastdds/idl/parser/typecode/StringTypeCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public String getCppTypename()
6565
{
6666
if (Kind.KIND_STRING == getKind() && isIsBounded() && ctx instanceof com.eprosima.fastcdr.idl.context.Context && ((com.eprosima.fastcdr.idl.context.Context)ctx).isCdrv1TemplatesEnabled())
6767
{
68-
return "eprosima::fastrtps::fixed_string<" + getMaxsize() + ">";
68+
return "eprosima::fastcdr::fixed_string<" + getMaxsize() + ">";
6969
}
7070

7171
return super.getCppTypename();

src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeHeader.stg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $fileHeader(ctx=ctx, file=[ctx.filename, "PubSubTypes.h"], description=["This h
2727
#include <fastdds/dds/topic/TopicDataType.hpp>
2828
#include <fastdds/rtps/common/InstanceHandle.h>
2929
#include <fastdds/rtps/common/SerializedPayload.h>
30-
#include <fastrtps/utils/md5.h>
30+
#include <fastdds/utils/md5.h>
3131

3232
#include "$ctx.filename$.h"
3333

src/main/java/com/eprosima/fastdds/idl/templates/SerializationSource.stg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,11 +1051,8 @@ external_suffix(p, external) ::= <<$p$$if(external)$->$else$.$endif$>>
10511051
cppTypenameBetweenCdrVersions(typecode) ::= <<
10521052
$if(typecode.isStringType && typecode.isBounded)$
10531053
$! Avoid error with namespace when generated fixed_string depending on CDR version !$
1054-
#if FASTCDR_VERSION_MAJOR == 1
1055-
eprosima::fastrtps::fixed_string<$typecode.maxsize$>
1056-
#else
10571054
eprosima::fastcdr::fixed_string<$typecode.maxsize$>
1058-
#endif
1055+
10591056

10601057
$else$
10611058
$typecode.cppTypename$

src/main/java/com/eprosima/fastdds/idl/templates/TypeObjectSource.stg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ namespace { char dummy; }
2626

2727
#include "$ctx.filename$.h"
2828
#include "$ctx.filename$TypeObject.h"
29+
2930
#include <mutex>
3031
#include <utility>
3132
#include <sstream>
33+
3234
#include <fastdds/rtps/common/CdrSerialization.hpp>
33-
#include <fastrtps/rtps/common/SerializedPayload.h>
34-
#include <fastrtps/utils/md5.h>
35+
#include <fastdds/rtps/common/SerializedPayload.h>
36+
#include <fastdds/utils/md5.h>
3537
#include <fastrtps/types/TypeObjectFactory.h>
3638
#include <fastrtps/types/TypeNamesGenerator.h>
3739
#include <fastrtps/types/AnnotationParameterValue.h>

0 commit comments

Comments
 (0)