23 #ifndef __ccxx_DataEncoder_hxx 24 #define __ccxx_DataEncoder_hxx 94 { _encoder.pushContext(); }
98 { _encoder.popContext(); }
128 virtual void apply(
DataEncoder& encoder)
const = 0;
287 virtual void reset();
300 bool isTopContext()
const;
303 uint_t getContextDepth()
const;
318 void setLength(
size_t length);
321 size_t getLength()
const;
330 void setLimit(int64_t limit);
333 int64_t getLimit()
const;
336 int64_t getOffset()
const;
343 virtual void setOffset(int64_t offset) = 0;
349 int64_t getCumulativeOffset()
const;
356 int64_t getRemaining()
const;
367 void align(
size_t size);
377 virtual void skip(
size_t count) = 0;
391 bool isSameEndianness()
const;
406 void bumpOffset(
size_t delta);
426 const Context& currentContext()
const;
436 void checkRemaining(
const Context& ctx,
size_t count)
const;
441 ContextStack* _contexts;
452 #endif // __ccxx_DataEncoder_hxx Endianness endianness
The current byte endianness.
Definition: DataEncoder.h++:409
A manipulator that skips past bytes in the stream.
Definition: DataEncoder.h++:196
A manipulator that specifies the maximum number of bytes that can be read/written.
Definition: DataEncoder.h++:258
virtual ~Manipulator()
Destructor.
Definition: DataEncoder.h++:120
size_t length
The current value length.
Definition: DataEncoder.h++:411
A manipulator that skips past enough bytes to re-align the data stream at a specified boundary...
Definition: DataEncoder.h++:227
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
A lexically scoped DataEncoder context.
Definition: DataEncoder.h++:84
A manipulator that specifies the length of String, Blob, and array values to be subsequently encoded/...
Definition: DataEncoder.h++:166
A base class for DataEncoder manipulators.
Definition: DataEncoder.h++:115
int64_t offset
The current offset.
Definition: DataEncoder.h++:417
int64_t parentLimit
The parent (enclosing) limit.
Definition: DataEncoder.h++:415
int64_t limit
The current limit.
Definition: DataEncoder.h++:413
#define COMMONCPP_API
Definition: Common.h++:126
~ScopedContext()
Destructor.
Definition: DataEncoder.h++:97
int64_t maxOffset
The maximum offset.
Definition: DataEncoder.h++:419
#define CCXX_COPY_DECLS(CLASS)
Inlines declarations of a copy constructor and assignment operator for the class CLASS.
Definition: Common.h++:295
ScopedContext(DataEncoder &encoder)
Construct a new ScopedContext for the given DataEncoder.
Definition: DataEncoder.h++:92
Endianness
Byte endianness.
Definition: Common.h++:321
A manipulator that specifies the endianness of integer values to be subsequently encoded/decoded.
Definition: DataEncoder.h++:137
Definition: AllocationMap.c++:25
A DataEncoder context.
Definition: DataEncoder.h++:399
An abstract class with basic functionality that is common to all data decoders (readers) and data enc...
Definition: DataEncoder.h++:74