Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
debugmessage.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
15
#include "
core/types.h
"
16
#include "
io/stream.h
"
17
18
//------------------------------------------------------------------------------
19
namespace
Net
20
{
21
class
DebugMessage
22
{
23
public
:
25
DebugMessage
();
27
DebugMessage
(
ushort
port,
const
Ptr<IO::Stream>
& data);
29
ushort
GetPort
()
const
;
31
const
Ptr<IO::Stream>
&
GetStream
()
const
;
33
bool
IsValid
()
const
;
34
35
private
:
36
ushort
portNum
;
37
Ptr<IO::Stream>
dataStream
;
38
};
39
40
//------------------------------------------------------------------------------
43
inline
44
DebugMessage::DebugMessage
() :
45
portNum
(0)
46
{
47
// empty
48
}
49
50
//------------------------------------------------------------------------------
53
inline
54
DebugMessage::DebugMessage
(
ushort
p,
const
Ptr<IO::Stream>
& s) :
55
portNum
(p),
56
dataStream
(s)
57
{
58
// empty
59
}
60
61
//------------------------------------------------------------------------------
64
inline
ushort
65
DebugMessage::GetPort
()
const
66
{
67
return
this->
portNum
;
68
}
69
70
//------------------------------------------------------------------------------
73
inline
const
Ptr<IO::Stream>
&
74
DebugMessage::GetStream
()
const
75
{
76
return
this->
dataStream
;
77
}
78
79
//------------------------------------------------------------------------------
82
inline
bool
83
DebugMessage::IsValid
()
const
84
{
85
return
this->
dataStream
.isvalid();
86
}
87
88
}
// namespace Net
89
//------------------------------------------------------------------------------
90
Net::DebugMessage::DebugMessage
DebugMessage()
default constructor
Definition
debugmessage.h:44
Net::DebugMessage::dataStream
Ptr< IO::Stream > dataStream
Definition
debugmessage.h:37
Net::DebugMessage::GetStream
const Ptr< IO::Stream > & GetStream() const
get the data stream
Definition
debugmessage.h:74
Net::DebugMessage::portNum
ushort portNum
Definition
debugmessage.h:36
Net::DebugMessage::GetPort
ushort GetPort() const
get the port number
Definition
debugmessage.h:65
Net::DebugMessage::IsValid
bool IsValid() const
return true if the message is valid
Definition
debugmessage.h:83
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Net
Definition
debugmessage.h:20
stream.h
types.h
ushort
unsigned short ushort
Definition
types.h:34
code
foundation
net
debugmessage.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.