File tree 5 files changed +13
-14
lines changed
examples/cpp/dds/HelloWorldExampleDataSharing
5 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ uint32_t& HelloWorld::index()
126
126
* @param _message New value to be copied in member message
127
127
*/
128
128
void HelloWorld::message (
129
- const std::string & _message)
129
+ const eprosima::fastcdr::fixed_string< 20 > & _message)
130
130
{
131
131
m_message = _message;
132
132
}
@@ -136,7 +136,7 @@ void HelloWorld::message(
136
136
* @param _message New value to be moved in member message
137
137
*/
138
138
void HelloWorld::message (
139
- std::string && _message)
139
+ eprosima::fastcdr::fixed_string< 20 > && _message)
140
140
{
141
141
m_message = std::move (_message);
142
142
}
@@ -145,7 +145,7 @@ void HelloWorld::message(
145
145
* @brief This function returns a constant reference to member message
146
146
* @return Constant reference to member message
147
147
*/
148
- const std::string & HelloWorld::message () const
148
+ const eprosima::fastcdr::fixed_string< 20 > & HelloWorld::message () const
149
149
{
150
150
return m_message;
151
151
}
@@ -154,7 +154,7 @@ const std::string& HelloWorld::message() const
154
154
* @brief This function returns a reference to member message
155
155
* @return Reference to member message
156
156
*/
157
- std::string & HelloWorld::message ()
157
+ eprosima::fastcdr::fixed_string< 20 > & HelloWorld::message ()
158
158
{
159
159
return m_message;
160
160
}
Original file line number Diff line number Diff line change @@ -152,32 +152,31 @@ class HelloWorld
152
152
* @param _message New value to be copied in member message
153
153
*/
154
154
eProsima_user_DllExport void message (
155
- const std::string & _message);
155
+ const eprosima::fastcdr::fixed_string< 20 > & _message);
156
156
157
157
/* !
158
158
* @brief This function moves the value in member message
159
159
* @param _message New value to be moved in member message
160
160
*/
161
161
eProsima_user_DllExport void message (
162
- std::string && _message);
162
+ eprosima::fastcdr::fixed_string< 20 > && _message);
163
163
164
164
/* !
165
165
* @brief This function returns a constant reference to member message
166
166
* @return Constant reference to member message
167
167
*/
168
- eProsima_user_DllExport const std::string & message () const ;
168
+ eProsima_user_DllExport const eprosima::fastcdr::fixed_string< 20 > & message () const ;
169
169
170
170
/* !
171
171
* @brief This function returns a reference to member message
172
172
* @return Reference to member message
173
173
*/
174
- eProsima_user_DllExport std::string & message ();
174
+ eProsima_user_DllExport eprosima::fastcdr::fixed_string< 20 > & message ();
175
175
176
176
private:
177
177
178
178
uint32_t m_index{0 };
179
- std::string m_message;
180
-
179
+ eprosima::fastcdr::fixed_string<20 > m_message;
181
180
};
182
181
183
182
#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_
Original file line number Diff line number Diff line change 1
1
struct HelloWorld
2
2
{
3
3
unsigned long index;
4
- string message;
4
+ string<20> message;
5
5
};
Original file line number Diff line number Diff line change 24
24
25
25
#include " HelloWorld.h"
26
26
27
- constexpr uint32_t HelloWorld_max_cdr_typesize {268UL };
27
+ constexpr uint32_t HelloWorld_max_cdr_typesize {33UL };
28
28
constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL };
29
29
30
30
@@ -42,4 +42,4 @@ eProsima_user_DllExport void serialize_key(
42
42
} // namespace fastcdr
43
43
} // namespace eprosima
44
44
45
- #endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_
45
+ #endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType
91
91
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
92
92
eProsima_user_DllExport inline bool is_bounded () const override
93
93
{
94
- return false ;
94
+ return true ;
95
95
}
96
96
97
97
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
You can’t perform that action at this time.
0 commit comments