libTriton  version 0.7 build 1398
trigger.hpp
Go to the documentation of this file.
1 /*
3 ** Copyright (C) - Triton
4 **
5 ** This program is under the terms of the BSD License.
6 */
7 
8 #ifndef TRITON_PIN_TRIGGER_H
9 #define TRITON_PIN_TRIGGER_H
10 
11 
12 
14 namespace tracer {
20  namespace pintool {
28  class Trigger {
31  protected:
33  bool state;
34 
35  public:
37  Trigger();
38 
40  void toggle();
41 
43  bool getState();
44 
46  void enable(void);
47 
49  void disable(void);
50 
52  void update(bool flag);
53  };
54 
56  };
58 };
59 
60 #endif // TRITON_PIN_TRIGGER_H
bool state
Wether insertCalls are enable or not.
Definition: trigger.hpp:33
void disable(void)
Sets the state to false.
Definition: trigger.cpp:34
bool getState()
Returns true if the switch is ON, false otherwise.
Definition: trigger.cpp:24
Trigger()
Constructor.
Definition: trigger.cpp:15
void enable(void)
Sets the state to true.
Definition: trigger.cpp:29
void toggle()
Switchs the trigger.
Definition: trigger.cpp:19
void update(bool flag)
Sets the state to flag.
Definition: trigger.cpp:39
The Tracer namespace.
Definition: api.cpp:12