VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
testDtSubjectBinder.h
Go to the documentation of this file.
1 
2 #include <UnitTest++.h>
3 #include "commonFixutres.h"
6 
7 
9 // TestSubject
11 
13 {
14 
15 public:
16 
18 
19  virtual ~TestSubject();
20 
23  static const char* className();
24 
25 protected:
26 
28  static const char* myClassName;
29 
30 };
31 
32 
34 
35 const char* TestSubject::myClassName = "TestSubject";
36 
38 : myDe(de)
39 {
40  // Activate user interface components
42  if(announcer)
43  {
44  announcer->activate(this);
45  }
46 };
47 
49 {
50  // Deactivate user interface components
52  if(announcer)
53  {
54  announcer->deactivate(this);
55  }
56 }
57 
59 {
60  return myClassName;
61 }
62 
63 
65 // TestObserverLogic
67 
69 
71 {
72 
73 public:
74 
76 
77  bool slotActivateCalled();
78 
79  virtual void slot_activate(TestSubject* subject);
80 
81  virtual void slot_deactivate(TestSubject* subject);
82 
83 protected:
84 
86 
88 
89 };
90 
92 {
93  TestObserverLogic* logic = new TestObserverLogic(de);
94  logic->bind(de);
95  return logic;
96 }
97 
99 : mySlotActivatedCalledFlag(false)
100 {
101 }
102 
104 {
106 }
107 
109 {
111 }
112 
114 {
115 }
Contains makVrv::DtSubjectObserver class.
Definition: testDtSubjectBinder.h:12
static const char * myClassName
Definition: testDtSubjectBinder.h:28
static DtSubjectAnnouncer * findInstance(DtDe &de)
Get the instance of this object. This object is &#39;lazily created&#39;.
Definition: DtSubjectAnnouncer.h:102
virtual void activate(T *subject) const
Causes the activate signal to be emitted.
Definition: DtSubjectAnnouncer.h:126
virtual void slot_activate(TestSubject *subject)
Definition: testDtSubjectBinder.h:108
bool slotActivateCalled()
Definition: testDtSubjectBinder.h:103
static const char * className()
Returns the name of this class.
Definition: testDtSubjectBinder.h:58
void bind(DtDe &de)
Note: do not give this class a CTOR.
TestObserverLogic(makVrv::DtDe &de)
Definition: testDtSubjectBinder.h:98
static TestObserverLogic * create(makVrv::DtDe &de)
Definition: testDtSubjectBinder.h:91
virtual ~TestSubject()
Definition: testDtSubjectBinder.h:48
Contains makVrv::DtSubjectAnnouncer class.
TestSubject(makVrv::DtDe &de)
Definition: testDtSubjectBinder.h:37
bool mySlotActivatedCalledFlag
Definition: testDtSubjectBinder.h:87
makVrv::DtSubjectAnnouncer< TestSubject > TestSubjectAnnouncer
Definition: testDtSubjectBinder.h:33
Definition: testDtSubjectBinder.h:70
A DtSubjectAnnouncer tells DtSubjectObservers that the subject T is activated or deactivated.
Definition: DtSubjectAnnouncer.h:32
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A DtSubjectObserver is told by a DtSubjectAnnouncer when the subject is activated/ deactivated...
Definition: DtSubjectObserver.h:29
virtual void deactivate(T *subject) const
Causes the deactivate signal to be emitted.
Definition: DtSubjectAnnouncer.h:132
virtual void slot_deactivate(TestSubject *subject)
Definition: testDtSubjectBinder.h:113
makVrv::DtDe & myDe
Definition: testDtSubjectBinder.h:27
makVrv::DtSubjectObserver< TestSubject > TestSubjectObserver
Definition: testDtSubjectBinder.h:68

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)