Commit ef7ad24d authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Added an emptiness check for CP::SysReadHandle<T>.

The implementation is exactly the same as for CP::SysCopyHandle. It just checks whether a non-empty string was set on the handle as the input's key.


Former-commit-id: 502acc48252c7f64e0a48a37597028146c2ba999
parent f3e31642
......@@ -38,6 +38,15 @@ namespace CP
const std::string& propertyDescription);
/// \brief whether we have a name configured
public:
bool empty () const noexcept;
/// \brief !empty()
public:
explicit operator bool () const noexcept;
/// \brief get the name we retrieve from the event store
public:
const std::string& getName (const CP::SystematicSet& sys) const;
......
......@@ -52,6 +52,22 @@ namespace CP
template<typename T> bool SysReadHandle<T> ::
empty () const noexcept
{
return m_inputName.empty();
}
template<typename T> SysReadHandle<T> ::
operator bool () const noexcept
{
return !m_inputName.empty();
}
template<typename T> const std::string& SysReadHandle<T> ::
getName (const CP::SystematicSet& sys) const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment