Revision 0c8d22a5 src/client/middleware.cpp
src/client/middleware.cpp | ||
---|---|---|
25 | 25 |
* Excellence Initiative. |
26 | 26 |
*/ |
27 | 27 |
|
28 |
#include "client/middleware.h" |
|
28 |
#include "humotion/client/middleware.h" |
|
29 |
#include <string> |
|
29 | 30 |
|
30 |
using namespace std; |
|
31 |
using namespace humotion; |
|
32 |
using namespace humotion::client; |
|
31 |
// using namespace std; |
|
32 |
// using namespace humotion; |
|
33 |
// using namespace humotion::client; |
|
34 |
|
|
35 |
using humotion::client::Middleware; |
|
33 | 36 |
|
34 | 37 |
//! constructor |
35 | 38 |
//! open a new Middleware instance. |
36 |
Middleware::Middleware(string scope){
|
|
39 |
Middleware::Middleware(std::string scope) {
|
|
37 | 40 |
base_scope = scope; |
38 | 41 |
} |
39 | 42 |
|
40 | 43 |
//! destructor |
41 |
Middleware::~Middleware(){ |
|
44 |
Middleware::~Middleware() {
|
|
42 | 45 |
} |
43 | 46 |
|
44 | 47 |
|
45 | 48 |
//! set mouth position |
46 | 49 |
//! \param MouthState m to set |
47 | 50 |
//! \param send data to server (optional, use manual call to send_*() to trigger update on server) |
48 |
void Middleware::update_mouth_target(MouthState m, bool send){ |
|
51 |
void Middleware::update_mouth_target(MouthState m, bool send) {
|
|
49 | 52 |
mouth_state = m; |
50 |
if (send){ |
|
53 |
if (send) {
|
|
51 | 54 |
send_mouth_target(); |
52 | 55 |
} |
53 | 56 |
} |
... | ... | |
55 | 58 |
//! set gaze target |
56 | 59 |
//! \param GazeState m to set |
57 | 60 |
//! \param send data to server (optional, use manual call to send_*() to trigger update on server) |
58 |
void Middleware::update_gaze_target(GazeState s, bool send){ |
|
61 |
void Middleware::update_gaze_target(GazeState s, bool send) {
|
|
59 | 62 |
gaze_state = s; |
60 |
if (send){ |
|
63 |
if (send) {
|
|
61 | 64 |
send_gaze_target(); |
62 | 65 |
} |
63 | 66 |
} |
64 | 67 |
|
65 | 68 |
|
66 | 69 |
//! send all targets to server |
67 |
void Middleware::send_all(){ |
|
70 |
void Middleware::send_all() {
|
|
68 | 71 |
send_mouth_target(); |
69 | 72 |
send_gaze_target(); |
70 | 73 |
} |
Also available in: Unified diff