This repository was archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOSCmessage.h
More file actions
48 lines (39 loc) · 1.25 KB
/
Copy pathOSCmessage.h
File metadata and controls
48 lines (39 loc) · 1.25 KB
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
#include <iostream>
#include "core/array.h"
#include "core/resource.h"
#include "ip/IpEndpointName.h"
#include "osc/OscReceivedElements.h"
#ifndef GDOSC_MESSAGE_H
#define GDOSC_MESSAGE_H
class OSCmessage : public Resource {
GDCLASS(OSCmessage, Resource);
RES_BASE_EXTENSION("oscmessage");
public:
OSCmessage();
OSCmessage(const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint);
~OSCmessage();
// getter
_FORCE_INLINE_ const bool& is_valid() const { return _valid; }
// getter, exposed in gdscript
_FORCE_INLINE_ bool empty() const { return _arg_num < 1; }
_FORCE_INLINE_ const String& ip() const { return _ip; }
_FORCE_INLINE_ const int& port() const { return _port; }
_FORCE_INLINE_ const String& address() const { return _address; }
_FORCE_INLINE_ const String& typetag() const { return _typetag; }
_FORCE_INLINE_ const int& arg_num() const { return _arg_num; }
_FORCE_INLINE_ const Variant& arg(int p_idx) const { return _arguments[p_idx]; }
// operators
void copy(const OSCmessage& src);
protected:
static void _bind_methods();
const Array& arguments() const { return _arguments; }
private:
bool _valid;
String _ip;
int _port;
String _address;
String _typetag;
int _arg_num;
Array _arguments;
};
#endif