Skip to content

Commit

Permalink
Uncomment sequence<boolean> types
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sanchez-Mateos <[email protected]>
  • Loading branch information
rsanchez15 committed Jun 27, 2023
1 parent 44b86da commit cd16d41
Show file tree
Hide file tree
Showing 8 changed files with 732 additions and 16 deletions.
230 changes: 226 additions & 4 deletions fastdds_python/test/types/test_complete.cxx

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions fastdds_python/test/types/test_complete.h
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,31 @@ class CompleteTestType
* @return Reference to member bounded_sequence_double_field
*/
eProsima_user_DllExport std::vector<double>& bounded_sequence_double_field();
/*!
* @brief This function copies the value in member bounded_sequence_bool_field
* @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field
*/
eProsima_user_DllExport void bounded_sequence_bool_field(
const std::vector<bool>& _bounded_sequence_bool_field);

/*!
* @brief This function moves the value in member bounded_sequence_bool_field
* @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field
*/
eProsima_user_DllExport void bounded_sequence_bool_field(
std::vector<bool>&& _bounded_sequence_bool_field);

/*!
* @brief This function returns a constant reference to member bounded_sequence_bool_field
* @return Constant reference to member bounded_sequence_bool_field
*/
eProsima_user_DllExport const std::vector<bool>& bounded_sequence_bool_field() const;

/*!
* @brief This function returns a reference to member bounded_sequence_bool_field
* @return Reference to member bounded_sequence_bool_field
*/
eProsima_user_DllExport std::vector<bool>& bounded_sequence_bool_field();
/*!
* @brief This function copies the value in member bounded_sequence_enum_field
* @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field
Expand Down Expand Up @@ -1806,6 +1831,31 @@ class CompleteTestType
* @return Reference to member unbounded_sequence_double_field
*/
eProsima_user_DllExport std::vector<double>& unbounded_sequence_double_field();
/*!
* @brief This function copies the value in member unbounded_sequence_bool_field
* @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field
*/
eProsima_user_DllExport void unbounded_sequence_bool_field(
const std::vector<bool>& _unbounded_sequence_bool_field);

/*!
* @brief This function moves the value in member unbounded_sequence_bool_field
* @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field
*/
eProsima_user_DllExport void unbounded_sequence_bool_field(
std::vector<bool>&& _unbounded_sequence_bool_field);

/*!
* @brief This function returns a constant reference to member unbounded_sequence_bool_field
* @return Constant reference to member unbounded_sequence_bool_field
*/
eProsima_user_DllExport const std::vector<bool>& unbounded_sequence_bool_field() const;

/*!
* @brief This function returns a reference to member unbounded_sequence_bool_field
* @return Reference to member unbounded_sequence_bool_field
*/
eProsima_user_DllExport std::vector<bool>& unbounded_sequence_bool_field();
/*!
* @brief This function copies the value in member unbounded_sequence_enum_field
* @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field
Expand Down Expand Up @@ -1980,6 +2030,7 @@ class CompleteTestType
std::vector<uint64_t> m_bounded_sequence_uint64_field;
std::vector<float> m_bounded_sequence_float_field;
std::vector<double> m_bounded_sequence_double_field;
std::vector<bool> m_bounded_sequence_bool_field;
std::vector<Color> m_bounded_sequence_enum_field;
std::vector<Material> m_bounded_sequence_enum2_field;
std::vector<StructType> m_bounded_sequence_struct_field;
Expand All @@ -1993,6 +2044,7 @@ class CompleteTestType
std::vector<uint64_t> m_unbounded_sequence_uint64_field;
std::vector<float> m_unbounded_sequence_float_field;
std::vector<double> m_unbounded_sequence_double_field;
std::vector<bool> m_unbounded_sequence_bool_field;
std::vector<Color> m_unbounded_sequence_enum_field;
std::vector<Material> m_unbounded_sequence_enum2_field;
std::vector<StructType> m_unbounded_sequence_struct_field;
Expand Down Expand Up @@ -2974,6 +3026,31 @@ class KeyedCompleteTestType
* @return Reference to member bounded_sequence_double_field
*/
eProsima_user_DllExport std::vector<double>& bounded_sequence_double_field();
/*!
* @brief This function copies the value in member bounded_sequence_bool_field
* @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field
*/
eProsima_user_DllExport void bounded_sequence_bool_field(
const std::vector<bool>& _bounded_sequence_bool_field);

/*!
* @brief This function moves the value in member bounded_sequence_bool_field
* @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field
*/
eProsima_user_DllExport void bounded_sequence_bool_field(
std::vector<bool>&& _bounded_sequence_bool_field);

/*!
* @brief This function returns a constant reference to member bounded_sequence_bool_field
* @return Constant reference to member bounded_sequence_bool_field
*/
eProsima_user_DllExport const std::vector<bool>& bounded_sequence_bool_field() const;

/*!
* @brief This function returns a reference to member bounded_sequence_bool_field
* @return Reference to member bounded_sequence_bool_field
*/
eProsima_user_DllExport std::vector<bool>& bounded_sequence_bool_field();
/*!
* @brief This function copies the value in member bounded_sequence_enum_field
* @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field
Expand Down Expand Up @@ -3299,6 +3376,31 @@ class KeyedCompleteTestType
* @return Reference to member unbounded_sequence_double_field
*/
eProsima_user_DllExport std::vector<double>& unbounded_sequence_double_field();
/*!
* @brief This function copies the value in member unbounded_sequence_bool_field
* @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field
*/
eProsima_user_DllExport void unbounded_sequence_bool_field(
const std::vector<bool>& _unbounded_sequence_bool_field);

/*!
* @brief This function moves the value in member unbounded_sequence_bool_field
* @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field
*/
eProsima_user_DllExport void unbounded_sequence_bool_field(
std::vector<bool>&& _unbounded_sequence_bool_field);

/*!
* @brief This function returns a constant reference to member unbounded_sequence_bool_field
* @return Constant reference to member unbounded_sequence_bool_field
*/
eProsima_user_DllExport const std::vector<bool>& unbounded_sequence_bool_field() const;

/*!
* @brief This function returns a reference to member unbounded_sequence_bool_field
* @return Reference to member unbounded_sequence_bool_field
*/
eProsima_user_DllExport std::vector<bool>& unbounded_sequence_bool_field();
/*!
* @brief This function copies the value in member unbounded_sequence_enum_field
* @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field
Expand Down Expand Up @@ -3474,6 +3576,7 @@ class KeyedCompleteTestType
std::vector<uint64_t> m_bounded_sequence_uint64_field;
std::vector<float> m_bounded_sequence_float_field;
std::vector<double> m_bounded_sequence_double_field;
std::vector<bool> m_bounded_sequence_bool_field;
std::vector<Color> m_bounded_sequence_enum_field;
std::vector<Material> m_bounded_sequence_enum2_field;
std::vector<StructType> m_bounded_sequence_struct_field;
Expand All @@ -3487,6 +3590,7 @@ class KeyedCompleteTestType
std::vector<uint64_t> m_unbounded_sequence_uint64_field;
std::vector<float> m_unbounded_sequence_float_field;
std::vector<double> m_unbounded_sequence_double_field;
std::vector<bool> m_unbounded_sequence_bool_field;
std::vector<Color> m_unbounded_sequence_enum_field;
std::vector<Material> m_unbounded_sequence_enum2_field;
std::vector<StructType> m_unbounded_sequence_struct_field;
Expand Down
32 changes: 32 additions & 0 deletions fastdds_python/test/types/test_complete.i
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,14 @@
}
}%template(double_vector) std::vector<double>;

%ignore CompleteTestType::bounded_sequence_bool_field(std::vector<bool>&&);

// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
%ignore CompleteTestType::bounded_sequence_bool_field() const;
%template(bool_vector) std::vector<bool>;

%ignore CompleteTestType::bounded_sequence_enum_field(std::vector<Color>&&);

// Overloaded getter methods shadow each other and are equivalent in python
Expand Down Expand Up @@ -836,6 +844,14 @@
}
}%template(double_vector) std::vector<double>;

%ignore CompleteTestType::unbounded_sequence_bool_field(std::vector<bool>&&);

// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
%ignore CompleteTestType::unbounded_sequence_bool_field() const;
%template(bool_vector) std::vector<bool>;

%ignore CompleteTestType::unbounded_sequence_enum_field(std::vector<Color>&&);

// Overloaded getter methods shadow each other and are equivalent in python
Expand Down Expand Up @@ -1356,6 +1372,14 @@
}
}%template(double_vector) std::vector<double>;

%ignore KeyedCompleteTestType::bounded_sequence_bool_field(std::vector<bool>&&);

// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
%ignore KeyedCompleteTestType::bounded_sequence_bool_field() const;
%template(bool_vector) std::vector<bool>;

%ignore KeyedCompleteTestType::bounded_sequence_enum_field(std::vector<Color>&&);

// Overloaded getter methods shadow each other and are equivalent in python
Expand Down Expand Up @@ -1532,6 +1556,14 @@
}
}%template(double_vector) std::vector<double>;

%ignore KeyedCompleteTestType::unbounded_sequence_bool_field(std::vector<bool>&&);

// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
%ignore KeyedCompleteTestType::unbounded_sequence_bool_field() const;
%template(bool_vector) std::vector<bool>;

%ignore KeyedCompleteTestType::unbounded_sequence_enum_field(std::vector<Color>&&);

// Overloaded getter methods shadow each other and are equivalent in python
Expand Down
8 changes: 4 additions & 4 deletions fastdds_python/test/types/test_complete.idl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct CompleteTestType
sequence<float, max_seq_size> bounded_sequence_float_field;
sequence<double, max_seq_size> bounded_sequence_double_field;
//sequence<long double, max_seq_size> bounded_sequence_long_double_field;
//sequence<boolean, max_seq_size> bounded_sequence_bool_field;
sequence<boolean, max_seq_size> bounded_sequence_bool_field;
//sequence<string, max_seq_size> bounded_sequence_string_field;
sequence<Color, max_seq_size> bounded_sequence_enum_field;
sequence<Material, max_seq_size> bounded_sequence_enum2_field;
Expand All @@ -109,7 +109,7 @@ struct CompleteTestType
sequence<float> unbounded_sequence_float_field;
sequence<double> unbounded_sequence_double_field;
//sequence<long double> unbounded_sequence_long_double_field;
//sequence<boolean> unbounded_sequence_bool_field;
sequence<boolean> unbounded_sequence_bool_field;
//sequence<string> unbounded_sequence_string_field;
sequence<Color> unbounded_sequence_enum_field;
sequence<Material> unbounded_sequence_enum2_field;
Expand Down Expand Up @@ -169,7 +169,7 @@ struct KeyedCompleteTestType
sequence<float, max_seq_size> bounded_sequence_float_field;
sequence<double, max_seq_size> bounded_sequence_double_field;
//sequence<long double, max_seq_size> bounded_sequence_long_double_field;
//sequence<boolean, max_seq_size> bounded_sequence_bool_field;
sequence<boolean, max_seq_size> bounded_sequence_bool_field;
//sequence<string, max_seq_size> bounded_sequence_string_field;
sequence<Color, max_seq_size> bounded_sequence_enum_field;
sequence<Material, max_seq_size> bounded_sequence_enum2_field;
Expand All @@ -187,7 +187,7 @@ struct KeyedCompleteTestType
sequence<float> unbounded_sequence_float_field;
sequence<double> unbounded_sequence_double_field;
//sequence<long double> unbounded_sequence_long_double_field;
//sequence<boolean> unbounded_sequence_bool_field;
sequence<boolean> unbounded_sequence_bool_field;
//sequence<string> unbounded_sequence_string_field;
sequence<Color> unbounded_sequence_enum_field;
sequence<Material> unbounded_sequence_enum2_field;
Expand Down
Loading

0 comments on commit cd16d41

Please sign in to comment.