BALL
1.5.0
include
BALL
CONCEPT
client.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_CONCEPT_CLIENT_H
6
#define BALL_CONCEPT_CLIENT_H
7
8
#ifndef BALL_COMMON_H
9
# include <
BALL/common.h
>
10
#endif
11
12
#ifndef BALL_CONCEPT_COMPOSITE_H
13
# include <
BALL/CONCEPT/composite.h
>
14
#endif
15
16
#ifndef BALL_SYSTEM_NETWORKING_H
17
# include <
BALL/SYSTEM/networking.h
>
18
#endif
19
20
#ifndef BALL_CONCEPT_PERSISTENTOBJECT_H
21
# include <
BALL/CONCEPT/persistentObject.h
>
22
#endif
23
24
#ifndef BALL_CONCET_TEXTPERSISTENCEMANAGER_H
25
# include <
BALL/CONCEPT/textPersistenceManager.h
>
26
#endif
27
28
#define DEFAULT_PORT 20000
29
30
namespace
BALL
31
{
47
class
BALL_EXPORT
Client
48
{
49
public
:
50
57
enum
Command
58
{
60
COMMAND__UNKOWN = 0,
61
63
COMMAND__SEND_OBJECT = 1,
64
66
NUMBER_OF_COMMANDS
67
};
68
72
78
class
BALL_EXPORT
InvalidClient
79
:
public
Exception::GeneralException
80
{
81
public
:
82
InvalidClient
(
const
char
* file,
int
line);
83
};
84
91
class
BALL_EXPORT
NoPersistentObject
92
:
public
Exception::GeneralException
93
{
94
public
:
95
NoPersistentObject
(
const
char
* file,
int
line);
96
};
97
99
102
109
Client
();
110
122
Client
(
const
String
& host,
int
port = 20000);
123
125
127
130
virtual
~Client
();
131
135
virtual
void
clear
();
136
138
141
148
void
connect
(
const
String
& host,
int
port = 20000);
149
164
void
insert
(
Composite
&composite);
166
169
178
virtual
bool
isValid
()
const
;
179
186
virtual
void
dump
(std::ostream& s = std::cout,
Size
depth = 0)
const
;
187
189
190
private
:
191
192
String
host_;
193
int
port_;
194
195
TextPersistenceManager
pm_;
196
};
197
198
}
// namespace BALL
199
200
#endif // BALL_CONCEPT_CLIENT_H
BALL_EXPORT
#define BALL_EXPORT
Definition:
COMMON/global.h:50
BALL::Client::Command
Command
Definition:
client.h:58
BALL::Client::InvalidClient::InvalidClient
InvalidClient(const char *file, int line)
BALL::Client
Definition:
client.h:48
persistentObject.h
BALL::Client::clear
virtual void clear()
BALL::Client::connect
void connect(const String &host, int port=20000)
BALL::Client::NoPersistentObject::NoPersistentObject
NoPersistentObject(const char *file, int line)
BALL::String
Definition:
string.h:57
networking.h
BALL
Definition:
constants.h:13
BALL::Client::~Client
virtual ~Client()
BALL::Client::NoPersistentObject
Definition:
client.h:93
BALL::Client::insert
void insert(Composite &composite)
textPersistenceManager.h
BALL::Composite
Definition:
composite.h:74
BALL_SIZE_TYPE
BALL::Client::InvalidClient
Definition:
client.h:80
BALL::Client::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::Client::isValid
virtual bool isValid() const
composite.h
BALL::TextPersistenceManager
Definition:
textPersistenceManager.h:29
common.h
BALL::Client::Client
Client()
BALL::Exception::GeneralException
Definition:
COMMON/exception.h:61
BALL::Client::Client
Client(const String &host, int port=20000)
Generated by
1.8.20