stec-platform
publication.h
1 #ifndef PUBLICATION_H
2 #define PUBLICATION_H
3 
4 #include <QtGlobal>
5 #include <QVariant>
6 #include <QVariantList>
7 #include <QMetaMethod>
8 #include "platform_global.h"
9 #include "memoryatom.h"
10 
16 class PLATFORMSHARED_EXPORT Publication : public MemoryAtom
17 {
18  Q_OBJECT
19 private :
20 
21  RecursiveLock propertyLock;
22  QString name;
23  QVariant property;
24  int connects;
25 
26 public:
27 
33  explicit Publication(QString Name, QObject *parent = 0);
34 
39  const QString getName()
40  {
41  QReadLocker d(&propertyLock);
42  return name;
43  }
44 
49  const QVariant getProperty()
50  {
51  QReadLocker d(&propertyLock);
52  return property;
53  }
54 
60  {
61  QReadLocker d(&propertyLock);
62  return connects;
63  }
64 
65 
69  void PeerConnected();
70 
71 
77  virtual void connectNotify (const QMetaMethod &signal );
78 
84  virtual void disconnectNotify ( const QMetaMethod &signal );
85 
86 
87 
88 
89 signals:
90  void SignalPropertyChanged( );
91  void SignalNoMoreConnections( QString name);
92  void SignalHasSubscriberConnectedEvent(int connections);
93  void SignalPeerConnect();
94 
95 public slots:
96 
97  void setProperty(QVariant p);
98 
99 
100 
101 };
102 
103 #endif // PUBLICATION_H
The MemoryAtom class Shared memory atom for use by platform ownership of data per node.
Definition: memoryatom.h:20
The Publication class this is only used by the cloud, users should never use this class....
Definition: publication.h:17
int getNbrSubscribers()
getNbrSubscribers
Definition: publication.h:59
const QVariant getProperty()
getProperty
Definition: publication.h:49
const QString getName()
getName
Definition: publication.h:39
The RecursiveLock class Allows a recursive read write lock to occur.
Definition: platform_global.h:113