ATLAS Offline Software
Loading...
Searching...
No Matches
VP1ControllerMacros.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "VP1Base/VP1Msg.h"
6
7#ifndef VP1CONTROLLERMACROS_H
8#define VP1CONTROLLERMACROS_H
9
10#define VP1ACTUAL_STRINGIFY(str) #str
11#define VP1STRINGIFY(str) VP1ACTUAL_STRINGIFY(str)
12#define VP1SLOTNAME(x) VP1CONTROLLERCLASSNAME::possibleChange_##x
13#define VP1SIGNALNAME(x) x##Changed
14#ifndef VP1IMPVARNAME
15# define VP1IMPVARNAME d
16#endif
17#define VP1LASTVARNAME(x) VP1IMPVARNAME->last_##x
18#define POSSIBLECHANGE_IMP(x) void VP1SLOTNAME(x)() { \
19 if (changed( VP1LASTVARNAME(x) , x())) { \
20 if (VP1Msg::verbose()&&!initVarsMode()) messageVerbose("Emitting "+QString(VP1STRINGIFY(VP1SIGNALNAME(x)))+"( "+toString(VP1LASTVARNAME(x))+" )"); \
21 emit VP1SIGNALNAME(x)(VP1LASTVARNAME(x)); } }
22
23#endif