Skip to content

Commit

Permalink
Merge pull request #2062 from eclipse-iceoryx/iox-1391-move-dust-head…
Browse files Browse the repository at this point in the history
…er-from-legacy-path-to-module-path-part-1

iox-#1391 Move dust header from legacy path to module path part 1
  • Loading branch information
elBoberido authored Nov 1, 2023
2 parents 65f583b + b009fae commit c02b611
Show file tree
Hide file tree
Showing 92 changed files with 310 additions and 301 deletions.
2 changes: 1 addition & 1 deletion doc/shared-memory-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Memory chunks are returned to the pool once all attached consumers indicate they
As already discussed, shared memory segments may be mapped to different memory areas in the virtual address space of a
process.
To deal with this, iceoryx utilizes specialized pointer types: the `iox::RelativePointer` and
the `iox::memory::relocatable_ptr`.
the `iox::relocatable_ptr`.

Using these types, the difference in memory mapping is not a factor when it comes to locating a memory chunk.

Expand Down
15 changes: 8 additions & 7 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,8 @@
// before
#include "iceoryx_hoofs/cxx/forward_list.hpp"

#include "iceoryx_dust/cxx/forward_list.hpp"
// after
#include "iox/forward_list.hpp"
```

```cpp
Expand All @@ -963,15 +964,15 @@
#include "iceoryx_hoofs/internal/cxx/static_storage.hpp"

// after
#include "iceoryx_dust/internal/cxx/static_storage.hpp"
#include "iox/static_storage.hpp"
```

```cpp
// before
#include "iceoryx_hoofs/internal/file_reader/file_reader.hpp"

// after
#include "iceoryx_dust/cxx/file_reader.hpp"
#include "iox/file_reader.hpp"
```

```cpp
Expand All @@ -987,7 +988,7 @@
#include "iceoryx_hoofs/internal/relocatable_pointer/relocatable_ptr.hpp"

// after
#include "iceoryx_dust/relocatable_pointer/relocatable_ptr.hpp"
#include "iox/relocatable_ptr.hpp"
```

```cpp
Expand Down Expand Up @@ -1041,7 +1042,7 @@
std::string myConvertedIoxString = static_cast<std::string>(myIoxString);

// after
#include "iceoryx_dust/cxx/std_string_support.hpp"
#include "iox/std_string_support.hpp"

std::string myStdString("foo");
// std::string to iox::string with truncation when source string exceeds capacity
Expand All @@ -1065,7 +1066,7 @@
}

// after
#include "iceoryx_dust/cxx/std_string_support.hpp"
#include "iox/std_string_support.hpp"

std::string myStdString("foo");
iox::string<3> myIoxString("foo");
Expand Down Expand Up @@ -1125,7 +1126,7 @@
iox::units::Duration ioxDuration(chronoDuration);

// after
#include "iceoryx_dust/cxx/std_chrono_support.hpp"
#include "iox/std_chrono_support.hpp"

std::chrono::milliseconds chronoDuration = 1_ms;
iox::units::Duration ioxDuration{into<iox::units::Duration>(chronoDuration)};
Expand Down
8 changes: 7 additions & 1 deletion iceoryx_dust/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ configure_file(
cc_library(
name = "iceoryx_dust",
srcs = glob([
"cli/source/**/*.cpp",
"filesystem/source/**/*.cpp",
"source/**/*.cpp",
"source/**/*.hpp",
]),
hdrs = glob(["include/**"]) + glob(["container/**"]) + glob(["vocabulary/**"]) + [
hdrs = glob(["include/**"]) + glob(["cli/**"]) + glob(["container/**"]) + glob(["filesystem/**"]) + glob(["memory/**"]) + glob(["utility/**"]) + glob(["vocabulary/**"]) + [
":iceoryx_dust_deployment_hpp",
],
includes = [
"cli/include/",
"container/include/",
"filesystem/include/",
"include",
"memory/include/",
"utility/include/",
"vocabulary/include/",
],
visibility = ["//visibility:public"],
Expand Down
20 changes: 14 additions & 6 deletions iceoryx_dust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,28 @@ iox_add_library(
PRIVATE_LIBS_LINUX ${CODE_COVERAGE_LIBS}
PUBLIC_LIBS iceoryx_hoofs::iceoryx_hoofs
BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/cli/include
${PROJECT_SOURCE_DIR}/container/include
${PROJECT_SOURCE_DIR}/filesystem/include
${PROJECT_SOURCE_DIR}/memory/include
${PROJECT_SOURCE_DIR}/utility/include
${PROJECT_SOURCE_DIR}/vocabulary/include
${CMAKE_BINARY_DIR}/generated/iceoryx_dust/include
INSTALL_INTERFACE include/${PREFIX}
EXPORT_INCLUDE_DIRS include/
cli/include/
container/include/
filesystem/include/
memory/include/
utility/include/
vocabulary/include/
FILES
source/cli/arguments.cpp
source/cli/command_line_parser.cpp
source/cli/option.cpp
source/cli/option_definition.cpp
source/cli/option_manager.cpp
source/cxx/file_reader.cpp
cli/source/arguments.cpp
cli/source/command_line_parser.cpp
cli/source/option.cpp
cli/source/option_definition.cpp
cli/source/option_manager.cpp
filesystem/source/file_reader.cpp
source/posix_wrapper/named_pipe.cpp
source/posix_wrapper/signal_watcher.cpp
source/posix_wrapper/message_queue.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@
#ifndef IOX_DUST_CLI_ARGUMENTS_HPP
#define IOX_DUST_CLI_ARGUMENTS_HPP

#include "iceoryx_dust/cli/types.hpp"
#include "iceoryx_dust/cxx/convert.hpp"
#include "iceoryx_dust/internal/cli/option.hpp"
#include "iox/cli/option.hpp"
#include "iox/cli/types.hpp"
#include "iox/expected.hpp"
#include "iox/vector.hpp"

namespace iox
{
namespace cli
{
namespace internal
{
/// @brief This class provides access to the command line argument values.
/// When constructed with the default constructor it is empty. Calling
/// CommandLineParser::parse creates and returns a populated Arguments
/// object.
/// This class should never be used directly. Use the CommandLine builder
/// from 'iceoryx_hoofs/cxx/command_line_argument_definition.hpp' to create a struct which contains
/// from 'iox/cli_definition.hpp' to create a struct which contains
/// the values.
class Arguments
{
Expand Down Expand Up @@ -69,9 +67,9 @@ class Arguments
const char* m_binaryName;
vector<Option, MAX_NUMBER_OF_ARGUMENTS> m_arguments;
};
} // namespace internal
} // namespace cli
} // namespace iox

#include "iceoryx_dust/internal/cli/arguments.inl"
#endif
#include "iox/cli/arguments.inl"

#endif // IOX_DUST_CLI_ARGUMENTS_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_DUST_CLI_COMMAND_LINE_OPTION_VALUE_INL
#define IOX_DUST_CLI_COMMAND_LINE_OPTION_VALUE_INL

#include "iceoryx_dust/internal/cli/arguments.hpp"
#ifndef IOX_DUST_CLI_CLI_DEFINITION_INL
#define IOX_DUST_CLI_CLI_DEFINITION_INL

#include "iox/cli/arguments.hpp"

namespace iox
{
namespace cli
{
namespace internal
{
template <typename T>
inline expected<T, Arguments::Error> Arguments::convertFromString(const Argument_t& stringValue) const noexcept
{
Expand Down Expand Up @@ -61,8 +60,7 @@ inline expected<T, Arguments::Error> Arguments::get(const OptionName_t& optionNa

return err(Error::NO_SUCH_VALUE);
}
} // namespace internal
} // namespace cli
} // namespace iox

#endif
#endif // IOX_DUST_CLI_CLI_DEFINITION_INL
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
#ifndef IOX_DUST_CLI_COMMAND_PARSER_HPP
#define IOX_DUST_CLI_COMMAND_PARSER_HPP

#include "iceoryx_dust/internal/cli/arguments.hpp"
#include "iceoryx_dust/internal/cli/option_definition.hpp"
#include "iox/cli/arguments.hpp"
#include "iox/cli/option_definition.hpp"
#include <cstdint>

namespace iox
{
namespace cli
{
namespace internal
{
/// @brief Factory class for the CommandLineOption. First, one has to register
/// all switches and options before calling parse. This is required for
/// the help page which is generated and printed on failure as well as
Expand Down Expand Up @@ -89,8 +87,7 @@ Arguments parseCommandLineArguments(const OptionDefinition& optionSet,
char* argv[],
const uint64_t argcOffset = 1U) noexcept;

} // namespace internal
} // namespace cli
} // namespace iox

#endif
#endif // IOX_DUST_CLI_COMMAND_PARSER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
#ifndef IOX_DUST_CLI_OPTION_HPP
#define IOX_DUST_CLI_OPTION_HPP

#include "iceoryx_dust/cli/types.hpp"
#include "iox/cli/types.hpp"

namespace iox
{
namespace cli
{
namespace internal
{
/// @brief Represents a command line option
struct Option
{
Expand Down Expand Up @@ -96,7 +94,7 @@ struct OptionWithDetails : public Option // can this be melt together
TypeName_t typeName;
} details;
};
} // namespace internal
} // namespace cli
} // namespace iox
#endif

#endif // IOX_DUST_CLI_OPTION_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#ifndef IOX_DUST_CLI_OPTION_DEFINITION_HPP
#define IOX_DUST_CLI_OPTION_DEFINITION_HPP

#include "iceoryx_dust/cli/types.hpp"
#include "iceoryx_dust/internal/cli/arguments.hpp"
#include "iox/cli/arguments.hpp"
#include "iox/cli/types.hpp"
#include "iox/function.hpp"
#include "iox/vector.hpp"
#include <cstdint>
Expand All @@ -27,8 +27,6 @@ namespace iox
{
namespace cli
{
namespace internal
{
/// @brief A set of options which is provided to the CommandLineParser.
/// Description, short and long name as well as type and value can be defined for every
/// command line option which the application provides.
Expand Down Expand Up @@ -94,8 +92,7 @@ class OptionDefinition
};

std::ostream& operator<<(std::ostream& stream, const OptionWithDetails& value) noexcept;
} // namespace internal
} // namespace cli
} // namespace iox

#endif
#endif // IOX_DUST_CLI_OPTION_DEFINITION_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,20 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_DUST_CLI_OPTION_MANAGER_HPP
#define IOX_DUST_CLI_OPTION_MANAGER_HPP

#include "iceoryx_dust/cxx/std_string_support.hpp"
#include "iceoryx_dust/internal/cli/command_line_parser.hpp"
#include "iceoryx_dust/internal/cli/option_definition.hpp"
#include "iox/cli/command_line_parser.hpp"
#include "iox/cli/option_definition.hpp"
#include "iox/function.hpp"
#include "iox/std_string_support.hpp"
#include "iox/vector.hpp"

namespace iox
{
namespace cli
{
namespace internal
{
using CmdAssignments_t = vector<function<void(Arguments&)>, MAX_NUMBER_OF_ARGUMENTS>;

/// @brief Manages command line options which were defined via the IOX_CLI_ macros in a
Expand Down Expand Up @@ -82,9 +81,9 @@ class OptionManager
const OptionType optionType);
};

} // namespace internal
} // namespace cli
} // namespace iox

#include "iceoryx_dust/internal/cli/option_manager.inl"
#endif
#include "iox/cli/option_manager.inl"

#endif // IOX_DUST_CLI_OPTION_MANAGER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
#ifndef IOX_DUST_CLI_OPTION_MANAGER_INL
#define IOX_DUST_CLI_OPTION_MANAGER_INL

#include "iceoryx_dust/internal/cli/option_manager.hpp"
#include "iox/cli/option_manager.hpp"

namespace iox
{
namespace cli
{
namespace internal
{
template <typename T>
inline T OptionManager::extractOptionArgumentValue(const Arguments& arguments,
const char shortName,
Expand Down Expand Up @@ -73,8 +71,7 @@ inline T OptionManager::defineOption(T& referenceToMember,

return defaultArgumentValue;
}
} // namespace internal
} // namespace cli
} // namespace iox

#endif
#endif // IOX_DUST_CLI_OPTION_MANAGER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ using TypeName_t = string<MAX_TYPE_NAME_LENGTH>;

} // namespace cli
} // namespace iox
#endif

#endif // IOX_DUST_CLI_TYPES_HPP
Loading

0 comments on commit c02b611

Please sign in to comment.