summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/objects/TestI.h
blob: 63e48f7903dad0fcd7b909c99c4f0cf344a42109 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// **********************************************************************
//
// Copyright (c) 2003-2018 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef TEST_I_H
#define TEST_I_H

#include <Test.h>
#include <TestCommon.h>

class BI : public Test::B
{
public:

    virtual void ice_preMarshal();
    virtual void ice_postUnmarshal();
};

class CI : public Test::C
{
public:

    virtual void ice_preMarshal();
    virtual void ice_postUnmarshal();
};

class DI : public Test::D
{
public:

    virtual void ice_preMarshal();
    virtual void ice_postUnmarshal();
};

class EI : public Test::E
{
public:

    EI();

    bool checkValues();
};
ICE_DEFINE_PTR(EIPtr, EI);

class FI : public Test::F
{
public:

    FI();
    FI(const Test::EPtr&);

    bool checkValues();
};
ICE_DEFINE_PTR(FIPtr, FI);

#ifdef ICE_CPP11_MAPPING
class II : public ::Ice::InterfaceByValue<Test::I>
{
};

class JI : public ::Ice::InterfaceByValue<Test::J>
{
};
#else
class II : public Test::I
{
};

class JI : public Test::J
{
};
#endif

class HI : public Test::H
{
};

class InitialI : public Test::Initial
{
public:

    InitialI(const Ice::ObjectAdapterPtr&);
    virtual ~InitialI();

    virtual void shutdown(const Ice::Current&);
    virtual Test::BPtr getB1(const Ice::Current&);
    virtual Test::BPtr getB2(const Ice::Current&);
    virtual Test::CPtr getC(const Ice::Current&);
    virtual Test::DPtr getD(const Ice::Current&);
    virtual Test::EPtr getE(const Ice::Current&);
    virtual Test::FPtr getF(const Ice::Current&);

    virtual void setRecursive(ICE_IN(Test::RecursivePtr), const Ice::Current&);
    virtual bool supportsClassGraphDepthMax(const Ice::Current&);

#ifdef ICE_CPP11_MAPPING
    virtual GetMBMarshaledResult getMB(const Ice::Current&);
    virtual void getAMDMBAsync(std::function<void(const GetAMDMBMarshaledResult&)>,
                               std::function<void(std::exception_ptr)>,
                               const Ice::Current&);
#else
    virtual Test::BPtr getMB(const Ice::Current&);
    virtual void getAMDMB_async(const Test::AMD_Initial_getAMDMBPtr&, const Ice::Current&);
#endif

    virtual void getAll(Test::BPtr&, Test::BPtr&, Test::CPtr&, Test::DPtr&, const Ice::Current&);

#ifdef ICE_CPP11_MAPPING
    virtual ::std::shared_ptr<::Ice::Value> getI(const Ice::Current&);
    virtual ::std::shared_ptr<::Ice::Value> getJ(const Ice::Current&);
    virtual ::std::shared_ptr<::Ice::Value> getH(const Ice::Current&);
#else
    virtual Test::IPtr getI(const Ice::Current&);
    virtual Test::IPtr getJ(const Ice::Current&);
    virtual Test::IPtr getH(const Ice::Current&);
#endif

    virtual Test::D1Ptr getD1(ICE_IN(Test::D1Ptr), const Ice::Current&);
    virtual void throwEDerived(const Ice::Current&);

#ifdef ICE_CPP11_MAPPING
    virtual void setI(::std::shared_ptr<::Ice::Value>, const Ice::Current&);
#else
    virtual void setI(const Test::IPtr&, const Ice::Current&);
#endif
    virtual Test::BaseSeq opBaseSeq(ICE_IN(Test::BaseSeq), Test::BaseSeq&, const Ice::Current&);

    virtual Test::CompactPtr getCompact(const Ice::Current&);

    virtual Test::Inner::APtr getInnerA(const Ice::Current&);
    virtual Test::Inner::Sub::APtr getInnerSubA(const Ice::Current&);

    virtual void throwInnerEx(const Ice::Current&);
    virtual void throwInnerSubEx(const Ice::Current&);

private:

    Ice::ObjectAdapterPtr _adapter;
    Test::BPtr _b1;
    Test::BPtr _b2;
    Test::CPtr _c;
    Test::DPtr _d;
    Test::EPtr _e;
    Test::FPtr _f;
};

class UnexpectedObjectExceptionTestI : public Ice::Blobject
{
public:

    virtual bool ice_invoke(ICE_IN(std::vector<Ice::Byte>), std::vector<Ice::Byte>&, const Ice::Current&);
};
ICE_DEFINE_PTR(UnexpectedObjectExceptionTestIPtr, UnexpectedObjectExceptionTestI);

class TestIntfI : public Test::TestIntf
{
public:

    virtual Test::BasePtr opDerived(const Ice::Current&);
    virtual void throwDerived(const Ice::Current&);
};

#endif