summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/Value.h
blob: 4d66fe4fd33276767d77b4fb985fbc077d9a0b7e (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
// **********************************************************************
//
// Copyright (c) 2003-2015 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 ICE_VALUE_H
#define ICE_VALUE_H

#ifdef ICE_CPP11_MAPPING // C++11 mapping

#include <Ice/ValueF.h>
#include <Ice/StreamF.h>

namespace IceInternal
{

class BasicStream;

}

namespace Ice
{

class ICE_API Value
{
public:
    
    virtual ~Value() = default;
    
    virtual void ice_preMarshal();
    virtual void ice_postUnmarshal();

    virtual void __write(IceInternal::BasicStream*) const;
    virtual void __read(IceInternal::BasicStream*);
    
    virtual const std::string& ice_id() const;
    static const std::string& ice_staticId();

protected:
    
    virtual void __writeImpl(IceInternal::BasicStream*) const {}
    virtual void __readImpl(IceInternal::BasicStream*) {}
};

template<typename T>
struct ICE_API InterfaceTraits
{    
    static const int compactId = -1;
    static const std::string staticId;
};

ICE_API void ice_writeObject(const OutputStreamPtr&, const ValuePtr&);
ICE_API void ice_readObject(const InputStreamPtr&, ValuePtr&);

}
#endif // C++11 mapping end

#endif