MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sigToCbMapper.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: sigToCbMapper.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef sigToCbMapper_H_
10 #define sigToCbMapper_H_
11 
14 
15 #include "rtiMsConfig.h"
16 #include <vlutil/vlString.h>
17 #include <list>
18 #include <QtCore/QObject>
19 
20 typedef void (*DtParameterlessCb)( void* usr );
21 
26 {
27  Q_OBJECT
28 
29 public:
30 
32  DtSignalToCallbackMapper(const QObject* sender, const char* signal);
33 
36 
37 private:
38 
41 
44 
45 public:
46 
48  virtual void addCallback( DtParameterlessCb cb, void* usr );
49 
51  virtual void removeCallback( DtParameterlessCb cb, void* usr );
52 
53 public slots:
54 
56  void callCallbacks();
57 
58 protected:
59 
60  struct DtCbInfo
61  {
62  DtCbInfo( DtParameterlessCb c, void* u ) :
63  cb(c), usr(u)
64  {};
65 
67  void* usr;
68  };
69 
71  std::list<DtCbInfo> myCallbacks;
72 
74  const QObject* mySender;
75 
77  const MAKRti::DtString mySignal;
78 
79 };
80 
81 #endif
Maps a single Qt signal to any number of callbacks for non-Qt classes.
Definition: sigToCbMapper.h:25
const QObject * mySender
The object which sends the signal.
Definition: sigToCbMapper.h:74
void * usr
Definition: sigToCbMapper.h:67
Definition: sigToCbMapper.h:60
DtCbInfo(DtParameterlessCb c, void *u)
Definition: sigToCbMapper.h:62
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
void(* DtParameterlessCb)(void *usr)
Definition: sigToCbMapper.h:20
std::list< DtCbInfo > myCallbacks
List of callbacks.
Definition: sigToCbMapper.h:71
const MAKRti::DtString mySignal
The signal.
Definition: sigToCbMapper.h:77

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)