Ice 3.7 C++11 API Reference
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 
12 namespace Ice
13 {
14 
20 #ifndef ICE_CPP11_MAPPING
21  : public ::IceUtil::Shared
22 #endif
23 {
27  ::std::string typeId;
28 
32  int compactId;
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 {
64 public:
65 
66 #ifndef ICE_CPP11_MAPPING
67  virtual ~SlicedData();
68 #endif
69 
71 
74 
78  void clear();
79 
80 #ifndef ICE_CPP11_MAPPING
81  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 {
99 public:
100 
105  UnknownSlicedValue(const std::string& unknownTypeId);
106 
107 #ifdef ICE_CPP11_MAPPING
108 
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 
132 protected:
133 
135  virtual std::shared_ptr<Value> _iceCloneImpl() const override;
137 
138 #else
139 
145  virtual SlicedDataPtr ice_getSlicedData() const;
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 
164 private:
165 
166  const std::string _unknownTypeId;
167  SlicedDataPtr _slicedData;
168 };
169 
170 }
171 
172 #endif
Ice::InputStream
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition: InputStream.h:50
Ice::UnknownSlicedValue::ice_clone
std::shared_ptr< UnknownSlicedValue > ice_clone() const
Clones this object.
Ice::SliceInfo::instances
::std::vector< ValuePtr > instances
The class instances referenced by this slice.
Definition: SlicedData.h:42
Ice::SliceInfo
Encapsulates the details of a slice for an unknown class or exception type.
Definition: SlicedData.h:23
Ice::SliceInfoSeq
::std::vector< SliceInfoPtr > SliceInfoSeq
The slices of unknown types.
Definition: SlicedDataF.h:16
Ice::emptyCurrent
const Current emptyCurrent
A default-initialized Current instance.
GCObject.h
ICE_API
#define ICE_API
Definition: Config.h:197
Ice::Value
The base class for instances of Slice classes.
Definition: Value.h:24
Ice::UnknownSlicedValue
Represents an instance of an unknown type.
Definition: SlicedData.h:98
Ice::UnknownSlicedValue::UnknownSlicedValue
UnknownSlicedValue(const std::string &unknownTypeId)
Constructs the placeholder instance.
Ice::SliceInfo::bytes
::std::vector< Byte > bytes
The encoded bytes for this slice, including the leading size integer.
Definition: SlicedData.h:37
Ice::SliceInfo::typeId
::std::string typeId
The Slice type ID for this slice.
Definition: SlicedData.h:27
Ice::SlicedData::slices
const SliceInfoSeq slices
The slices of unknown types.
Definition: SlicedData.h:73
Ice::SlicedData::SlicedData
SlicedData(const SliceInfoSeq &)
Ice::SlicedData::clear
void clear()
Clears the slices to break potential cyclic references.
SlicedDataF.h
Ice::SliceInfo::isLastSlice
bool isLastSlice
Whether or not this is the last slice.
Definition: SlicedData.h:52
Ice::OutputStream
Interface for output streams used to create a sequence of bytes from Slice types.
Definition: OutputStream.h:28
Ice::SlicedData
Holds the slices of unknown types.
Definition: SlicedData.h:63
Ice
Definition: BuiltinSequences.h:56
Ice::SliceInfo::compactId
int compactId
The Slice compact type ID for this slice.
Definition: SlicedData.h:32
Ice::Current
Information about the current method invocation for servers.
Definition: Current.h:120
Ice::UnknownSlicedValue::ice_getSlicedData
virtual SlicedDataPtr ice_getSlicedData() const override
Obtains the sliced data associated with this instance.
Ice::UnknownSlicedValue::ice_id
virtual std::string ice_id() const override
Determine the Slice type ID associated with this instance.
IceUtil::Shared
Definition: Shared.h:78
Value.h
Ice::SliceInfo::hasOptionalMembers
bool hasOptionalMembers
Whether or not the slice contains optional members.
Definition: SlicedData.h:47