blob: bd8443f0b404407e2743ac71921c0ee9de5f698b (
plain)
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
|
#ifndef ICETRAY_TESTSETUP_H
#define ICETRAY_TESTSETUP_H
#include <Ice/Communicator.h>
#include <IceBox/IceBox.h>
#include <visibility.h>
#include "icetrayService.h"
namespace IceTray {
class DLL_PUBLIC DryIce {
public:
DryIce(const Ice::StringSeq & = Ice::StringSeq());
DryIce(const DryIce &) = delete;
virtual ~DryIce();
void operator=(const DryIce &) = delete;
std::string getEndpoint() const;
protected:
friend class DryIceClient;
static DryIce * currentDryIce;
void replace(const std::string &, Ice::ObjectPtr);
Ice::CommunicatorPtr ic;
IceTray::ServicePtr s;
};
class DLL_PUBLIC DryIceClient {
public:
DryIceClient();
virtual ~DryIceClient();
template<typename Prx>
Prx getProxy(const std::string & objectName) const
{
return Prx::checkedCast(DryIce::currentDryIce->ic->stringToProxy(objectName));
}
};
}
#endif
|