Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
fxheader.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Main header of FOX Toolkit
19/****************************************************************************/
20#pragma once
21
22// Avoid warnings for external headers
23#ifdef __clang__
24#if __has_warning("-Wdeprecated-enum-enum-conversion")
25#pragma clang diagnostic ignored "-Wdeprecated-enum-enum-conversion"
26#endif
27#if __has_warning("-Wdeprecated-anon-enum-enum-conversion")
28#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion"
29#endif
30#elif defined(__GNUC__) && __GNUC__ >= 9
31#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
32#endif
33#if defined(_MSC_VER) && _MSC_VER >= 1922
34#pragma warning(disable: 5054)
35#endif
36
37#include <fx.h>
38
39// More info: https://devblogs.microsoft.com/cppblog/broken-warnings-theory/
40
41
43#define FXDECLARE_OVERRIDE(classname) \
44 public: \
45 struct FXMapEntry { FX::FXSelector keylo; FX::FXSelector keyhi; long (classname::* func)(FX::FXObject*,FX::FXSelector,void*); }; \
46 static const FX::FXMetaClass metaClass; \
47 static FX::FXObject* manufacture(); \
48 virtual long handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr) override; \
49 virtual const FX::FXMetaClass* getMetaClass() const override { return &metaClass; } \
50 friend FX::FXStream& operator<<(FX::FXStream& store,const classname* obj){return store.saveObject((FX::FXObjectPtr)(obj));} \
51 friend FX::FXStream& operator>>(FX::FXStream& store,classname*& obj){return store.loadObject((FX::FXObjectPtr&)(obj));} \
52 private: