iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
builder.hpp File Reference

Go to the source code of this file.

Macros

#define IOX2_BUILDER_SWITCH(name)
 
#define IOX2_BUILDER_PARAMETER(type, name, defaultValue)
 
#define IOX2_BUILDER_OPTIONAL(type, name)
 

Macro Definition Documentation

◆ IOX2_BUILDER_OPTIONAL

#define IOX2_BUILDER_OPTIONAL (   type,
  name 
)
Value:
public: \
auto name(type const& value)&& -> decltype(auto) { \
m_##name = iox2::bb::Optional<type>(value); \
return std::move(*this); \
} \
\
auto name(type&& value)&& -> decltype(auto) { \
m_##name = iox2::bb::Optional<type>(std::move(value)); \
return std::move(*this); \
} \
\
private: \
iox2::bb::variation::Optional< T > Optional
Definition optional.hpp:25

Definition at line 47 of file builder.hpp.

◆ IOX2_BUILDER_PARAMETER

#define IOX2_BUILDER_PARAMETER (   type,
  name,
  defaultValue 
)
Value:
public: \
auto name(type const& value)&& noexcept -> decltype(auto) { \
m_##name = value; \
return std::move(*this); \
} \
\
auto name(type&& value)&& noexcept -> decltype(auto) { \
m_##name = std::move(value); \
return std::move(*this); \
} \
\
private: \
type m_##name { \
defaultValue \
}

Definition at line 30 of file builder.hpp.

◆ IOX2_BUILDER_SWITCH

#define IOX2_BUILDER_SWITCH (   name)
Value:
public: \
auto name()&& noexcept -> decltype(auto) { \
m_##name = true; \
return std::move(*this); \
} \
\
private: \
bool m_##name { false };

Definition at line 20 of file builder.hpp.