BALL 1.5.0
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
14#endif
15
16#ifndef BALL_SYSTEM_NETWORKING_H
18#endif
19
20#ifndef BALL_CONCEPT_PERSISTENTOBJECT_H
22#endif
23
24#ifndef BALL_CONCET_TEXTPERSISTENCEMANAGER_H
26#endif
27
28#define DEFAULT_PORT 20000
29
30namespace BALL
31{
48 {
49 public:
50
58 {
60 COMMAND__UNKOWN = 0,
61
63 COMMAND__SEND_OBJECT = 1,
64
66 NUMBER_OF_COMMANDS
67 };
68
72
80 {
81 public:
82 InvalidClient(const char* file, int line);
83 };
84
93 {
94 public:
95 NoPersistentObject(const char* file, int line);
96 };
97
99
102
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
196 };
197
198} // namespace BALL
199
200#endif // BALL_CONCEPT_CLIENT_H
Definition: constants.h:13
void connect(const String &host, int port=20000)
virtual void clear()
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
void insert(Composite &composite)
virtual bool isValid() const
virtual ~Client()
Client(const String &host, int port=20000)
InvalidClient(const char *file, int line)
NoPersistentObject(const char *file, int line)
#define BALL_EXPORT
Definition: COMMON/global.h:50