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-2025 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
23// Avoid warnings for external headers in MSVC
24#ifdef _MSC_VER
25// avoid warnings in clang
26#ifdef __clang__
27#pragma clang system_header
28#endif
29#include <fx.h>
30#else
31#include <fx.h>
32#endif
33
34// More info: https://devblogs.microsoft.com/cppblog/broken-warnings-theory/
35
36
38#define FXDECLARE_OVERRIDE(classname) \
39 public: \
40 struct FXMapEntry { FX::FXSelector keylo; FX::FXSelector keyhi; long (classname::* func)(FX::FXObject*,FX::FXSelector,void*); }; \
41 static const FX::FXMetaClass metaClass; \
42 static FX::FXObject* manufacture(); \
43 virtual long handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr) override; \
44 virtual const FX::FXMetaClass* getMetaClass() const override { return &metaClass; } \
45 friend FX::FXStream& operator<<(FX::FXStream& store,const classname* obj){return store.saveObject((FX::FXObjectPtr)(obj));} \
46 friend FX::FXStream& operator>>(FX::FXStream& store,classname*& obj){return store.loadObject((FX::FXObjectPtr&)(obj));} \
47 private: