class KeyValueVisitorHelper: public boost::static_visitor< >
{
public:
- KeyValueVisitorHelper(VISITOR& visitor) :
+ KeyValueVisitorHelper(VISITOR& visitor) noexcept :
m_visitor( visitor )
{
}
*
* @return Identifier of type.
*/
- TypeId getId() const;
+ TypeId getId() const noexcept;
/**
* Factory method to create Type instance from T.
* @see is_supported_type
*/
template < typename T >
- static Type typeOf(const T& value)
+ static Type typeOf(const T& value) noexcept
{
return Type(value);
}
//! @cond
- friend bool operator==(const Type&, const Type&);
+ friend bool operator==(const Type&, const Type&) noexcept;
//! @endcond
private:
template < typename T >
- explicit Type(const T&) :
+ explicit Type(const T&) noexcept :
m_which{ IndexOfType< T >::value }
{
}
Value();
Value(const Value&);
- Value(Value&&);
+ Value(Value&&) noexcept;
/**
* Constructs a Value if T is a supported type.<br/>
/**
* Exchanges the content of the object by the content of the parameter.
*/
- void swap(Value&);
+ void swap(Value&) noexcept;
//! @cond
friend class RCSResourceAttributes;
/**
* Returns an {@link iterator} referring to the first element.
*/
- iterator begin();
+ iterator begin() noexcept;
/**
* Returns an {@link iterator} referring to the <i>past-the-end element</i>.
*/
- iterator end();
+ iterator end() noexcept;
/**
* @copydoc cbegin()
*/
- const_iterator begin() const;
+ const_iterator begin() const noexcept;
/**
* @copydoc cend()
*/
- const_iterator end() const;
+ const_iterator end() const noexcept;
/**
* Returns a const_iterator referring to the first element.
*/
- const_iterator cbegin() const;
+ const_iterator cbegin() const noexcept;
/**
* Returns a const_iterator referring to the <i>past-the-end element</i>.
*/
- const_iterator cend() const;
+ const_iterator cend() const noexcept;
/**
* Accesses a value.
/**
* Removes all elements.
*/
- void clear();
+ void clear() noexcept;
/**
* Removes a single element.
*
* @see size
*/
- bool empty() const;
+ bool empty() const noexcept;
/**
* Returns the number of elements.
*
* @see empty
*/
- size_t size() const;
+ size_t size() const noexcept;
private:
template< typename VISITOR >
*
* @return true if the objects are equal, false otherwise.
*/
- bool operator==(const RCSResourceAttributes::Type&, const RCSResourceAttributes::Type&);
+ bool operator==(const RCSResourceAttributes::Type&, const RCSResourceAttributes::Type&)
+ noexcept;
/**
* @relates RCSResourceAttributes::Type
*
* @return true if the objects are not equal, false otherwise.
*/
- bool operator!=(const RCSResourceAttributes::Type&, const RCSResourceAttributes::Type&);
+ bool operator!=(const RCSResourceAttributes::Type&, const RCSResourceAttributes::Type&)
+ noexcept;
/**
* @relates RCSResourceAttributes::Value
class KeyVisitor: public boost::static_visitor< const std::string& >
{
public:
- result_type operator()(iterator*) const;
- result_type operator()(const_iterator*) const;
+ result_type operator()(iterator*) const noexcept;
+ result_type operator()(const_iterator*) const noexcept;
};
class ValueVisitor: public boost::static_visitor< Value& >
{
public:
- result_type operator()(iterator*);
+ result_type operator()(iterator*) noexcept;
result_type operator()(const_iterator*);
};
class ConstValueVisitor: public boost::static_visitor< const Value& >
{
public:
- result_type operator()(iterator*) const;
- result_type operator()(const_iterator*) const;
+ result_type operator()(iterator*) const noexcept;
+ result_type operator()(const_iterator*) const noexcept;
};
public:
- const std::string& key() const;
- const RCSResourceAttributes::Value& value() const;
+ const std::string& key() const noexcept;
+ const RCSResourceAttributes::Value& value() const noexcept;
RCSResourceAttributes::Value& value();
private:
KeyValuePair(const KeyValuePair&) = default;
- KeyValuePair(boost::variant< iterator*, const_iterator* >&&);
+ KeyValuePair(boost::variant< iterator*, const_iterator* >&&) noexcept;
KeyValuePair& operator=(const KeyValuePair&) = default;
template< >
struct TypeInfoConverter< std::nullptr_t >
{
- static constexpr RCSResourceAttributes::TypeId typeId = RCSResourceAttributes::TypeId::NULL_T;
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::NULL_T;
};
template< >
struct TypeInfoConverter< double >
{
- static constexpr RCSResourceAttributes::TypeId typeId = RCSResourceAttributes::TypeId::DOUBLE;
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::DOUBLE;
};
template< >
template< >
struct TypeInfoConverter< std::string >
{
- static constexpr RCSResourceAttributes::TypeId typeId = RCSResourceAttributes::TypeId::STRING;
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::STRING;
};
template< >
struct TypeInfoConverter< RCSResourceAttributes >
{
- static constexpr RCSResourceAttributes::TypeId typeId = RCSResourceAttributes::TypeId::ATTRIBUTES;
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::ATTRIBUTES;
};
struct TypeInfo
};
template< typename VARIANT, int POS >
- constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >)
+ constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
{
auto&& vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ });
vec.push_back(TypeInfo::get< VARIANT, POS >());
}
template< typename VARIANT >
- constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >)
+ constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
{
return { TypeInfo::get< VARIANT, 0 >() };
}
template< typename VARIANT >
- inline TypeInfo getTypeInfo(int which)
+ inline TypeInfo getTypeInfo(int which) noexcept
{
static constexpr int variantEnd = boost::mpl::size< typename VARIANT::types >::value - 1;
static const std::vector< TypeInfo > typeInfos = getTypeInfo< VARIANT >(
return *m_valueRef.m_data == *rhs.m_valueRef.m_data;
}
- bool operator==(const RCSResourceAttributes::Type& lhs, const RCSResourceAttributes::Type& rhs)
+ bool operator==(const RCSResourceAttributes::Type& lhs,
+ const RCSResourceAttributes::Type& rhs) noexcept
{
return lhs.m_which == rhs.m_which;
}
- bool operator!=(const RCSResourceAttributes::Type& lhs, const RCSResourceAttributes::Type& rhs)
+ bool operator!=(const RCSResourceAttributes::Type& lhs,
+ const RCSResourceAttributes::Type& rhs) noexcept
{
return !(lhs == rhs);
}
return !(lhs == rhs);
}
- auto RCSResourceAttributes::Type::getId() const -> TypeId
+ auto RCSResourceAttributes::Type::getId() const noexcept -> TypeId
{
return ::getTypeInfo< ValueVariant >(m_which).typeId;
}
{
}
- RCSResourceAttributes::Value::Value(Value&& from) :
+ RCSResourceAttributes::Value::Value(Value&& from) noexcept :
m_data{ new ValueVariant{} }
{
- m_data->swap(*from.m_data);
+ m_data.swap(from.m_data);
}
RCSResourceAttributes::Value::Value(const char* value) :
return boost::apply_visitor(ToStringVisitor(), *m_data);
}
- void RCSResourceAttributes::Value::swap(Value& rhs)
+ void RCSResourceAttributes::Value::swap(Value& rhs) noexcept
{
m_data.swap(rhs.m_data);
}
auto RCSResourceAttributes::KeyValuePair::KeyVisitor::operator()(
- iterator* iter) const -> result_type
+ iterator* iter) const noexcept -> result_type
{
return iter->m_cur->first;
}
auto RCSResourceAttributes::KeyValuePair::KeyVisitor::operator()(
- const_iterator* iter) const -> result_type
+ const_iterator* iter) const noexcept -> result_type
{
return iter->m_cur->first;
}
- auto RCSResourceAttributes::KeyValuePair::ValueVisitor::operator() (iterator* iter)
+ auto RCSResourceAttributes::KeyValuePair::ValueVisitor::operator() (iterator* iter) noexcept
-> result_type
{
return iter->m_cur->second;
}
auto RCSResourceAttributes::KeyValuePair::ConstValueVisitor::operator()(
- iterator*iter) const -> result_type
+ iterator*iter) const noexcept -> result_type
{
return iter->m_cur->second;
}
auto RCSResourceAttributes::KeyValuePair::ConstValueVisitor::operator()(
- const_iterator* iter) const -> result_type
+ const_iterator* iter) const noexcept -> result_type
{
return iter->m_cur->second;
}
- auto RCSResourceAttributes::KeyValuePair::key() const -> const std::string&
+ auto RCSResourceAttributes::KeyValuePair::key() const noexcept -> const std::string&
{
return boost::apply_visitor(m_keyVisitor, m_iterRef);
}
- auto RCSResourceAttributes::KeyValuePair::value() const -> const Value&
+ auto RCSResourceAttributes::KeyValuePair::value() const noexcept -> const Value&
{
return boost::apply_visitor(m_constValueVisitor, m_iterRef);
}
}
RCSResourceAttributes::KeyValuePair::KeyValuePair(boost::variant<iterator*,
- const_iterator*>&& ref) :
+ const_iterator*>&& ref) noexcept :
m_iterRef{ ref }
{
}
{
}
- auto RCSResourceAttributes::const_iterator::operator=(const RCSResourceAttributes::iterator& iter)
- -> const_iterator& {
+ auto RCSResourceAttributes::const_iterator::operator=(
+ const RCSResourceAttributes::iterator& iter) -> const_iterator&
+ {
m_cur = iter.m_cur;
return *this;
}
{
return m_keyValuePair;
}
+
auto RCSResourceAttributes::const_iterator::operator->() const -> pointer
{
return &m_keyValuePair;
return !(*this == rhs);
}
- auto RCSResourceAttributes::begin() -> iterator
+
+ auto RCSResourceAttributes::begin() noexcept -> iterator
{
return iterator{ m_values.begin() };
}
- auto RCSResourceAttributes::end() -> iterator
+ auto RCSResourceAttributes::end() noexcept -> iterator
{
return iterator{ m_values.end() };
}
- auto RCSResourceAttributes::begin() const -> const_iterator
+ auto RCSResourceAttributes::begin() const noexcept -> const_iterator
{
return const_iterator{ m_values.begin() };
}
- auto RCSResourceAttributes::end() const -> const_iterator
+ auto RCSResourceAttributes::end() const noexcept -> const_iterator
{
return const_iterator{ m_values.end() };
}
- auto RCSResourceAttributes::cbegin() const -> const_iterator
+ auto RCSResourceAttributes::cbegin() const noexcept -> const_iterator
{
return const_iterator{ m_values.begin() };
}
- auto RCSResourceAttributes::cend() const -> const_iterator
+ auto RCSResourceAttributes::cend() const noexcept -> const_iterator
{
return const_iterator{ m_values.end() };
}
}
}
- void RCSResourceAttributes::clear()
+ void RCSResourceAttributes::clear() noexcept
{
return m_values.clear();
}
return m_values.find(key) != m_values.end();
}
- bool RCSResourceAttributes::empty() const
+ bool RCSResourceAttributes::empty() const noexcept
{
return m_values.empty();
}
- size_t RCSResourceAttributes::size() const
+ size_t RCSResourceAttributes::size() const noexcept
{
return m_values.size();
}
return replacedList;
}
+
}
}