Nebula
Loading...
Searching...
No Matches
iointerfaceprotocol.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
7#include "messaging/message.h"
8
9//------------------------------------------------------------------------------
10namespace IO
11{
12//------------------------------------------------------------------------------
14{
17public:
19 result(false)
20 { };
21public:
22 void SetFromURI(const IO::URI& val)
23 {
24 n_assert(!this->handled);
25 this->fromuri = val;
26 };
27 const IO::URI& GetFromURI() const
28 {
29 return this->fromuri;
30 };
31private:
33public:
34 void SetToURI(const IO::URI& val)
35 {
36 n_assert(!this->handled);
37 this->touri = val;
38 };
39 const IO::URI& GetToURI() const
40 {
41 return this->touri;
42 };
43private:
45public:
46 void SetResult(bool val)
47 {
48 n_assert(!this->handled);
49 this->result = val;
50 };
51 bool GetResult() const
52 {
53 return this->result;
54 };
55private:
56 bool result;
57};
58//------------------------------------------------------------------------------
60{
63public:
65 result(false)
66 { };
67public:
68 void SetURI(const IO::URI& val)
69 {
70 n_assert(!this->handled);
71 this->uri = val;
72 };
73 const IO::URI& GetURI() const
74 {
75 return this->uri;
76 };
77private:
79public:
80 void SetResult(bool val)
81 {
82 n_assert(!this->handled);
83 this->result = val;
84 };
85 bool GetResult() const
86 {
87 return this->result;
88 };
89private:
90 bool result;
91};
92//------------------------------------------------------------------------------
101//------------------------------------------------------------------------------
110//------------------------------------------------------------------------------
111class DeleteFile : public IOMessage
112{
115public:
117 { };
118};
119//------------------------------------------------------------------------------
128//------------------------------------------------------------------------------
129class ReadStream : public IOMessage
130{
133public:
135 { };
136public:
137 void SetStream(const Ptr<IO::Stream>& val)
138 {
139 n_assert(!this->handled);
140 this->stream = val;
141 };
143 {
144 return this->stream;
145 };
146private:
148};
149//------------------------------------------------------------------------------
150class WriteStream : public IOMessage
151{
154public:
156 { };
157public:
158 void SetStream(const Ptr<IO::Stream>& val)
159 {
160 n_assert(!this->handled);
161 this->stream = val;
162 };
164 {
165 return this->stream;
166 };
167private:
169};
170} // namespace IO
171//------------------------------------------------------------------------------
Definition iointerfaceprotocol.h:14
CopyFile()
Definition iointerfaceprotocol.h:18
bool GetResult() const
Definition iointerfaceprotocol.h:51
const IO::URI & GetToURI() const
Definition iointerfaceprotocol.h:39
__DeclareMsgId
Definition iointerfaceprotocol.h:16
void SetToURI(const IO::URI &val)
Definition iointerfaceprotocol.h:34
const IO::URI & GetFromURI() const
Definition iointerfaceprotocol.h:27
void SetResult(bool val)
Definition iointerfaceprotocol.h:46
IO::URI fromuri
Definition iointerfaceprotocol.h:32
IO::URI touri
Definition iointerfaceprotocol.h:44
void SetFromURI(const IO::URI &val)
Definition iointerfaceprotocol.h:22
bool result
Definition iointerfaceprotocol.h:56
__DeclareClass(CopyFile)
Definition iointerfaceprotocol.h:94
__DeclareMsgId
Definition iointerfaceprotocol.h:96
__DeclareClass(CreateDirectory)
CreateDirectory()
Definition iointerfaceprotocol.h:98
Definition iointerfaceprotocol.h:103
__DeclareClass(DeleteDirectory)
__DeclareMsgId
Definition iointerfaceprotocol.h:105
DeleteDirectory()
Definition iointerfaceprotocol.h:107
Definition iointerfaceprotocol.h:112
__DeclareMsgId
Definition iointerfaceprotocol.h:114
__DeclareClass(DeleteFile)
DeleteFile()
Definition iointerfaceprotocol.h:116
Definition iointerfaceprotocol.h:60
__DeclareClass(IOMessage)
IO::URI uri
Definition iointerfaceprotocol.h:78
__DeclareMsgId
Definition iointerfaceprotocol.h:62
IOMessage()
Definition iointerfaceprotocol.h:64
void SetResult(bool val)
Definition iointerfaceprotocol.h:80
void SetURI(const IO::URI &val)
Definition iointerfaceprotocol.h:68
bool GetResult() const
Definition iointerfaceprotocol.h:85
bool result
Definition iointerfaceprotocol.h:90
const IO::URI & GetURI() const
Definition iointerfaceprotocol.h:73
Definition iointerfaceprotocol.h:121
MountArchive()
Definition iointerfaceprotocol.h:125
__DeclareClass(MountArchive)
__DeclareMsgId
Definition iointerfaceprotocol.h:123
Definition iointerfaceprotocol.h:130
void SetStream(const Ptr< IO::Stream > &val)
Definition iointerfaceprotocol.h:137
__DeclareClass(ReadStream)
const Ptr< IO::Stream > & GetStream() const
Definition iointerfaceprotocol.h:142
__DeclareMsgId
Definition iointerfaceprotocol.h:132
Ptr< IO::Stream > stream
Definition iointerfaceprotocol.h:147
ReadStream()
Definition iointerfaceprotocol.h:134
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Definition iointerfaceprotocol.h:151
const Ptr< IO::Stream > & GetStream() const
Definition iointerfaceprotocol.h:163
Ptr< IO::Stream > stream
Definition iointerfaceprotocol.h:168
__DeclareClass(WriteStream)
__DeclareMsgId
Definition iointerfaceprotocol.h:153
WriteStream()
Definition iointerfaceprotocol.h:155
void SetStream(const Ptr< IO::Stream > &val)
Definition iointerfaceprotocol.h:158
Messages are packets of data which can be sent to a message port.
Definition message.h:45
volatile int handled
Definition message.h:74
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
#define n_assert(exp)
Definition debug.h:50
Instances of wrapped stream classes.
Definition orientation.cc:10