-
Notifications
You must be signed in to change notification settings - Fork 226
/
TestController.h
53 lines (40 loc) · 1.57 KB
/
TestController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//--------------------------------------------------------------------------------------
// TestController.h
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
//
// Simple class for controller under test
//
class TestController
{
public:
TestController();
explicit TestController(Windows::Xbox::Input::IController^ controller);
TestController(const TestController& rhs);
TestController(TestController&& rhs);
~TestController();
TestController& operator=(const TestController& rhs);
TestController& operator=(TestController&& rhs);
bool operator==(const TestController& rhs);
bool operator==(const Windows::Xbox::Input::IController^ rhs);
void swap(TestController& rhs);
const Windows::Xbox::Input::IController^ Controller() const;
Windows::Xbox::Input::IController^ Controller();
const Microsoft::Xbox::Input::IArcadeStick^ ArcadeStick() const;
Microsoft::Xbox::Input::IArcadeStick^ ArcadeStick();
const wchar_t* Type() const;
void OnDisconnect();
void OnConnect();
bool IsConnected() const;
private:
Microsoft::Xbox::Input::IArcadeStick^ pIArcadeStick_;
Windows::Xbox::Input::IController^ pIController_;
bool isConnected_;
};
inline bool operator==(const Windows::Xbox::Input::IController^ lhs, const TestController& rhs)
{
return (lhs == rhs.Controller());
}