You.i Engine
YiCondition.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_CONDITION_H_
3 #define _YI_CONDITION_H_
4 
6 #include "signal/YiSignal.h"
7 
9 
20 {
21 public:
22  friend class CYIConditionEvaluator;
23 
24  CYICondition();
25  virtual ~CYICondition();
26 
30  void Set();
31 
35  operator bool() const
36  {
37  return m_bCondition;
38  }
39 
40 private:
41  void SetAutoEvaluator(CYIConditionEvaluator *pEvaluator);
42  void Unset();
43  void Clear();
44 
45 private:
46  bool m_bCondition;
47  CYIConditionEvaluator *m_pEvaluator;
48 };
49 
65 {
66 public:
67  friend class CYICondition;
68 
70  virtual ~CYIConditionEvaluator();
71 
75  void Reset();
76 
82  void ClearConditions();
83 
89  void AddCondition(CYICondition *pCondition);
90 
95 
96 private:
97  void RemoveCondition(CYICondition *pCondition);
98  void Evaluate();
99  operator bool() const;
100 
101 private:
102  std::vector <CYICondition*> m_ConditionList;
103 };
104 
107 #endif // _YI_CONDITION_H_
Evaluates when CYICondition objects have been set, and notifies users.
Definition: YiCondition.h:64
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
virtual ~CYICondition()
friend class CYIConditionEvaluator
Definition: YiCondition.h:22
Definition: YiSignalHandler.h:174
CYISignal Success
Definition: YiCondition.h:94
Represents a boolean condition.
Definition: YiCondition.h:19
Signals and slots are a thread-safe and flexible communication framework that will allow various obje...
Definition: YiSignal.h:164