Simon Rozman 30f289123f Update Copyright and build year
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-01-07 11:20:53 +01:00

47 lines
956 B
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2015-2022 Amebis
Copyright © 2016 GÉANT
*/
#pragma once
#include "common.h"
#include <codeanalysis\warnings.h>
#pragma warning(push)
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
#include <wx/object.h>
#pragma warning(pop)
///
/// Helper template for event user data
///
template <class T>
class wxObjectWithData : public wxObject
{
public:
///
/// Default constructor
///
inline wxObjectWithData() {}
///
/// Construct object with data
///
/// \param[in] data Data to initialize object with
///
inline wxObjectWithData(const T &data) : m_data(data) {}
///
/// Construct object with data
///
/// \param[in] data Data to move to object
///
inline wxObjectWithData(T &&data) : m_data(std::move(data)) {}
public:
T m_data; ///< Data
};