Ginga  0.13.6.1771-df200
The iTV middleware.
Switch.h
Go to the documentation of this file.
1 /* Copyright (C) 2006-2017 PUC-Rio/Laboratorio TeleMidia
2 
3 This file is part of Ginga (Ginga-NCL).
4 
5 Ginga is free software: you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9 
10 Ginga is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Ginga. If not, see <http://www.gnu.org/licenses/>. */
17 
18 #ifndef SWITCH_H
19 #define SWITCH_H
20 
21 #include "Composition.h"
22 #include "Event.h"
23 
25 
26 class Switch: public Composition
27 {
28 public:
29  Switch (const string &);
30  ~Switch ();
31 
32  // Object:
33  string getObjectTypeAsString () override;
34  bool startTransition (Event *, Event::Transition) override;
35  void endTransition (Event *, Event::Transition) override;
36 
37  // Switch:
38  const list<pair<Object *, Predicate *>> *getRules ();
39  void addRule (Object *, Predicate *);
40 
41 private:
42  list<pair<Object *, Predicate *>> _rules;
44 };
45 
47 
48 #endif // SWITCH_H
Definition: Object.h:29
~Switch()
Definition: Switch.cpp:34
void addRule(Object *, Predicate *)
Definition: Switch.cpp:148
Definition: Composition.h:25
bool startTransition(Event *, Event::Transition) override
Definition: Switch.cpp:50
Switch(const string &)
Definition: Switch.cpp:28
#define GINGA_NAMESPACE_END
Definition: aux-ginga.h:62
const list< pair< Object *, Predicate * > > * getRules()
Definition: Switch.cpp:142
Definition: Switch.h:26
void endTransition(Event *, Event::Transition) override
Definition: Switch.cpp:106
#define GINGA_NAMESPACE_BEGIN
Definition: aux-ginga.h:61
Transition
Definition: Event.h:44
Object * _selected
Definition: Switch.h:43
list< pair< Object *, Predicate * > > _rules
Definition: Switch.h:42
string getObjectTypeAsString() override
Definition: Switch.cpp:44
Definition: Event.h:27
Definition: Predicate.h:25