Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
SlicedData.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_SLICED_DATA_H
6#define ICE_SLICED_DATA_H
7
8#include <Ice/SlicedDataF.h>
9#include <Ice/GCObject.h>
10#include <Ice/Value.h>
11
12namespace Ice
13{
14
20#ifndef ICE_CPP11_MAPPING
21 : public ::IceUtil::Shared
22#endif
23{
27 ::std::string typeId;
28
33
37 ::std::vector<Byte> bytes;
38
42 ::std::vector<ValuePtr> instances;
43
48
53};
54
60#ifndef ICE_CPP11_MAPPING
61 : public ::IceUtil::Shared
62#endif
63{
64public:
65
66#ifndef ICE_CPP11_MAPPING
67 virtual ~SlicedData();
68#endif
69
71
74
78 void clear();
79
80#ifndef ICE_CPP11_MAPPING
82 void _iceGcVisitMembers(IceInternal::GCVisitor&);
84#endif
85
86};
87
93#ifdef ICE_CPP11_MAPPING
94 public Value
95#else
96 public IceInternal::GCObject
97#endif
98{
99public:
100
105 UnknownSlicedValue(const std::string& unknownTypeId);
106
107#ifdef ICE_CPP11_MAPPING
113 virtual SlicedDataPtr ice_getSlicedData() const override;
114
119 virtual std::string ice_id() const override;
120
125 std::shared_ptr<UnknownSlicedValue> ice_clone() const;
126
128 virtual void _iceWrite(::Ice::OutputStream*) const override;
129 virtual void _iceRead(::Ice::InputStream*) override;
131
132protected:
133
135 virtual std::shared_ptr<Value> _iceCloneImpl() const override;
137
138#else
139
146
152 virtual const std::string& ice_id(const Current& current = Ice::emptyCurrent) const;
153
155 virtual void _iceGcVisitMembers(IceInternal::GCVisitor&);
157
159 virtual void _iceWrite(::Ice::OutputStream*) const;
160 virtual void _iceRead(::Ice::InputStream*);
162#endif
163
164private:
165
166 const std::string _unknownTypeId;
167 SlicedDataPtr _slicedData;
168};
169
170}
171
172#endif
#define ICE_API
Definition Config.h:197
Definition Shared.h:78
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition InputStream.h:50
virtual ObjectPtr ice_clone() const
Returns a shallow copy of the object.
Interface for output streams used to create a sequence of bytes from Slice types.
Definition OutputStream.h:28
void clear()
Clears the slices to break potential cyclic references.
virtual ~SlicedData()
const SliceInfoSeq slices
The slices of unknown types.
Definition SlicedData.h:73
SlicedData(const SliceInfoSeq &)
UnknownSlicedValue(const std::string &unknownTypeId)
Constructs the placeholder instance.
virtual SlicedDataPtr ice_getSlicedData() const
Obtains the sliced data associated with this instance.
virtual const std::string & ice_id(const Current &current=Ice::emptyCurrent) const
Determine the Slice type ID associated with this instance.
Definition BuiltinSequences.h:113
IceInternal::Handle< SlicedData > SlicedDataPtr
Definition SlicedDataF.h:29
::std::vector< SliceInfoPtr > SliceInfoSeq
The slices of unknown types.
Definition SlicedDataF.h:36
const Current emptyCurrent
A default-initialized Current instance.
Information about the current method invocation for servers.
Definition Current.h:259
Encapsulates the details of a slice for an unknown class or exception type.
Definition SlicedData.h:23
::std::vector< ValuePtr > instances
The class instances referenced by this slice.
Definition SlicedData.h:42
::std::string typeId
The Slice type ID for this slice.
Definition SlicedData.h:27
bool isLastSlice
Whether or not this is the last slice.
Definition SlicedData.h:52
int compactId
The Slice compact type ID for this slice.
Definition SlicedData.h:32
::std::vector< Byte > bytes
The encoded bytes for this slice, including the leading size integer.
Definition SlicedData.h:37
bool hasOptionalMembers
Whether or not the slice contains optional members.
Definition SlicedData.h:47